Record Class SignedCertificateTimestamp

java.lang.Object
java.lang.Record
zeroecho.pkix.ct.SignedCertificateTimestamp
Record Components:
version - SCT version: 0 = v1 (RFC 6962), 1 = v2 (RFC 9162)
logId - 32-byte SHA-256 fingerprint of the CT log's public key
timestamp - the time at which the SCT was issued by the log
extensions - raw TLS-encoded extensions bytes (empty for most logs)
signatureAlgorithm - JCA signature algorithm name (e.g. "SHA256withECDSA")
signature - raw signature bytes from the DigitallySigned structure

public record SignedCertificateTimestamp(int version, byte[] logId, Instant timestamp, byte[] extensions, String signatureAlgorithm, byte[] signature) extends Record
A Signed Certificate Timestamp (SCT) received from a Certificate Transparency log, as defined by RFC 9162 (CT 2.0) and RFC 6962 (CT 1.0).

An SCT is a cryptographically signed promise from a CT log that it has received and will publish a given certificate (or pre-certificate) within a maximum merge delay. SCTs must be embedded in the final certificate before issuance when operating as a publicly trusted CA.

All array fields are defensively copied; the record is immutable and thread-safe.

Since:
1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Required byte length of a CT log ID.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SignedCertificateTimestamp(int version, byte[] logId, Instant timestamp, byte[] extensions, String signatureAlgorithm, byte[] signature)
    Validates and defensively copies all array fields.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    byte[]
    Returns an independent copy of the extensions bytes.
    final int
    Returns a hash code value for this object.
    byte[]
    Returns an independent copy of the log ID bytes.
    byte[]
    Returns an independent copy of the signature bytes.
    Returns the value of the signatureAlgorithm record component.
    Returns the value of the timestamp record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the version record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • LOG_ID_LENGTH

      public static final int LOG_ID_LENGTH
      Required byte length of a CT log ID.
      See Also:
  • Constructor Details

    • SignedCertificateTimestamp

      public SignedCertificateTimestamp(int version, byte[] logId, Instant timestamp, byte[] extensions, String signatureAlgorithm, byte[] signature)
      Validates and defensively copies all array fields.
  • Method Details

    • logId

      public byte[] logId()
      Returns an independent copy of the log ID bytes.
      Returns:
      log ID bytes
    • extensions

      public byte[] extensions()
      Returns an independent copy of the extensions bytes.
      Returns:
      extensions bytes
    • signature

      public byte[] signature()
      Returns an independent copy of the signature bytes.
      Returns:
      signature bytes
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • version

      public int version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • timestamp

      public Instant timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • signatureAlgorithm

      public String signatureAlgorithm()
      Returns the value of the signatureAlgorithm record component.
      Returns:
      the value of the signatureAlgorithm record component