I am opening an HTTPSUrlConnection similar to the code below. I want to be sure that a certain provider is being used (the RSA one I loaded). How can I query the HTTPSUrlConnection to determine the provider being used?
URL url = new URL("https://myhost:8081/index.html");
URLConnection conn = url.openConnection();
HttpsURLConnection https_conn = (HttpsURLConnection) conn;
Thanks
If you want to use a specific security provider, build an
SSLContextwith it usingSSLContext.getInstance(protocol, provider)(with a provider instance or name), then get anSSLSocketFactoryfrom thisSSLContextand then pass it toHttpsURLConnection.setSSLSocketFactory(...).