Documentation
¶
Overview ¶
Package wpsigntest is a test-only signer that mirrors Woodpecker's RFC-9421 extension-request signature [WP§8] so internal/wpsign.Verify can be exercised against a faithful, byte-compatible signature without a real Woodpecker server. It is imported by tests only; it is not part of ironbark's runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Opts ¶
type Opts struct {
// OmitCreated disables the signed "created" parameter entirely.
OmitCreated bool
// Components, if non-nil, overrides the set of covered components
// (default: @request-target, content-digest).
Components []string
// TamperBodyAfterSign, if non-nil, replaces the request body (and
// ContentLength) with this content AFTER signing, so any Content-Digest
// that was signed no longer matches.
TamperBodyAfterSign []byte
// OmitDigestHeader removes the Content-Digest header AFTER signing,
// even though it was covered by the signature.
OmitDigestHeader bool
}
Opts controls deliberate deviations from a faithful Woodpecker signature, for exercising wpsign.Verify's failure taxonomy. The zero value produces no deviation; use Sign for the faithful case.
There is deliberately no way to forge the "created" timestamp: this harness only ever emits real, validly-signed requests (created = actual signing time). Task 5's stale/future-created matrix cases are exercised by advancing the *verifier's* injected `now` (wpsign.Verify's `now func() time.Time` parameter), not by forging the signer's clock.