Class JSSTrustManager
java.lang.Object
org.mozilla.jss.provider.javax.crypto.JSSTrustManager
- All Implemented Interfaces:
TrustManager
,X509TrustManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private SSLCertificateApprovalCallback
static final String
private String
static final org.slf4j.Logger
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkCertChain
(X509Certificate[] certChain, String keyUsage) void
checkCertChain
(X509Certificate[] certChain, String keyUsage, SSLCertificateApprovalCallback.ValidityStatus status) void
checkClientTrusted
(X509Certificate[] certChain, String authType) void
checkHostname
(X509Certificate[] certChain, SSLCertificateApprovalCallback.ValidityStatus status) void
checkIssuerTrusted
(X509Certificate[] certChain, SSLCertificateApprovalCallback.ValidityStatus status) void
checkKeyUsage
(X509Certificate[] certChain, String keyUsage, SSLCertificateApprovalCallback.ValidityStatus status) void
checkServerTrusted
(X509Certificate[] certChain, String authType) void
checkSignature
(X509Certificate cert, X509Certificate[] caCerts, int depth, SSLCertificateApprovalCallback.ValidityStatus status) void
checkValidityDates
(X509Certificate[] certChain, SSLCertificateApprovalCallback.ValidityStatus status) void
configureAllowMissingExtendedKeyUsage
(boolean allow) boolean
isTrustedPeer
(X509Certificate[] certChain) boolean
boolean
isValidSubject
(CertificateSubjectName subject) void
setCallback
(SSLCertificateApprovalCallback certCallback) void
setHostname
(String hostname)
-
Field Details
-
logger
public static final org.slf4j.Logger logger -
SERVER_AUTH_OID
- See Also:
-
CLIENT_AUTH_OID
- See Also:
-
hostname
-
allowMissingExtendedKeyUsage
private boolean allowMissingExtendedKeyUsage -
callback
-
-
Constructor Details
-
JSSTrustManager
public JSSTrustManager()
-
-
Method Details
-
getHostname
-
setHostname
-
configureAllowMissingExtendedKeyUsage
public void configureAllowMissingExtendedKeyUsage(boolean allow) -
getCallback
-
setCallback
-
isValidSAN
- Throws:
Exception
-
isValidSubject
- Throws:
Exception
-
checkHostname
public void checkHostname(X509Certificate[] certChain, SSLCertificateApprovalCallback.ValidityStatus status) throws Exception - Throws:
Exception
-
checkCertChain
- Throws:
Exception
-
checkCertChain
public void checkCertChain(X509Certificate[] certChain, String keyUsage, SSLCertificateApprovalCallback.ValidityStatus status) throws Exception - Throws:
Exception
-
isTrustedPeer
- Throws:
Exception
-
checkIssuerTrusted
public void checkIssuerTrusted(X509Certificate[] certChain, SSLCertificateApprovalCallback.ValidityStatus status) throws Exception - Throws:
Exception
-
checkSignature
public void checkSignature(X509Certificate cert, X509Certificate[] caCerts, int depth, SSLCertificateApprovalCallback.ValidityStatus status) throws Exception - Throws:
Exception
-
checkValidityDates
public void checkValidityDates(X509Certificate[] certChain, SSLCertificateApprovalCallback.ValidityStatus status) throws Exception - Throws:
Exception
-
checkKeyUsage
public void checkKeyUsage(X509Certificate[] certChain, String keyUsage, SSLCertificateApprovalCallback.ValidityStatus status) throws Exception - Throws:
Exception
-
checkClientTrusted
public void checkClientTrusted(X509Certificate[] certChain, String authType) throws CertificateException - Specified by:
checkClientTrusted
in interfaceX509TrustManager
- Throws:
CertificateException
-
checkServerTrusted
public void checkServerTrusted(X509Certificate[] certChain, String authType) throws CertificateException - Specified by:
checkServerTrusted
in interfaceX509TrustManager
- Throws:
CertificateException
-
getAcceptedIssuers
- Specified by:
getAcceptedIssuers
in interfaceX509TrustManager
-