org.forgerock.maven.plugins.utils
Class TrustAllCertsX509TrustManager

java.lang.Object
  extended by org.forgerock.maven.plugins.utils.TrustAllCertsX509TrustManager
All Implemented Interfaces:
TrustManager, X509TrustManager

public class TrustAllCertsX509TrustManager
extends Object
implements X509TrustManager

In order to prevent HTTPS trust issues this X509TrustManager will make sure that there is no certificate validation at all when making outgoing HTTPS connections.

Author:
Peter Major

Constructor Summary
TrustAllCertsX509TrustManager()
           
 
Method Summary
 void checkClientTrusted(X509Certificate[] certs, String authType)
          An empty implementation of client cert check.
 void checkServerTrusted(X509Certificate[] certs, String authType)
          An empty implementation of server cert check.
 X509Certificate[] getAcceptedIssuers()
          Since there is no certificate check at all, this returns an empty array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrustAllCertsX509TrustManager

public TrustAllCertsX509TrustManager()
Method Detail

getAcceptedIssuers

public X509Certificate[] getAcceptedIssuers()
Since there is no certificate check at all, this returns an empty array.

Specified by:
getAcceptedIssuers in interface X509TrustManager
Returns:
An empty array of certs.

checkClientTrusted

public void checkClientTrusted(X509Certificate[] certs,
                               String authType)
An empty implementation of client cert check.

Specified by:
checkClientTrusted in interface X509TrustManager
Parameters:
certs - Peer certificate chain.
authType - Authentication type based on the client certificate.

checkServerTrusted

public void checkServerTrusted(X509Certificate[] certs,
                               String authType)
An empty implementation of server cert check.

Specified by:
checkServerTrusted in interface X509TrustManager
Parameters:
certs - Peer certificate chain.
authType - The key exhange algorithm used.


Copyright © 2013. All Rights Reserved.