Package com.teamdev.jxbrowser.net.tls
Interface Certificate
- All Known Subinterfaces:
ClientCertificate
public interface Certificate
An SSL certificate instance such as an X.509 certificate providing an SSL server identity.
-
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 that may be needed for chain building.static Certificate
of
(X509Certificate x509Cert) Returns theCertificate
instance for the given X.509 certificate.static Certificate
of
(X509Certificate x509Cert, List<X509Certificate> intermediateX509Certs) Returns theCertificate
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 Optional<X509Certificate>
Returns anOptional
that contains an X.509 certificate initialized with the data stored in thederEncodedValue()
array of bytes or an emptyOptional
if theCertificateException
was thrown while restoring certificate from its DER-encoded bytes array.
-
Method Details
-
of
Returns theCertificate
instance for the given X.509 certificate.- Throws:
CertificateEncodingException
-
of
static Certificate of(X509Certificate x509Cert, List<X509Certificate> intermediateX509Certs) throws CertificateEncodingException Returns theCertificate
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.- Throws:
CertificateEncodingException
- Since:
- 7.24.5
-
derEncodedValue
default byte[] derEncodedValue()Returns an array of bytes that represents the DER-encoded representation ofX509Certificate
. -
intermediateCertificates
Returns the list of intermediate certificates associated with this certificate that may be needed for chain building.- Since:
- 7.24.5
-
toX509Certificate
Returns anOptional
that contains an X.509 certificate initialized with the data stored in thederEncodedValue()
array of bytes or an emptyOptional
if theCertificateException
was thrown while restoring certificate from its DER-encoded bytes array.- Since:
- 7.1
-