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;开发者_StackOverflow中文版
Thanks
If you want to use a specific security provider, build an SSLContext with it using SSLContext.getInstance(protocol, provider) (with a provider instance or name), then get an SSLSocketFactory from this SSLContext and then pass it to HttpsURLConnection.setSSLSocketFactory(...).
加载中,请稍侯......
精彩评论