Package org.conscrypt.ct
Class CertificateEntry
- java.lang.Object
-
- org.conscrypt.ct.CertificateEntry
-
@Internal public class CertificateEntry extends java.lang.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 class
CertificateEntry.LogEntryType
-
Field Summary
Fields Modifier and Type Field Description private byte[]
certificate
private CertificateEntry.LogEntryType
entryType
private byte[]
issuerKeyHash
-
Constructor Summary
Constructors Modifier Constructor Description private
CertificateEntry(CertificateEntry.LogEntryType entryType, byte[] certificate, byte[] issuerKeyHash)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CertificateEntry
createForPrecertificate(byte[] tbsCertificate, byte[] issuerKeyHash)
static CertificateEntry
createForPrecertificate(OpenSSLX509Certificate leaf, OpenSSLX509Certificate issuer)
static CertificateEntry
createForX509Certificate(byte[] x509Certificate)
static CertificateEntry
createForX509Certificate(java.security.cert.X509Certificate cert)
void
encode(java.io.OutputStream output)
TLS encode the CertificateEntry structure.byte[]
getCertificate()
CertificateEntry.LogEntryType
getEntryType()
byte[]
getIssuerKeyHash()
-
-
-
Field Detail
-
entryType
private final CertificateEntry.LogEntryType entryType
-
issuerKeyHash
private final byte[] issuerKeyHash
-
certificate
private final byte[] certificate
-
-
Constructor Detail
-
CertificateEntry
private CertificateEntry(CertificateEntry.LogEntryType entryType, byte[] certificate, byte[] issuerKeyHash)
-
-
Method Detail
-
createForPrecertificate
public static CertificateEntry createForPrecertificate(byte[] tbsCertificate, byte[] issuerKeyHash)
- Throws:
java.lang.IllegalArgumentException
- if issuerKeyHash isn't 32 bytes
-
createForPrecertificate
public static CertificateEntry createForPrecertificate(OpenSSLX509Certificate leaf, OpenSSLX509Certificate 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 SerializationException
TLS encode the CertificateEntry structure.- Throws:
SerializationException
-
-