spyhunter99 commented on a change in pull request #67:
URL: https://github.com/apache/maven-wagon/pull/67#discussion_r427646906



##########
File path: 
wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
##########
@@ -614,11 +800,23 @@ public void openConnectionInternal()
                                                                     
getRepository().getPort() );
                 credentialsProvider.setCredentials( targetScope, creds );
             }
+            //MNG-5583 per endpoint PKI authentication
+            if ( authenticationInfo.getTrustStore() != null || 
authenticationInfo.getKeyStore() != null ) 
+            {
+                //cache the client for this specific server host:port 
combination
+                String key = repository.getProtocol() + repository.getHost() + 
repository.getPort();
+                if ( !httpClientWithCustomSslSocketFactoryCache.containsKey( 
key ) )
+                {
+                    httpClientWithCustomSslSocketFactoryCache.put( key, 
+                            
initilaizeLocalHttpClientWithCustomSslSocketFactory() );
+                }
+            }
         }
 
         ProxyInfo proxyInfo = getProxyInfo( getRepository().getProtocol(), 
getRepository().getHost() );
         if ( proxyInfo != null )
         {
+            //TODO add PKI support?

Review comment:
       i'm pretty sure it's possible, but i'll remove the todo if you like. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to