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 keytimestamp- the time at which the SCT was issued by the logextensions- raw TLS-encoded extensions bytes (empty for most logs)signatureAlgorithm- JCA signature algorithm name (e.g."SHA256withECDSA")signature- raw signature bytes from theDigitallySignedstructure
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
FieldsModifier and TypeFieldDescriptionstatic final intRequired byte length of a CT log ID. -
Constructor Summary
ConstructorsConstructorDescriptionSignedCertificateTimestamp(int version, byte[] logId, Instant timestamp, byte[] extensions, String signatureAlgorithm, byte[] signature) Validates and defensively copies all array fields. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.byte[]Returns an independent copy of the extensions bytes.final inthashCode()Returns a hash code value for this object.byte[]logId()Returns an independent copy of the log ID bytes.byte[]Returns an independent copy of the signature bytes.Returns the value of thesignatureAlgorithmrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.intversion()Returns the value of theversionrecord component.
-
Field Details
-
LOG_ID_LENGTH
public static final int LOG_ID_LENGTHRequired byte length of a CT log ID.- See Also:
-
-
Constructor Details
-
SignedCertificateTimestamp
-
-
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
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
version
-
timestamp
-
signatureAlgorithm
Returns the value of thesignatureAlgorithmrecord component.- Returns:
- the value of the
signatureAlgorithmrecord component
-