@@ -95,7 +95,8 @@ private static Proxy defaultProxy() {
9595 private final boolean isMtls ;
9696
9797 /**
98- * Returns the default SSL socket factory, which is PQC-enabled if Bouncy Castle JJSSE is on the classpath.
98+ * Returns the default SSL socket factory, which is PQC-enabled if Bouncy Castle JJSSE is on the
99+ * classpath.
99100 */
100101 private static SSLSocketFactory getDefaultSslSocketFactory () {
101102 try {
@@ -146,8 +147,7 @@ public NetHttpTransport() {
146147 HostnameVerifier hostnameVerifier ,
147148 boolean isMtls ) {
148149 this .connectionFactory = getConnectionFactory (connectionFactory );
149- // Securely wrap the socket factory to enforce PQC hybrid negotiation scope-specifically
150- this .sslSocketFactory = sslSocketFactory != null ? new PqcDelegatingSSLSocketFactory (sslSocketFactory ) : null ;
150+ this .sslSocketFactory = sslSocketFactory ;
151151 this .hostnameVerifier = hostnameVerifier ;
152152 this .isMtls = isMtls ;
153153 }
@@ -310,26 +310,30 @@ public Builder trustCertificates(KeyStore trustStore) throws GeneralSecurityExce
310310 }
311311
312312 /**
313- * Sets the SSL socket factory based on a root certificate trust store and a specific security provider.
313+ * Sets the SSL socket factory based on a root certificate trust store and a specific security
314+ * provider.
314315 *
315316 * @param trustStore certificate trust store
316317 * @param provider security provider to use for SSL context
317318 * @since 1.39
318319 */
319- public Builder trustCertificates (KeyStore trustStore , Provider provider ) throws GeneralSecurityException {
320+ public Builder trustCertificates (KeyStore trustStore , Provider provider )
321+ throws GeneralSecurityException {
320322 SSLContext sslContext = SslUtils .getTlsSslContext (provider );
321323 SslUtils .initSslContext (sslContext , trustStore , SslUtils .getPkixTrustManagerFactory ());
322324 return setSslSocketFactory (sslContext .getSocketFactory ());
323325 }
324326
325327 /**
326- * Sets the SSL socket factory based on a root certificate trust store and a specific security provider name.
328+ * Sets the SSL socket factory based on a root certificate trust store and a specific security
329+ * provider name.
327330 *
328331 * @param trustStore certificate trust store
329332 * @param providerName security provider name to use for SSL context
330333 * @since 1.39
331334 */
332- public Builder trustCertificates (KeyStore trustStore , String providerName ) throws GeneralSecurityException {
335+ public Builder trustCertificates (KeyStore trustStore , String providerName )
336+ throws GeneralSecurityException {
333337 try {
334338 SSLContext sslContext = SslUtils .getTlsSslContext (providerName );
335339 SslUtils .initSslContext (sslContext , trustStore , SslUtils .getPkixTrustManagerFactory ());
@@ -412,7 +416,8 @@ public NetHttpTransport build() {
412416 if (System .getProperty (SHOULD_USE_PROXY_FLAG ) != null ) {
413417 setProxy (defaultProxy ());
414418 }
415- SSLSocketFactory factory = sslSocketFactory != null ? sslSocketFactory : getDefaultSslSocketFactory ();
419+ SSLSocketFactory factory =
420+ sslSocketFactory != null ? sslSocketFactory : getDefaultSslSocketFactory ();
416421 return this .proxy == null
417422 ? new NetHttpTransport (connectionFactory , factory , hostnameVerifier , isMtls )
418423 : new NetHttpTransport (this .proxy , factory , hostnameVerifier , isMtls );
0 commit comments