Versions in this module Expand all Collapse all v0 v0.0.3 Jul 18, 2026 v0.0.2 Jul 18, 2026 v0.0.1 Jul 6, 2026 Changes in this version + var ErrDeviceAuth = errors.New("mdoc: device authentication failed") + var ErrDeviceMacUnsupported = errors.New("mdoc: deviceMac not supported (use deviceSignature)") + var ErrDeviceResponseStatus = errors.New("mdoc: DeviceResponse reports a non-OK status") + var ErrDigestAlg = errors.New("mdoc: MSO digest algorithm not allowed") + var ErrDocTypeMismatch = errors.New("mdoc: docType mismatch") + var ErrIntegrity = errors.New("mdoc: issuer-data integrity check failed") + var ErrIssuerAuth = errors.New("mdoc: issuer authentication failed") + var ErrMalformed = errors.New("mdoc: malformed") + var ErrStatus = errors.New("mdoc: malformed status extension") + var ErrUnsupported = errors.New("mdoc: unsupported") + var ErrValidity = errors.New("mdoc: outside validity window") + func DevicePresent(ctx context.Context, deviceKey crypto.Signer, issuerSigned []byte, ...) ([]byte, error) + func KnownDocType(docType string) bool + type DeviceAuth struct + DeviceMac cbor.RawMessage + DeviceSignature cbor.RawMessage + type DeviceKeyInfo struct + DeviceKey cbor.RawMessage + KeyAuthorizations cbor.RawMessage + KeyInfo map[int]cbor.RawMessage + type DeviceResponse struct + DocumentErrors []DocumentError + Documents []Document + Status uint + Version string + func DecodeDeviceResponse(raw []byte) (*DeviceResponse, error) + type DeviceSigned struct + DeviceAuth DeviceAuth + NameSpaces cbor.RawMessage + type DigestIDs map[uint][]byte + type Document struct + DeviceSigned DeviceSigned + DocType string + Errors Errors + IssuerSigned IssuerSigned + type DocumentError map[string]int + type DocumentReport struct + DocType string + Elements []ElementReport + KnownDocType bool + func Report(vd VerifiedDocument) DocumentReport + type DocumentTemplate struct + DigestAlg string + DocType string + Namespaces map[string]map[string]any + Status *StatusRef + ValidityInfo ValidityInfo + type ElementReport struct + Identifier string + Known bool + Namespace string + PII bool + TypeValid bool + type Errors map[string]map[string]int + type Issuer struct + func NewIssuer(kp eudicrypto.KeyProvider, keyID string, x5chain [][]byte) *Issuer + func (i *Issuer) Issue(ctx context.Context, doc DocumentTemplate, deviceKey crypto.PublicKey) ([]byte, error) + type IssuerChainResolver func(x5chain [][]byte) (dsKey crypto.PublicKey, err error) + type IssuerNameSpaces map[string][]cbor.RawMessage + type IssuerSigned struct + IssuerAuth cbor.RawMessage + NameSpaces IssuerNameSpaces + type IssuerSignedItem struct + DigestID uint + ElementIdentifier string + ElementValue cbor.RawMessage + Random []byte + type MobileSecurityObject struct + DeviceKeyInfo DeviceKeyInfo + DigestAlgorithm string + DocType string + Status cbor.RawMessage + ValidityInfo ValidityInfo + ValueDigests ValueDigests + Version string + type Option func(*Verifier) + func WithClock(now func() time.Time) Option + type SessionTranscript struct + func OID4VPDCAPIHandover(origin, nonce, jwkThumbprint string) SessionTranscript + func OID4VPHandover(clientID, nonce, jwkThumbprint, responseURI string) SessionTranscript + func (s SessionTranscript) Bytes() []byte + type StatusRef struct + Index uint + Raw map[string]any + URI string + type ValidityInfo struct + ExpectedUpdate *time.Time + Signed time.Time + ValidFrom time.Time + ValidUntil time.Time + type ValueDigests map[string]DigestIDs + type VerifiedDocument struct + DeviceKey crypto.PublicKey + DocType string + MSODigestAlg string + Namespaces map[string]map[string]any + Status *StatusRef + ValidityInfo ValidityInfo + type Verifier struct + func NewVerifier(opts ...Option) *Verifier + func (v *Verifier) Verify(ctx context.Context, in VerifyInput) ([]VerifiedDocument, error) + type VerifyInput struct + DeviceResponse []byte + ExpectedDocType string + IssuerChainResolver IssuerChainResolver + SessionTranscript SessionTranscript