public class SimpleTrustManager
extends java.lang.Object
implements javax.net.ssl.X509TrustManager
Constructor and Description |
---|
SimpleTrustManager() |
Modifier and Type | Method and Description |
---|---|
void |
checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
Do not need to implement this method.
|
void |
checkServerTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
Do not need to implement this method.
|
java.security.cert.X509Certificate[] |
getAcceptedIssuers()
Do not need to implement this method.
|
boolean |
isClientTrusted(java.security.cert.X509Certificate[] cert)
Do not need to implement this method as we are not
interested client side
|
boolean |
isServerTrusted(java.security.cert.X509Certificate[] cert)
This is the method which gets called while validating
server certificate.
|
public java.security.cert.X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers
in interface javax.net.ssl.X509TrustManager
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType) throws java.security.cert.CertificateException
checkServerTrusted
in interface javax.net.ssl.X509TrustManager
chain
- the chain of certificatesauthType
- the authentication typejava.security.cert.CertificateException
- not validpublic void checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType) throws java.security.cert.CertificateException
checkClientTrusted
in interface javax.net.ssl.X509TrustManager
chain
- the chain of certificatesauthType
- the authentication typejava.security.cert.CertificateException
- not validpublic boolean isServerTrusted(java.security.cert.X509Certificate[] cert)
cert
- the chain of certificatespublic boolean isClientTrusted(java.security.cert.X509Certificate[] cert)
cert
- the chain of certificatesstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.