Skip to content

Instantly share code, notes, and snippets.

@hunMyrte
hunMyrte / Ignore certificate for HttpURLConnection in Android.java
Last active July 8, 2016 16:11 — forked from aembleton/Ignore certificate for HttpURLConnection in Android.java
The following code disables SSL certificate checking for any new instances of HttpsUrlConnection
/**
* Disables the SSL certificate checking for new instances of {@link HttpsURLConnection} This has been created to
* aid testing on a local box, not for use on production.
*/
/**
* Google has dropped support for Anonymous Diffie Hellman ciphers. So If your server uses, the connection works under Android 6.0.
*/
private static void disableSSLCertificateChecking() {