Documentation ¶
Index ¶
- Variables
- func RegisterVerifier(name string, v Verifier)
- func Unmarshal(b []byte, v interface{}, role string, minVersion int, db *keys.DB) error
- func UnmarshalTrusted(b []byte, v interface{}, role string, db *keys.DB) error
- func Verify(s *data.Signed, role string, minVersion int, db *keys.DB) error
- func VerifySignatures(s *data.Signed, role string, db *keys.DB) error
- type CryptoService
- type Ed25519
- type Ed25519Verifier
- type ErrExpired
- type ErrLowVersion
- type KeyService
- type RSAVerifier
- type Signer
- type SigningService
- type Verifier
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingKey = errors.New("tuf: missing key") ErrNoSignatures = errors.New("tuf: data has no signatures") ErrInvalid = errors.New("tuf: signature verification failed") ErrWrongMethod = errors.New("tuf: invalid signature type") ErrUnknownRole = errors.New("tuf: unknown role") ErrRoleThreshold = errors.New("tuf: valid signatures did not meet threshold") ErrWrongType = errors.New("tuf: meta file has wrong type") )
View Source
var Verifiers = map[string]Verifier{ "ed25519": Ed25519Verifier{}, "rsa": RSAVerifier{}, }
Verifiers serves as a map of all verifiers available on the system and can be injected into a verificationService. For testing and configuration purposes, it will not be used by default.
Functions ¶
func RegisterVerifier ¶
RegisterVerifier provides a convenience function for init() functions to register additional verifiers or replace existing ones.
func UnmarshalTrusted ¶
Types ¶
type CryptoService ¶
type CryptoService interface { SigningService KeyService }
type Ed25519 ¶
type Ed25519 struct {
// contains filtered or unexported fields
}
Ed25519 implements a simple in memory keystore and trust service
func NewEd25519 ¶
func NewEd25519() *Ed25519
func (*Ed25519) PublicKeys ¶
type Ed25519Verifier ¶
type Ed25519Verifier struct{}
type ErrExpired ¶
func (ErrExpired) Error ¶
func (e ErrExpired) Error() string
type ErrLowVersion ¶
func (ErrLowVersion) Error ¶
func (e ErrLowVersion) Error() string
type KeyService ¶
type RSAVerifier ¶
type RSAVerifier struct{}
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer encapsulates a signing service with some convenience methods to interface between TUF keys and the generic service interface
func NewSigner ¶
func NewSigner(service CryptoService) *Signer
func (*Signer) PublicKeys ¶
type SigningService ¶
Click to show internal directories.
Click to hide internal directories.