public final class VariableX509TrustManager
extends java.lang.Object
| Constructor and Description |
|---|
VariableX509TrustManager()
Constructor initializes the system, user and custom stores
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkTrustClient(java.security.cert.X509Certificate[] chain,
java.lang.String authType,
java.lang.String hostName)
Check if client is trusted (no support for custom here, only system/user)
|
void |
checkTrustServer(java.security.cert.X509Certificate[] chain,
java.lang.String authType,
java.lang.String hostName,
javax.net.ssl.SSLSocket socket,
javax.net.ssl.SSLEngine engine)
Check if the server is trusted.
|
protected java.security.cert.X509Certificate[] |
getAcceptedIssuers() |
static VariableX509TrustManager |
getInstance()
Return an instance of this singleton
|
public VariableX509TrustManager()
public void checkTrustClient(java.security.cert.X509Certificate[] chain,
java.lang.String authType,
java.lang.String hostName)
throws java.security.cert.CertificateException
chain - certificate chainauthType - type of authentificationhostName - hostnemjava.security.cert.CertificateException - if certificate is wrongpublic void checkTrustServer(java.security.cert.X509Certificate[] chain,
java.lang.String authType,
java.lang.String hostName,
javax.net.ssl.SSLSocket socket,
javax.net.ssl.SSLEngine engine)
throws java.security.cert.CertificateException
chain - The cert chainauthType - The auth type algorithmhostName - The expected hostName that the server should havesocket - The SSLSocket in use (may be null)engine - The SSLEngine in use (may be null)java.security.cert.CertificateException - if certificate is wrongprotected java.security.cert.X509Certificate[] getAcceptedIssuers()
public static VariableX509TrustManager getInstance()