Record Class PreCertificateResult

java.lang.Object
java.lang.Record
zeroecho.pkix.ct.PreCertificateResult
Record Components:
preCertDer - DER-encoded pre-certificate (signed by the issuing CA key)
chainDer - DER-encoded issuer chain in submission order (issuer first, root last)

public record PreCertificateResult(byte[] preCertDer, List<byte[]> chainDer) extends Record
The result of building a CT pre-certificate: a signed pre-cert and its issuer chain, ready for submission to a Certificate Transparency log.

A pre-certificate is a certificate with the same TBSCertificate content as the intended final certificate, except that it carries the CT poison extension (OID 1.3.6.1.4.1.11129.2.4.3) marked critical, and lacks the SCT list extension. CT logs return SCTs in response to pre-certificate submissions; those SCTs are embedded into the final certificate before signing.

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

Since:
1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    PreCertificateResult(byte[] preCertDer, List<byte[]> chainDer)
    Validates and defensively copies all contents.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<byte[]>
    Returns an immutable list of independent copies of the issuer chain DER.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    byte[]
    Returns an independent copy of the pre-certificate DER.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

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

    • PreCertificateResult

      public PreCertificateResult(byte[] preCertDer, List<byte[]> chainDer)
      Validates and defensively copies all contents.
  • Method Details

    • preCertDer

      public byte[] preCertDer()
      Returns an independent copy of the pre-certificate DER.
      Returns:
      pre-certificate DER bytes
    • chainDer

      public List<byte[]> chainDer()
      Returns an immutable list of independent copies of the issuer chain DER.
      Returns:
      issuer chain DER, issuer first
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.