public interface ClientCertificate extends Certificate
Modifier and Type | Method and Description |
---|---|
default byte[] |
derEncodedValue()
Returns an array of bytes that represents the DER-encoded representation of
X509Certificate . |
static ClientCertificate |
of(java.nio.file.Path certFilePath,
java.lang.String certPassword,
KeyStoreType keyStoreType)
Loads and creates a client certificate from the given file with the given password and
keystore type.
|
static ClientCertificate |
of(java.security.cert.X509Certificate x509Cert,
SslPrivateKey privateKey)
Returns the
ClientCertificate instance for the given certificate and SSL
private key. |
default SslPrivateKey |
privateKey()
Returns the SSL private key of this client certificate.
|
of, toX509Certificate
static ClientCertificate of(java.security.cert.X509Certificate x509Cert, SslPrivateKey privateKey) throws java.security.cert.CertificateEncodingException
ClientCertificate
instance for the given certificate
and SSL
private key.x509Cert
- an X.509 certificateprivateKey
- an SSL private keyjava.security.cert.CertificateEncodingException
- when certificate encoding failsstatic ClientCertificate of(java.nio.file.Path certFilePath, java.lang.String certPassword, KeyStoreType keyStoreType)
certFilePath
- the path to a valid certificate filecertPassword
- the password used to access the keystorekeyStoreType
- the keystore typeLoadClientCertificateException
- when the client certificate loading has been faileddefault byte[] derEncodedValue()
X509Certificate
.derEncodedValue
in interface Certificate
default SslPrivateKey privateKey()