public static class DatabaseClientFactory.CertificateAuthContext extends Object
| Constructor and Description |
|---|
CertificateAuthContext(SSLContext context)
Creates a CertificateAuthContext by initializing the SSLContext of the HTTPS channel with the SSLContext object passed.
|
CertificateAuthContext(SSLContext context,
DatabaseClientFactory.SSLHostnameVerifier verifier)
Creates a CertificateAuthContext by initializing the SSLContext of the HTTPS channel with the SSLContext object passed and assigns the SSLHostnameVerifier passed to be used for checking host names.
|
CertificateAuthContext(String certFile)
Creates a CertificateAuthContext with a PKCS12 file.
|
CertificateAuthContext(String certFile,
String certPassword)
Creates a CertificateAuthContext with a PKCS12 file.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCertificate() |
String |
getCertificatePassword() |
DatabaseClientFactory.CertificateAuthContext |
withSSLHostnameVerifier(DatabaseClientFactory.SSLHostnameVerifier verifier) |
public CertificateAuthContext(SSLContext context)
Creates a CertificateAuthContext by initializing the SSLContext of the HTTPS channel with the SSLContext object passed. The KeyManager of the SSLContext should be initialized with the appropriate client certificate and client’s private key
context - the SSLContext with which we initialize the CertificateAuthContextpublic CertificateAuthContext(SSLContext context, DatabaseClientFactory.SSLHostnameVerifier verifier)
Creates a CertificateAuthContext by initializing the SSLContext of the HTTPS channel with the SSLContext object passed and assigns the SSLHostnameVerifier passed to be used for checking host names. The KeyManager of the SSLContext should be initialized with the appropriate client certificate and client’s private key
context - the SSLContext with which we initialize the CertificateAuthContextverifier - a callback for checking host namespublic CertificateAuthContext(String certFile) throws CertificateException, IOException, UnrecoverableKeyException, KeyManagementException
Creates a CertificateAuthContext with a PKCS12 file. The SSLContext is created from the information in the PKCS12 file. This constructor should be called when the export password of the PKCS12 file is empty.
certFile - the p12 file which contains the client’s private key and the client’s certificate chainCertificateException - if any of the certificates in the certFile cannot be loadedUnrecoverableKeyException - if the certFile has an export passwordKeyManagementException - if initializing the SSLContext with the KeyManager failsIOException - if there is an I/O or format problem with the keystore data, if a password is required but not given, or if the given password was incorrect or if the certFile path is invalid or if the file is not found If the error is due to a wrong password, the cause of the IOException should be an UnrecoverableKeyException.public CertificateAuthContext(String certFile, String certPassword) throws CertificateException, IOException, UnrecoverableKeyException, KeyManagementException
Creates a CertificateAuthContext with a PKCS12 file. The SSLContext is created from the information in the PKCS12 file. This constructor should be called when the export password of the PKCS12 file is non-empty.
certFile - the p12 file which contains the client’s private key and the client’s certificate chaincertPassword - the export password of the p12 fileCertificateException - if any of the certificates in the certFile cannot be loadedUnrecoverableKeyException - if the certFile has an export passwordKeyManagementException - if initializing the SSLContext with the KeyManager failsIOException - if there is an I/O or format problem with the keystore data, if a password is required but not given, or if the given password was incorrect or if the certFile path is invalid or if the file is not found If the error is due to a wrong password, the cause of the IOException should be an UnrecoverableKeyException.public DatabaseClientFactory.CertificateAuthContext withSSLHostnameVerifier(DatabaseClientFactory.SSLHostnameVerifier verifier)
withSSLHostnameVerifier in interface DatabaseClientFactory.SecurityContextpublic String getCertificate()
public String getCertificatePassword()
Copyright © 2013-2017 MarkLogic Corporation.