FileDocCategorySizeDatePackage
TrustAnyTrustManager.javaAPI DocGlassfish v2 API3918Fri May 04 22:30:32 BST 2007com.sun.appserv.management.client

TrustAnyTrustManager

public final class TrustAnyTrustManager extends Object implements X509TrustManager
This TrustManager applies no logic as to whether its peer certificate is trusted; it trusts all peers. This is a security risk, and should be used only for convenience in testing or where security is explicitly not an issue.

Fields Summary
private static TrustAnyTrustManager
INSTANCE
private static TrustAnyTrustManager[]
INSTANCE_ARRAY
Constructors Summary
private TrustAnyTrustManager()

	
			
Methods Summary
public voidcheckClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType)
WARNING: does nothing; all clients are always trusted.

		//trace( "checkClientTrusted, authType = " + authType +
		//	", " + SmartStringifier.toString( chain ) );
	
public voidcheckServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType)
WARNING: does nothing; all servers are always trusted.

		//trace( "checkServerTrusted, authType = " + authType +
		//	", " + SmartStringifier.toString( chain ) );
	
public java.security.cert.X509Certificate[]getAcceptedIssuers()

return
an empty array.

		return( new X509Certificate[ 0 ] );
	
public static synchronized com.sun.appserv.management.client.TrustAnyTrustManagergetInstance()
Get an instance; only one is ever created.

		if ( INSTANCE == null )
		{
			INSTANCE		= new TrustAnyTrustManager();
			INSTANCE_ARRAY	= new TrustAnyTrustManager[] { INSTANCE };
		}
		return( INSTANCE );
	
public static com.sun.appserv.management.client.TrustAnyTrustManager[]getInstanceArray()
Calls getInstance() and returns an array containing it.

		getInstance();
		return( INSTANCE_ARRAY );
	
public java.lang.StringtoString()

		return( "TrustAnyTrustManager--trusts all certificates with no check whatsoever" );