public static class DatabaseClientFactory.CertificateAuthContext
extends java.lang.Object
Constructor and Description |
---|
CertificateAuthContext(javax.net.ssl.SSLContext context)
Deprecated.
(as of 4.0.1) use CertificateAuthContext(SSLContext,X509TrustManager)
|
CertificateAuthContext(javax.net.ssl.SSLContext context,
DatabaseClientFactory.SSLHostnameVerifier verifier)
Deprecated.
(as of 4.0.1) use CertificateAuthContext(SSLContext,SSLHostnameVerifier,X509TrustManager)
|
CertificateAuthContext(javax.net.ssl.SSLContext context,
DatabaseClientFactory.SSLHostnameVerifier verifier,
javax.net.ssl.X509TrustManager trustManager)
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(javax.net.ssl.SSLContext context,
javax.net.ssl.X509TrustManager trustManager)
Creates a CertificateAuthContext by initializing the SSLContext of the
HTTPS channel with the SSLContext object passed and using the TrustManger
passed.
|
CertificateAuthContext(java.lang.String certFile)
Deprecated.
|
CertificateAuthContext(java.lang.String certFile,
java.lang.String certPassword)
Deprecated.
|
CertificateAuthContext(java.lang.String certFile,
java.lang.String certPassword,
javax.net.ssl.X509TrustManager trustManager)
Creates a CertificateAuthContext with a PKCS12 file.
|
CertificateAuthContext(java.lang.String certFile,
javax.net.ssl.X509TrustManager trustManager)
Creates a CertificateAuthContext with a PKCS12 file.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCertificate() |
java.lang.String |
getCertificatePassword() |
DatabaseClientFactory.CertificateAuthContext |
withSSLHostnameVerifier(DatabaseClientFactory.SSLHostnameVerifier verifier)
Specifies the host verifier for a client that verifies hosts for
additional security.
|
@Deprecated public CertificateAuthContext(javax.net.ssl.SSLContext context)
context
- the SSLContext with which we initialize the
CertificateAuthContextpublic CertificateAuthContext(javax.net.ssl.SSLContext context, javax.net.ssl.X509TrustManager trustManager)
context
- the SSLContext with which we initialize the
CertificateAuthContexttrustManager
- the X509TrustManager object which is responsible for
deciding if a credential should be trusted or not.@Deprecated public CertificateAuthContext(javax.net.ssl.SSLContext context, DatabaseClientFactory.SSLHostnameVerifier verifier)
context
- the SSLContext with which we initialize the
CertificateAuthContextverifier
- a callback for checking host namespublic CertificateAuthContext(javax.net.ssl.SSLContext context, DatabaseClientFactory.SSLHostnameVerifier verifier, javax.net.ssl.X509TrustManager trustManager)
context
- the SSLContext with which we initialize the
CertificateAuthContextverifier
- a callback for checking host namestrustManager
- the X509TrustManager object which is responsible for
deciding if a credential should be trusted or not.@Deprecated public CertificateAuthContext(java.lang.String certFile) throws java.security.cert.CertificateException, java.io.IOException, java.security.UnrecoverableKeyException, java.security.KeyManagementException
certFile
- the p12 file which contains the client's private key and
the client's certificate chainjava.security.cert.CertificateException
- if any of the certificates in the certFile
cannot be loadedjava.security.UnrecoverableKeyException
- if the certFile has an export passwordjava.security.KeyManagementException
- if initializing the SSLContext with the
KeyManager failsjava.io.IOException
- 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(java.lang.String certFile, javax.net.ssl.X509TrustManager trustManager) throws java.security.cert.CertificateException, java.io.IOException, java.security.UnrecoverableKeyException, java.security.KeyManagementException
certFile
- the p12 file which contains the client's private key and
the client's certificate chaintrustManager
- the X509TrustManager object which is responsible for
deciding if a credential should be trusted or not.java.security.cert.CertificateException
- if any of the certificates in the certFile
cannot be loadedjava.security.UnrecoverableKeyException
- if the certFile has an export passwordjava.security.KeyManagementException
- if initializing the SSLContext with the
KeyManager failsjava.io.IOException
- 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.@Deprecated public CertificateAuthContext(java.lang.String certFile, java.lang.String certPassword) throws java.security.cert.CertificateException, java.io.IOException, java.security.UnrecoverableKeyException, java.security.KeyManagementException
certFile
- the p12 file which contains the client's private key
and the client's certificate chaincertPassword
- the export password of the p12 filejava.security.cert.CertificateException
- if any of the certificates in the certFile cannot be loadedjava.security.UnrecoverableKeyException
- if the certFile has an export passwordjava.security.KeyManagementException
- if initializing the SSLContext with the KeyManager failsjava.io.IOException
- 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(java.lang.String certFile, java.lang.String certPassword, javax.net.ssl.X509TrustManager trustManager) throws java.security.cert.CertificateException, java.io.IOException, java.security.UnrecoverableKeyException, java.security.KeyManagementException
certFile
- the p12 file which contains the client's private key
and the client's certificate chaintrustManager
- the X509TrustManager object which is responsible for
deciding if a credential should be trusted or not.certPassword
- the export password of the p12 filejava.security.cert.CertificateException
- if any of the certificates in the certFile cannot be loadedjava.security.UnrecoverableKeyException
- if the certFile has an export passwordjava.security.KeyManagementException
- if initializing the SSLContext with the KeyManager failsjava.io.IOException
- 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)
DatabaseClientFactory.SecurityContext
withSSLHostnameVerifier
in interface DatabaseClientFactory.SecurityContext
verifier
- the host verifierpublic java.lang.String getCertificate()
public java.lang.String getCertificatePassword()
Copyright © 2013-2020 MarkLogic Corporation.