Is there anyway to bypass SSL certification? I searched and found a couple of options (-Dcom.sun.net.ssl.checkRevocation=false -Dtrust_all_cert=true) and I am setting them, but not luck.
wget works if I use ‘no-check-certificate’ switch.
Exception in thread “main” javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1916)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:273)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1472)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:213)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:913)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:849)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1035)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1344)
There seems to be something about your local setup. You are either a) using some really old or broken JVM version or b) using an HTTPS proxy which is presenting an invalid cert.
My corporate network used Cloudflare for internet proxy. Cloudflare generates mitm certificates for each external access and these are signed by a Cloudflare self-signed certificate which doesn’t have a valid certificate chain. These certificates are also short lived.
It would be great if we could disable certificate validation across the board for gradle with a property.
We also run corporate web filtering which inspects SSL, and have had the similar issue with Android Studio and Gradle.
Adding our Webfiltering root CA certificate to Android Studio resolved all cert errors except for Gradle, we even tried ticking the ‘accept non-trusted certificates automatically’ but still had issues with Gradle?
In an attempt to resolve it I disabled SSL inspection for https://services.gradle.org/ (location of what studio wanted to access) but this didn’t resolve the issue. After much messing around I spotted that https://services.gradle.org/ certificate is actually issued to ssl473435.cloudflaressl.com rather than itself? Not sure how this passes validation in browser but it does. Anyhow adding this as an SSL inspection exception resolved the issue for us. I don’t know if this is something gradle can change to reduce issues with cooperate entities & improved support for Android Studio’s settings.
Note to others who dont have corperate firewall, you may have a desktop firewall that does need similar exceptions adding.
I’ve logged a support call with Android Studio support as well to see if there is something they can do to provide better support for this.