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 . |
default java.util.List<Certificate> |
intermediateCertificates()
Returns the list of intermediate certificates associated with this certificate needed for
chain building.
|
static ClientCertificate |
of(java.nio.file.Path keystoreFilePath,
java.lang.String keystorePassword,
KeyStoreType keyStoreType)
Loads a client certificate from the given keystore 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. |
static ClientCertificate |
of(java.security.cert.X509Certificate x509Cert,
SslPrivateKey privateKey,
java.util.List<java.security.cert.X509Certificate> intermediateX509Certs)
Returns the
ClientCertificate instance for the given certificate , SSL
private key, and intermediate certificates. |
default SslPrivateKey |
privateKey()
Returns the SSL private key of this client certificate.
|
of, 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 (EC or RSA) private keyjava.security.cert.CertificateEncodingException
- when certificate encoding failsstatic ClientCertificate of(java.security.cert.X509Certificate x509Cert, SslPrivateKey privateKey, java.util.List<java.security.cert.X509Certificate> intermediateX509Certs) throws java.security.cert.CertificateEncodingException
ClientCertificate
instance for the given certificate
, SSL
private key, and intermediate certificates.x509Cert
- an X.509 certificateprivateKey
- an SSL (EC or RSA) private keyintermediateX509Certs
- a list of intermediate certificates for chain building. Can be empty.java.security.cert.CertificateEncodingException
- when certificate encoding failsstatic ClientCertificate of(java.nio.file.Path keystoreFilePath, java.lang.String keystorePassword, KeyStoreType keyStoreType)
keystoreFilePath
- the path to a valid keystore filekeystorePassword
- 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 java.util.List<Certificate> intermediateCertificates()
intermediateCertificates
in interface Certificate
default SslPrivateKey privateKey()