Class RpcSSLSocketFactory.TrustAllTrustManager
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.rpc.stream.RpcSSLSocketFactory.TrustAllTrustManager
-
- All Implemented Interfaces:
javax.net.ssl.TrustManager
,javax.net.ssl.X509TrustManager
- Enclosing class:
- RpcSSLSocketFactory
public static class RpcSSLSocketFactory.TrustAllTrustManager extends java.lang.Object implements javax.net.ssl.X509TrustManager
This class allow any X509 certificates to be used to authenticate the remote side of a secure socket, including self-signed certificates.Note that the tradeoff of this convenience usage is the vulnerability of man-in-the-middle attacks.
-
-
Constructor Summary
Constructors Constructor Description TrustAllTrustManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType)
Always trust for client SSL chain peer certificate chain with any authType authentication types.void
checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType)
Always trust for server SSL chain peer certificate chain with any authType exchange algorithm types.java.security.cert.X509Certificate[]
getAcceptedIssuers()
Return an empty array of certificate authority certificates which are trusted for authenticating peers.
-
-
-
Method Detail
-
checkClientTrusted
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType)
Always trust for client SSL chain peer certificate chain with any authType authentication types.- Specified by:
checkClientTrusted
in interfacejavax.net.ssl.X509TrustManager
- Parameters:
chain
- the peer certificate chain.authType
- the authentication type based on the client certificate.
-
checkServerTrusted
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType)
Always trust for server SSL chain peer certificate chain with any authType exchange algorithm types.- Specified by:
checkServerTrusted
in interfacejavax.net.ssl.X509TrustManager
- Parameters:
chain
- the peer certificate chain.authType
- the key exchange algorithm used.
-
getAcceptedIssuers
public java.security.cert.X509Certificate[] getAcceptedIssuers()
Return an empty array of certificate authority certificates which are trusted for authenticating peers.- Specified by:
getAcceptedIssuers
in interfacejavax.net.ssl.X509TrustManager
- Returns:
- a empty array of issuer certificates.
-
-