Package com.teamdev.jxbrowser.net.tls
Interface ClientCertificate
- All Superinterfaces:
Certificate
A client SSL certificate.
-
Method Summary
Modifier and TypeMethodDescriptiondefault byte[]
Returns an array of bytes that represents the DER-encoded representation ofX509Certificate
.default List<Certificate>
Returns the list of intermediate certificates associated with this certificate needed for chain building.static ClientCertificate
of
(Path keystoreFilePath, String keystorePassword, KeyStoreType keyStoreType) Loads a client certificate from the given keystore file with the given password and keystore type.static ClientCertificate
of
(X509Certificate x509Cert, SslPrivateKey privateKey) Returns theClientCertificate
instance for the givencertificate
and SSL private key.static ClientCertificate
of
(X509Certificate x509Cert, SslPrivateKey privateKey, List<X509Certificate> intermediateX509Certs) Returns theClientCertificate
instance for the givencertificate
, SSL private key, and intermediate certificates.default SslPrivateKey
Returns the SSL private key of this client certificate.Methods inherited from interface com.teamdev.jxbrowser.net.tls.Certificate
toX509Certificate
-
Method Details
-
of
static ClientCertificate of(X509Certificate x509Cert, SslPrivateKey privateKey) throws CertificateEncodingException Returns theClientCertificate
instance for the givencertificate
and SSL private key.- Parameters:
x509Cert
- an X.509 certificateprivateKey
- an SSL (EC or RSA) private key- Throws:
CertificateEncodingException
- when certificate encoding fails
-
of
static ClientCertificate of(X509Certificate x509Cert, SslPrivateKey privateKey, List<X509Certificate> intermediateX509Certs) throws CertificateEncodingException Returns theClientCertificate
instance for the givencertificate
, SSL private key, and intermediate certificates.- Parameters:
x509Cert
- an X.509 certificateprivateKey
- an SSL (EC or RSA) private keyintermediateX509Certs
- a list of intermediate certificates for chain building. Can be empty.- Throws:
CertificateEncodingException
- when certificate encoding fails- Since:
- 7.24.5
-
of
static ClientCertificate of(Path keystoreFilePath, String keystorePassword, KeyStoreType keyStoreType) Loads a client certificate from the given keystore file with the given password and keystore type. The first (end-entity) certificate, all intermediate certificates, and private key will be taken from the given keystore.- Parameters:
keystoreFilePath
- the path to a valid keystore filekeystorePassword
- the password used to access the keystorekeyStoreType
- the keystore type- Throws:
LoadClientCertificateException
- when the client certificate loading has been failed
-
derEncodedValue
default byte[] derEncodedValue()Returns an array of bytes that represents the DER-encoded representation ofX509Certificate
.- Specified by:
derEncodedValue
in interfaceCertificate
-
intermediateCertificates
Returns the list of intermediate certificates associated with this certificate needed for chain building.- Specified by:
intermediateCertificates
in interfaceCertificate
- Since:
- 7.24.5
-
privateKey
Returns the SSL private key of this client certificate.
-