Files
ietf-wimse-ect/refimpl/go-lang/ect/errors.go
Christian Nennemann bbf557e54b Restructure refimpl into go-lang and python subdirectories
Move Go reference implementation to refimpl/go-lang/ and add new
Python reference implementation in refimpl/python/. Update build.sh
with renamed draft and simplified tool paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:11:55 +01:00

30 lines
1.7 KiB
Go

package ect
import "errors"
// Sentinel errors for programmatic handling and logging.
var (
ErrPayloadRequired = errors.New("ect: payload and privateKey required")
ErrKeyIDRequired = errors.New("ect: KeyID required")
ErrInvalidTyp = errors.New("ect: invalid typ parameter")
ErrProhibitedAlg = errors.New("ect: prohibited algorithm")
ErrMissingKid = errors.New("ect: missing kid")
ErrUnknownKey = errors.New("ect: unknown key identifier")
ErrWITSubjectMismatch = errors.New("ect: issuer does not match WIT subject")
ErrAudienceMismatch = errors.New("ect: audience does not include verifier")
ErrExpired = errors.New("ect: token expired")
ErrIATTooOld = errors.New("ect: iat too far in the past")
ErrIATInFuture = errors.New("ect: iat in the future")
ErrMissingClaims = errors.New("ect: missing required claims (jti, exec_act, par)")
ErrPolPolDecisionPair = errors.New("ect: pol and pol_decision must both be present when either is set")
ErrInvalidPolDecision = errors.New("ect: invalid pol_decision value")
ErrReplay = errors.New("ect: jti already seen (replay)")
ErrResolveKeyRequired = errors.New("ect: ResolveKey required")
ErrExtSize = errors.New("ect: ext exceeds max size (4096 bytes)")
ErrExtDepth = errors.New("ect: ext exceeds max nesting depth (5)")
ErrInvalidJTI = errors.New("ect: jti must be UUID format")
ErrInvalidWID = errors.New("ect: wid must be UUID format when set")
ErrParLength = errors.New("ect: par exceeds max length")
ErrHashFormat = errors.New("ect: inp_hash/out_hash must be algorithm:base64url (e.g. sha-256:...)")
)