This unfortunately didn't have any effect on the outcome. On Monday, July 7, 2014 7:34:57 PM UTC-7, Nikolay Elenkov wrote: > > On Tue, Jul 8, 2014 at 11:21 AM, Eamon Doyle <[email protected] > <javascript:>> wrote: > > > > > However, I don't know of way to do HTTP requests or use an HTTP client > with > > a socket that's already created. So, I tried using an > HttpsUrlConnection as > > follows (error handling omitted for brevity): > > > > KeyManager[] keyManagers = getMyKeyManagers(); > > TrustManager[] trustManagers = getMyTrustManagers(); > > SSLContext sslContext = SSLContext.getInstance("TLSv1.2"); > > sslContext.init(keyManagers, trustManagers, null); > > > > Try adding this before the code below: > > HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory()); > > > > URL url = new URL("https://foo.com/bar"); > > HttpsURLConnection urlConnection = null; > > urlConnection = (HttpsURLConnection)url.openConnection(); > > urlConnection.connect(); > > >
-- You received this message because you are subscribed to the Google Groups "Android Security Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/android-security-discuss. For more options, visit https://groups.google.com/d/optout.
