Documentation ¶
Index ¶
- Constants
- type CheckedVerifier
- type Envelope
- type ErrInvalidThreshold
- type ErrNoMatchingSigs
- type ErrNoSignatures
- type ErrThresholdNotMet
- type FailedVerifier
- type SignOption
- type Signature
- type SignatureTimestamp
- type SignatureTimestampType
- type VerificationOption
- func VerifyWithIntermediates(intermediates ...*x509.Certificate) VerificationOption
- func VerifyWithRoots(roots ...*x509.Certificate) VerificationOption
- func VerifyWithThreshold(threshold int) VerificationOption
- func VerifyWithTimestampVerifiers(verifiers ...timestamp.TimestampVerifier) VerificationOption
- func VerifyWithVerifiers(verifiers ...cryptoutil.Verifier) VerificationOption
Constants ¶
View Source
const PemTypeCertificate = "CERTIFICATE"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckedVerifier ¶ added in v0.4.0
type CheckedVerifier struct { Verifier cryptoutil.Verifier TimestampVerifiers []timestamp.TimestampVerifier Error error }
type Envelope ¶
type Envelope struct { Payload []byte `json:"payload"` PayloadType string `json:"payloadType"` Signatures []Signature `json:"signatures"` }
func (Envelope) Verify ¶
func (e Envelope) Verify(opts ...VerificationOption) ([]CheckedVerifier, error)
type ErrInvalidThreshold ¶
type ErrInvalidThreshold int
func (ErrInvalidThreshold) Error ¶
func (e ErrInvalidThreshold) Error() string
type ErrNoMatchingSigs ¶
type ErrNoMatchingSigs struct {
Verifiers []CheckedVerifier
}
func (ErrNoMatchingSigs) Error ¶
func (e ErrNoMatchingSigs) Error() string
type ErrNoSignatures ¶
type ErrNoSignatures struct{}
func (ErrNoSignatures) Error ¶
func (e ErrNoSignatures) Error() string
type ErrThresholdNotMet ¶
func (ErrThresholdNotMet) Error ¶
func (e ErrThresholdNotMet) Error() string
type FailedVerifier ¶ added in v0.4.0
type FailedVerifier struct{}
type SignOption ¶
type SignOption func(*signOptions)
func SignWithSigners ¶
func SignWithSigners(signers ...cryptoutil.Signer) SignOption
func SignWithTimestampers ¶
func SignWithTimestampers(timestampers ...timestamp.Timestamper) SignOption
type Signature ¶
type Signature struct { KeyID string `json:"keyid"` Signature []byte `json:"sig"` Certificate []byte `json:"certificate,omitempty"` Intermediates [][]byte `json:"intermediates,omitempty"` Timestamps []SignatureTimestamp `json:"timestamps,omitempty"` }
type SignatureTimestamp ¶
type SignatureTimestamp struct { Type SignatureTimestampType `json:"type"` Data []byte `json:"data"` }
type SignatureTimestampType ¶
type SignatureTimestampType string
const TimestampRFC3161 SignatureTimestampType = "tsp"
type VerificationOption ¶
type VerificationOption func(*verificationOptions)
func VerifyWithIntermediates ¶
func VerifyWithIntermediates(intermediates ...*x509.Certificate) VerificationOption
func VerifyWithRoots ¶
func VerifyWithRoots(roots ...*x509.Certificate) VerificationOption
func VerifyWithThreshold ¶
func VerifyWithThreshold(threshold int) VerificationOption
func VerifyWithTimestampVerifiers ¶
func VerifyWithTimestampVerifiers(verifiers ...timestamp.TimestampVerifier) VerificationOption
func VerifyWithVerifiers ¶
func VerifyWithVerifiers(verifiers ...cryptoutil.Verifier) VerificationOption
Click to show internal directories.
Click to hide internal directories.