Documentation
¶
Overview ¶
Package timestamp implements ports.TimestampAuthority with an RFC-3161 client: it anchors a custody chain head to an EXTERNAL trusted timestamp, so a head can be proven to have existed before a given instant independent of the server's own ed25519 key – i.e. tamper-PROOF, not just tamper-evident (append-only, tamper-evident custody). ASN.1/CMS is handled by github.com/digitorus/timestamp (never hand-rolled).
Token verification (VerifyToken) lives here, not in the domain, because RFC-3161 + CMS are not stdlib (unlike the ed25519 attestation in domain/evidence). It proves the token binds the digest and that the token's own CMS signature is intact; it does NOT decide whether the issuing TSA is trusted – that is the verifier's policy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyToken ¶
VerifyToken re-parses an opaque RFC-3161 token, confirms it binds digest (its messageImprint == SHA-256(digest)) and that the token's CMS signature is intact, and returns the asserted time. Whether the issuing TSA is trusted is the caller's policy (pin the TSA cert / require an eIDAS-qualified authority).
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an RFC-3161 timestamp client bound to one TSA URL.
func NewClient ¶
NewClient validates the TSA URL and returns a client. A non-positive timeout uses a default; the timeout bounds the seal-path call so a slow TSA cannot hang it (the vault treats timestamping as best-effort).