Top Description Inners Fields Constructors Methods
org.conscrypt.ct

public Class CertificateEntry

extends Object
Class Inheritance
Annotations
@Internal
Imports
java.io.OutputStream, java.security.MessageDigest, .NoSuchAlgorithmException, java.security.cert.CertificateEncodingException, .CertificateException, .X509Certificate, org.conscrypt.Internal, .OpenSSLX509Certificate

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 and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private final byte[]
private final CertificateEntry.LogEntryType
private final byte[]

Constructor Summary

AccessConstructor and Description
private
CertificateEntry(CertificateEntry.LogEntryType entryType, byte[] certificate, byte[] issuerKeyHash)

Method Summary

Modifier and TypeMethod and Description
public static CertificateEntry
createForPrecertificate(byte[] tbsCertificate, byte[] issuerKeyHash)

public static CertificateEntry
public static CertificateEntry
createForX509Certificate(byte[] x509Certificate)

public static CertificateEntry
public void
encode(OutputStream output)

TLS encode the CertificateEntry structure.

public byte[]
public CertificateEntry.LogEntryType
public byte[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

certificateback to summary
private final byte[] certificate
entryTypeback to summary
private final CertificateEntry.LogEntryType entryType
issuerKeyHashback to summary
private final byte[] issuerKeyHash

Constructor Detail

CertificateEntryback to summary
private CertificateEntry(CertificateEntry.LogEntryType entryType, byte[] certificate, byte[] issuerKeyHash)

Method Detail

createForPrecertificateback to summary
public static CertificateEntry createForPrecertificate(byte[] tbsCertificate, byte[] issuerKeyHash)
Exceptions
IllegalArgumentException:
if issuerKeyHash isn't 32 bytes
createForPrecertificateback to summary
public static CertificateEntry createForPrecertificate(OpenSSLX509Certificate leaf, OpenSSLX509Certificate issuer) throws CertificateException
createForX509Certificateback to summary
public static CertificateEntry createForX509Certificate(byte[] x509Certificate)
createForX509Certificateback to summary
public static CertificateEntry createForX509Certificate(X509Certificate cert) throws CertificateEncodingException
encodeback to summary
public void encode(OutputStream output) throws SerializationException

TLS encode the CertificateEntry structure.

getCertificateback to summary
public byte[] getCertificate()
getEntryTypeback to summary
public CertificateEntry.LogEntryType getEntryType()
getIssuerKeyHashback to summary
public byte[] getIssuerKeyHash()
org.conscrypt.ct back to summary

public final Enum CertificateEntry.LogEntryType

extends Enum<CertificateEntry.LogEntryType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final CertificateEntry.LogEntryType
public static final CertificateEntry.LogEntryType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static CertificateEntry.LogEntryType
public static CertificateEntry.LogEntryType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

PRECERT_ENTRYback to summary
public static final CertificateEntry.LogEntryType PRECERT_ENTRY
X509_ENTRYback to summary
public static final CertificateEntry.LogEntryType X509_ENTRY

Constructor Detail

LogEntryTypeback to summary
private LogEntryType()

Method Detail

valueOfback to summary
public static CertificateEntry.LogEntryType valueOf(String name)
valuesback to summary
public static CertificateEntry.LogEntryType[] values()