Package org.conscrypt.ct
Class CertificateEntry
- java.lang.Object
-
- org.conscrypt.ct.CertificateEntry
-
public class CertificateEntry extends Object
CertificateEntry structure. This structure describes part of the data which is signed over in SCTs. It is not defined by the RFC6962, but it is useful to have. It's definition would be : struct { LogEntryType entry_type; select(entry_type) { case x509_entry: ASN.1Cert; case precert_entry: PreCert; } signed_entry; } CertificateEntry;
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCertificateEntry.LogEntryType
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CertificateEntrycreateForPrecertificate(byte[] tbsCertificate, byte[] issuerKeyHash)static CertificateEntrycreateForPrecertificate(OpenSSLX509Certificate leaf, OpenSSLX509Certificate issuer)static CertificateEntrycreateForX509Certificate(byte[] x509Certificate)static CertificateEntrycreateForX509Certificate(X509Certificate cert)voidencode(OutputStream output)TLS encode the CertificateEntry structure.byte[]getCertificate()CertificateEntry.LogEntryTypegetEntryType()byte[]getIssuerKeyHash()
-
-
-
Method Detail
-
createForPrecertificate
public static CertificateEntry createForPrecertificate(byte[] tbsCertificate, byte[] issuerKeyHash)
- Throws:
IllegalArgumentException- if issuerKeyHash isn't 32 bytes
-
createForPrecertificate
public static CertificateEntry createForPrecertificate(OpenSSLX509Certificate leaf, OpenSSLX509Certificate issuer) throws CertificateException
- Throws:
CertificateException
-
createForX509Certificate
public static CertificateEntry createForX509Certificate(byte[] x509Certificate)
-
createForX509Certificate
public static CertificateEntry createForX509Certificate(X509Certificate cert) throws CertificateEncodingException
- Throws:
CertificateEncodingException
-
getEntryType
public CertificateEntry.LogEntryType getEntryType()
-
getCertificate
public byte[] getCertificate()
-
getIssuerKeyHash
public byte[] getIssuerKeyHash()
-
encode
public void encode(OutputStream output) throws SerializationException
TLS encode the CertificateEntry structure.- Throws:
SerializationException
-
-