Class CertificateEntry
- java.lang.Object
-
- dev.sigstore.encryption.certificates.transparency.CertificateEntry
-
public class CertificateEntry extends java.lang.ObjectCertificateEntry 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)Creates a CertificateEntry with type PRECERT_ENTRYstatic CertificateEntrycreateForPrecertificate(java.security.cert.X509Certificate leaf, java.security.cert.X509Certificate issuer)static CertificateEntrycreateForX509Certificate(byte[] x509Certificate)static CertificateEntrycreateForX509Certificate(java.security.cert.X509Certificate cert)voidencode(java.io.OutputStream output)TLS encode the CertificateEntry structure.byte[]getCertificate()CertificateEntry.LogEntryTypegetEntryType()byte[]getIssuerKeyHash()
-
-
-
Method Detail
-
createForPrecertificate
public static CertificateEntry createForPrecertificate(byte[] tbsCertificate, byte[] issuerKeyHash)
Creates a CertificateEntry with type PRECERT_ENTRY- Throws:
java.lang.IllegalArgumentException- if issuerKeyHash isn't 32 bytes
-
createForPrecertificate
public static CertificateEntry createForPrecertificate(java.security.cert.X509Certificate leaf, java.security.cert.X509Certificate issuer) throws java.security.cert.CertificateException
- Throws:
java.security.cert.CertificateException
-
createForX509Certificate
public static CertificateEntry createForX509Certificate(byte[] x509Certificate)
-
createForX509Certificate
public static CertificateEntry createForX509Certificate(java.security.cert.X509Certificate cert) throws java.security.cert.CertificateEncodingException
- Throws:
java.security.cert.CertificateEncodingException
-
getEntryType
public CertificateEntry.LogEntryType getEntryType()
-
getCertificate
public byte[] getCertificate()
-
getIssuerKeyHash
public byte[] getIssuerKeyHash()
-
encode
public void encode(java.io.OutputStream output) throws SerializationExceptionTLS encode the CertificateEntry structure.- Throws:
SerializationException
-
-