Documentation
¶
Index ¶
Constants ¶
const ( IssuersPrefix = "issuer/" IssuersContentType = "application/pkix-cert" )
Variables ¶
This section is empty.
Functions ¶
func ExtractTimestampFromBundle ¶
ExtractTimestampFromBundle extracts the timestamp from the Nth entry in the provided serialised entry bundle.
This implementation attempts to avoid any unecessary allocation or parsing other than whatever is necessary to skip over uninteresting bytes to find the requested ExtractTimestampFromBundle.
func ParseCTExtensions ¶
parseCTExtensions parses CTExtensions into an index. Code is inspired by https://github.com/FiloSottile/sunlight/blob/main/tile.go.
func UnmarshalTimestamp ¶
UnmarshalText implements encoding/TextUnmarshaler and reads EntryBundles which are encoded using the Static CT API spec.
Types ¶
type Entry ¶
type Entry struct { Timestamp uint64 IsPrecert bool // Certificate holds different things depending on whether the entry represents a Certificate or a Precertificate submission: // - IsPrecert == false: the bytes here are the x509 certificate submitted for logging. // - IsPrecert == true: the bytes here are the TBS certificate extracted from the submitted precert. Certificate []byte // Precertificate holds the precertificate to be logged, only used when IsPrecert is true. Precertificate []byte IssuerKeyHash []byte RawFingerprints string FingerprintsChain [][32]byte RawExtensions string LeafIndex uint64 }
Entry represents a CT log entry.
func (*Entry) UnmarshalText ¶
UnmarshalText implements encoding/TextUnmarshaler and reads EntryBundles which are encoded using the Static CT API spec.
type EntryBundle ¶
type EntryBundle struct { // Entries stores the leaf entries of the log, in order. Entries [][]byte }
EntryBundle represents a sequence of entries in the log. These entries correspond to a leaf tile in the hash tree.
func (*EntryBundle) UnmarshalText ¶
func (t *EntryBundle) UnmarshalText(raw []byte) error
UnmarshalText implements encoding/TextUnmarshaler and reads EntryBundles which are encoded using the Static CT API spec. TODO(phbnf): we can probably parse every individual leaf directly, since most callers of this method tend to do so.