android – Force Gradle to use HTTP instead of HTTPS-ThrowExceptions

Exception or error: I am trying to build react-native android app, as a dependecy I see I have gradle, but it fails to load on build. Error message: * What went wrong: A problem occurred configuring root project ‘MobileApp’. > Could not resolve all dependencies for configuration ‘:classpath’. > Could not resolve com.android.tools.build:gradle:1.3.1. Required by: …

apache – Android: Making Https Request-ThrowExceptions

Exception or error: How do I avoid the “javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated” exception and the Android Apache lib gap “The constructor SSLSocketFactory(SSLContext) is undefined” in making an Https request? How to solve: This method takes an HttpClient instance and returns a ready-for-https HttpClient instance. private HttpClient sslClient(HttpClient client) { try { X509TrustManager tm = new …

java – How to disable SSLv3 in android for HttpsUrlConnection?-ThrowExceptions

Exception or error: We wrote client application in android which connects with https servers using HttpsUrlConnection apis. Due to Poodle vulnerability, we need to disable SSLv3 from the list of enabled protocols while invoking any request. We followed the guidelines captured by oracle and added following line before invoking url connection java.lang.System.setProperty(“https.protocols”, “TLSv1”); This solution …

java – How to connect via HTTPS using Jsoup?-ThrowExceptions

Exception or error: It’s working fine over HTTP, but when I try and use an HTTPS source it throws the following exception: 10-12 13:22:11.169: WARN/System.err(332): javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. 10-12 13:22:11.179: WARN/System.err(332): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:477) 10-12 13:22:11.179: WARN/System.err(332): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:328) 10-12 13:22:11.179: WARN/System.err(332): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.setupSecureSocket(HttpConnection.java:185) 10-12 13:22:11.179: WARN/System.err(332): at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:433) 10-12 …

java – Uploading a file over SSL with Client Side Certificate and Android's HttpsURLConnection-ThrowExceptions

Exception or error: I’m trying to upload a file to a web-service that is protected with SSL and requires a client-side certificate (signed by an in-house CA). The communication to the web-service works well (Downloading files, Querying, running commands and performing all sorts of POSTs works well as expected), except for uploading files. When uploading …