Skip to content

Instantly share code, notes, and snippets.

@moxie0 moxie0/gist:1398985
Created Nov 28, 2011

What would you like to do?
private InputStream makeRequest(Context context, URL url) {
AssetManager assetManager = context.getAssets();
InputStream keyStoreInputStream ="");
KeyStore trustStore = KeyStore.getInstance("BKS");
trustStore.load(keyStoreInputStream, "somepass".toCharArray());
TrustManagerFactory tmf = TrustManagerFactory.getInstance("X509");
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, tmf.getTrustManagers(), null);
HttpsURLConnection urlConnection = (HttpsURLConnection)url.openConnection();
return urlConnection.getInputStream();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.