dsse

package
v0.0.1-alpha9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const PemTypeCertificate = "CERTIFICATE"

Variables

This section is empty.

Functions

This section is empty.

Types

type Envelope

type Envelope struct {
	Payload     []byte      `json:"payload"`
	PayloadType string      `json:"payloadType"`
	Signatures  []Signature `json:"signatures"`
}

func Sign

func Sign(bodyType string, body io.Reader, signers ...cryptoutil.Signer) (Envelope, error)

TODO: it'd be nice to break some of this logic out of what should be a presentation layer only

func (Envelope) Verify

func (e Envelope) Verify(opts ...VerificationOption) ([]cryptoutil.Verifier, error)

type ErrNoMatchingSigs

type ErrNoMatchingSigs struct{}

func (ErrNoMatchingSigs) Error

func (e ErrNoMatchingSigs) Error() string

type ErrNoSignatures

type ErrNoSignatures struct{}

func (ErrNoSignatures) Error

func (e ErrNoSignatures) Error() string

type Signature

type Signature struct {
	KeyID         string   `json:"keyid"`
	Signature     []byte   `json:"sig"`
	Certificate   []byte   `json:"certificate,omitempty"`
	Intermediates [][]byte `json:"intermediates,omitempty"`
}

type VerificationOption

type VerificationOption func(*verificationOptions)

func WithIntermediates

func WithIntermediates(intermediates []*x509.Certificate) VerificationOption

func WithRoots

func WithRoots(roots []*x509.Certificate) VerificationOption

func WithVerifiers

func WithVerifiers(verifiers []cryptoutil.Verifier) VerificationOption

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL