public static synchronized boolean initialize() {

		if (sslContext != null) {
			SSLContext.setDefault(sslContext);
			return true;
		}

		Msg.info(SSLContextInitializer.class, "Initializing SSL Context");

		KeyManager[] keyManagers = ApplicationKeyManagerFactory.getInstance().getKeyManagers();

		try {
			// Use new instance of SSLContext to avoid adopting CA certs provided with Java
			sslContext = SSLContext.getInstance(DEFAULT_SSL_PROTOCOL);
			SecureRandom random = SecureRandomFactory.getSecureRandom();
			sslContext.init(keyManagers, ApplicationTrustManagerFactory.getTrustManagers(), random);
			SSLContext.setDefault(sslContext);

			// Must install default HostnameVerifier - otherwise all traffic will fail
			HostnameVerifier originalVerifier = HttpsURLConnection.getDefaultHostnameVerifier();
			if (!(originalVerifier instanceof HttpsHostnameVerifier)) {
				HttpsURLConnection.setDefaultHostnameVerifier(new HttpsHostnameVerifier());
			}

			// Establish default HTTPS socket factory
			HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());

			// Force the HttpClient to be re-created by the next request to
			// HttpClients.getHttpClient() so that the new SSLContext is used
			HttpClients.clearHttpClient();

			return true;

		}
		catch (Exception e) {
			Msg.error(SSLContextInitializer.class,
				"SSL Context initialization failed: " + e.getMessage(), e);
		}
		return false;
	}
Initialize default SSLContext
@return true if successful, else false (see logged error)
Ghidra/Framework/Generic/src/main/java/ghidra/net/SSLContextInitializer.java