Package org.bouncycastle.cert.ct
Class SignedCertificateTimestampDataV2
- java.lang.Object
-
- org.bouncycastle.cert.ct.SignedCertificateTimestampDataV2
-
public class SignedCertificateTimestampDataV2 extends java.lang.ObjectThe SCT body carried inside an RFC 9162 (CT v2)TransItemwhose versioned_type isx509_sct_v2(0x0102) orprecert_sct_v2(0x0103).struct { LogID log_id; // opaque LogID<2..127> uint64 timestamp; Extension sct_extensions<0..2^16-1>; opaque signature<1..2^16-1>; } SignedCertificateTimestampDataV2;Notable differences vs the RFC 6962 v1SignedCertificateTimestamp: the log identifier is variable-length (a 1-byte length prefix preceding 2-127 bytes, not a fixed 32-byte SHA-256);sct_extensionsis a structured list ofSctExtensionentries rather than an opaque blob; the signature is plain opaque bytes (no embedded hash / signature algorithm pair — the verifier discovers the algorithm from the log's published key).
-
-
Constructor Summary
Constructors Constructor Description SignedCertificateTimestampDataV2(byte[] logID, long timestamp, SctExtension[] sctExtensions, byte[] signature)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getEncoded()Serialize this v2 SCT body to its TLS wire form (the bytes that would form thedatafield of the containing TransItem).static SignedCertificateTimestampDataV2getInstance(byte[] encoded)Decode the v2 SCT body from its serialized TLS form (the bytes of the containingTransItem.datafield, after the 2-byte versioned_type prefix has been stripped).byte[]getLogID()Variable-length log identifier (2..127 bytes).java.util.ListgetSctExtensions()Decodedsct_extensionsentries; nevernull.byte[]getSignature()Raw signature bytes.longgetTimestamp()Issuance timestamp in milliseconds since the Unix epoch.
-
-
-
Constructor Detail
-
SignedCertificateTimestampDataV2
public SignedCertificateTimestampDataV2(byte[] logID, long timestamp, SctExtension[] sctExtensions, byte[] signature)
-
-
Method Detail
-
getInstance
public static SignedCertificateTimestampDataV2 getInstance(byte[] encoded)
Decode the v2 SCT body from its serialized TLS form (the bytes of the containingTransItem.datafield, after the 2-byte versioned_type prefix has been stripped).
-
getLogID
public byte[] getLogID()
Variable-length log identifier (2..127 bytes).
-
getTimestamp
public long getTimestamp()
Issuance timestamp in milliseconds since the Unix epoch.
-
getSctExtensions
public java.util.List getSctExtensions()
Decodedsct_extensionsentries; nevernull.
-
getSignature
public byte[] getSignature()
Raw signature bytes.
-
getEncoded
public byte[] getEncoded()
Serialize this v2 SCT body to its TLS wire form (the bytes that would form thedatafield of the containing TransItem).
-
-