public interface 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 that may be
needed for chain building.
|
static Certificate |
of(java.security.cert.X509Certificate x509Cert)
Returns the
Certificate instance for the given X.509 certificate. |
static Certificate |
of(java.security.cert.X509Certificate x509Cert,
java.util.List<java.security.cert.X509Certificate> intermediateX509Certs)
Returns the
Certificate instance for the given X.509 certificate and the list of
intermediate X.509 certificates associated with this the certificate that may be needed for
chain building. |
default java.util.Optional<java.security.cert.X509Certificate> |
toX509Certificate()
Returns an
Optional that contains an X.509 certificate initialized with the data
stored in the derEncodedValue() array of bytes or an empty Optional if the
CertificateException was thrown while restoring certificate from its DER-encoded
bytes array. |
static Certificate of(java.security.cert.X509Certificate x509Cert) throws java.security.cert.CertificateEncodingException
Certificate
instance for the given X.509 certificate.java.security.cert.CertificateEncodingException
static Certificate of(java.security.cert.X509Certificate x509Cert, java.util.List<java.security.cert.X509Certificate> intermediateX509Certs) throws java.security.cert.CertificateEncodingException
Certificate
instance for the given X.509 certificate and the list of
intermediate X.509 certificates associated with this the certificate that may be needed for
chain building.java.security.cert.CertificateEncodingException
default byte[] derEncodedValue()
X509Certificate
.default java.util.List<Certificate> intermediateCertificates()
default java.util.Optional<java.security.cert.X509Certificate> toX509Certificate()
Optional
that contains an X.509 certificate initialized with the data
stored in the derEncodedValue()
array of bytes or an empty Optional
if the
CertificateException
was thrown while restoring certificate from its DER-encoded
bytes array.