Class RpcSSLSocketFactory.TrustAllTrustManager
java.lang.Object
com.perforce.p4java.impl.mapbased.rpc.stream.RpcSSLSocketFactory.TrustAllTrustManager
- All Implemented Interfaces:
TrustManager,X509TrustManager
- Enclosing class:
- RpcSSLSocketFactory
public static class RpcSSLSocketFactory.TrustAllTrustManager
extends Object
implements 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckClientTrusted(X509Certificate[] chain, String authType) Always trust for client SSL chain peer certificate chain with any authType authentication types.voidcheckServerTrusted(X509Certificate[] chain, String authType) Always trust for server SSL chain peer certificate chain with any authType exchange algorithm types.Return an empty array of certificate authority certificates which are trusted for authenticating peers.
-
Constructor Details
-
TrustAllTrustManager
public TrustAllTrustManager()
-
-
Method Details
-
checkClientTrusted
Always trust for client SSL chain peer certificate chain with any authType authentication types.- Specified by:
checkClientTrustedin interfaceX509TrustManager- Parameters:
chain- the peer certificate chain.authType- the authentication type based on the client certificate.
-
checkServerTrusted
Always trust for server SSL chain peer certificate chain with any authType exchange algorithm types.- Specified by:
checkServerTrustedin interfaceX509TrustManager- Parameters:
chain- the peer certificate chain.authType- the key exchange algorithm used.
-
getAcceptedIssuers
Return an empty array of certificate authority certificates which are trusted for authenticating peers.- Specified by:
getAcceptedIssuersin interfaceX509TrustManager- Returns:
- a empty array of issuer certificates.
-