Documentation
¶
Index ¶
- Variables
- type DB
- func (db *DB) AddKey(id string, k *data.PublicKey) error
- func (db *DB) AddRole(name string, r *data.Role) error
- func (db *DB) GetRole(name string) *Role
- func (db *DB) GetVerifier(id string) (keys.Verifier, error)
- func (db *DB) Unmarshal(b []byte, v interface{}, role string, minVersion int) error
- func (db *DB) UnmarshalIgnoreExpired(b []byte, v interface{}, role string, minVersion int) error
- func (db *DB) UnmarshalTrusted(b []byte, v interface{}, role string) error
- func (db *DB) Verify(s *data.Signed, role string, minVersion int) error
- func (db *DB) VerifyIgnoreExpiredCheck(s *data.Signed, role string, minVersion int) error
- func (db *DB) VerifySignatures(s *data.Signed, role string) error
- type DelegationsVerifier
- type ErrExpired
- type ErrLowVersion
- type ErrRoleThreshold
- type ErrUnknownRole
- type ErrWrongID
- type ErrWrongVersion
- type Role
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") ErrWrongMetaType = errors.New("tuf: meta file has wrong type") ErrExists = errors.New("tuf: key already in db") ErrInvalidKey = errors.New("tuf: invalid key") ErrInvalidRole = errors.New("tuf: invalid role") ErrInvalidDelegatedRole = errors.New("tuf: invalid delegated role") ErrInvalidKeyID = errors.New("tuf: invalid key id") ErrInvalidThreshold = errors.New("tuf: invalid role threshold") )
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) UnmarshalIgnoreExpired ¶
UnmarshalExpired is exactly like Unmarshal except ignores expired timestamp error.
func (*DB) UnmarshalTrusted ¶
func (*DB) VerifyIgnoreExpiredCheck ¶
type DelegationsVerifier ¶
type DelegationsVerifier struct {
DB *DB
}
func NewDelegationsVerifier ¶
func NewDelegationsVerifier(d *data.Delegations) (DelegationsVerifier, error)
NewDelegationsVerifier returns a DelegationsVerifier that verifies delegations of a given Targets. It reuses the DB struct to leverage verified keys, roles unmarshals.
type ErrExpired ¶
func (ErrExpired) Error ¶
func (e ErrExpired) Error() string
type ErrLowVersion ¶
func (ErrLowVersion) Error ¶
func (e ErrLowVersion) Error() string
type ErrRoleThreshold ¶
func (ErrRoleThreshold) Error ¶
func (e ErrRoleThreshold) Error() string
type ErrUnknownRole ¶
type ErrUnknownRole struct {
Role string
}
func (ErrUnknownRole) Error ¶
func (e ErrUnknownRole) Error() string
type ErrWrongID ¶
type ErrWrongID struct{}
func (ErrWrongID) Error ¶
func (ErrWrongID) Error() string
type ErrWrongVersion ¶
func (ErrWrongVersion) Error ¶
func (e ErrWrongVersion) Error() string
Click to show internal directories.
Click to hide internal directories.