Package org.conscrypt.ct
Class CertificateEntry
java.lang.Object
org.conscrypt.ct.CertificateEntry
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 -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]
private final CertificateEntry.LogEntryType
private final byte[]
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
CertificateEntry
(CertificateEntry.LogEntryType entryType, byte[] certificate, byte[] issuerKeyHash) -
Method Summary
Modifier and TypeMethodDescriptionstatic CertificateEntry
createForPrecertificate
(byte[] tbsCertificate, byte[] issuerKeyHash) static CertificateEntry
static CertificateEntry
createForX509Certificate
(byte[] x509Certificate) static CertificateEntry
void
encode
(OutputStream output) TLS encode the CertificateEntry structure.byte[]
byte[]
-
Field Details
-
entryType
-
issuerKeyHash
private final byte[] issuerKeyHash -
certificate
private final byte[] certificate
-
-
Constructor Details
-
CertificateEntry
private CertificateEntry(CertificateEntry.LogEntryType entryType, byte[] certificate, byte[] issuerKeyHash)
-
-
Method Details
-
createForPrecertificate
- Throws:
IllegalArgumentException
- if issuerKeyHash isn't 32 bytes
-
createForPrecertificate
public static CertificateEntry createForPrecertificate(OpenSSLX509Certificate leaf, OpenSSLX509Certificate issuer) throws CertificateException - Throws:
CertificateException
-
createForX509Certificate
-
createForX509Certificate
public static CertificateEntry createForX509Certificate(X509Certificate cert) throws CertificateEncodingException - Throws:
CertificateEncodingException
-
getEntryType
-
getCertificate
public byte[] getCertificate() -
getIssuerKeyHash
public byte[] getIssuerKeyHash() -
encode
TLS encode the CertificateEntry structure.- Throws:
SerializationException
-