mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Set default hostname verifier and socket factory for URLConnection
This commit is contained in:
@@ -131,7 +131,10 @@ public class CertificateManager implements PersistentStateComponent<CertificateM
|
||||
// Don't do this: protocol created this way will ignore SSL tunnels. See IDEA-115708.
|
||||
// Protocol.registerProtocol("https", CertificateManager.createDefault().createProtocol());
|
||||
if (Registry.is("ide.certificate.manager")) {
|
||||
SSLContext.setDefault(getSslContext());
|
||||
SSLContext sslContext = getSslContext();
|
||||
SSLContext.setDefault(sslContext);
|
||||
HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
|
||||
HttpsURLConnection.setDefaultHostnameVerifier(HOSTNAME_VERIFIER);
|
||||
LOG.debug("Default SSL context initialized");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user