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 . |
static Certificate |
of(java.security.cert.X509Certificate x509Cert)
Returns the
Certificate instance for the given x509 certificate. |
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 x509 certificate.java.security.cert.CertificateEncodingException
default byte[] derEncodedValue()
X509Certificate
.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.