TrustManager
, X509TrustManager
public class PKITrustManager extends Object implements X509TrustManager
JGLOBUS-97 : ability to accept anonymous connections?
Constructor | Description |
---|---|
PKITrustManager(CertPathValidatorSpi initValidator,
X509ProxyCertPathParameters initParameters) |
Create a trust manager with the pre-configured cert path validator and proxy parameters.
|
Modifier and Type | Method | Description |
---|---|---|
void |
checkClientTrusted(X509Certificate[] x509Certificates,
String authType) |
Test if the client is trusted based on the certificate chain.
|
void |
checkServerTrusted(X509Certificate[] x509Certificates,
String authType) |
Test if the server is trusted based on the certificate chain.
|
X509Certificate[] |
getAcceptedIssuers() |
Get the collection of trusted certificate issuers.
|
CertPathValidatorResult |
getValidationResult() |
Return the result of the last certificate validation.
|
public PKITrustManager(CertPathValidatorSpi initValidator, X509ProxyCertPathParameters initParameters)
initValidator
- A cert path validator to be used by this trust manager.initParameters
- The proxy cert parameters, populated with trust store, cert store, etc.public void checkClientTrusted(X509Certificate[] x509Certificates, String authType) throws CertificateException
checkClientTrusted
in interface X509TrustManager
x509Certificates
- The certificate chain to test for validity.authType
- The authentication type based on the client certificate.CertificateException
- If the path validation fails.public void checkServerTrusted(X509Certificate[] x509Certificates, String authType) throws CertificateException
checkServerTrusted
in interface X509TrustManager
x509Certificates
- The certificate chain to test for validity.authType
- The authentication type based on the server certificate.CertificateException
- If the path validation fails.public X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers
in interface X509TrustManager
public CertPathValidatorResult getValidationResult()
Copyright © 2018. All rights reserved.