Documentation ¶
Index ¶
Constants ¶
View Source
const ( // KeyTypeEd25519 is the type of Ed25519 keys. KeyTypeEd25519 = KeyType("ed25519") // KeyTypeECDSA is the type of ECDSA keys with SHA2 and P256. KeyTypeECDSA = KeyType("ecdsa") // KeyTypeRSA is the type of RSA keys with RSASSA-PSS and SHA256. KeyTypeRSA = KeyType("rsa") )
View Source
const ( // RoleTypeRoot is The root role delegates trust to specific keys trusted for all other top-level roles used in the system. // https://theupdateframework.github.io/specification/latest/#root RoleTypeRoot = RoleType("root") // RoleTypeTargets is The targets role’s signature indicates which target files are trusted by clients. The targets role signs metadata that describes these files, not the actual target files themselves. // https://theupdateframework.github.io/specification/latest/#targets RoleTypeTargets = RoleType("targets") // RoleTypeSnapshot is The snapshot role signs a metadata file that provides information about the latest version of all targets metadata on the repository // https://theupdateframework.github.io/specification/latest/#snapshot RoleTypeSnapshot = RoleType("snapshot") // RoleTypeTimestamp is To prevent an adversary from replaying an out-of-date signed metadata file whose signature has not yet expired, an automated process periodically signs a timestamped statement containing the hash of the snapshot file. // https://theupdateframework.github.io/specification/latest/#timestamp RoleTypeTimestamp = RoleType("timestamp") )
Variables ¶
View Source
var TopLevelRoles = map[RoleType]struct{}{ RoleTypeRoot: {}, RoleTypeTargets: {}, RoleTypeSnapshot: {}, RoleTypeTimestamp: {}, }
TopLevelRoles is a list of top-level roles defined in the specification https://theupdateframework.github.io/specification/latest/#roles-and-pki
Functions ¶
func DefaultExpires ¶
DefaultExpires returns the default expiration time for a role
Types ¶
type Key ¶
type Key struct { // Type is key type Type KeyType `json:"keytype"` // Value is key value Value json.RawMessage `json:"keyval"` }
Key is common struct for signature and encryption keys
type KeyID ¶
type KeyID data.CorrelationID
KeyID is a type of TUF server key id
func KeyIDFromString ¶
KeyIDFromString returns a new KeyID from a string
type PublicKey ¶
type PublicKey struct { Key // contains filtered or unexported fields }
PublicKey is a public key
type RepoID ¶
type RepoID data.CorrelationID
RepoID is a type of TUF server key id
func RepoIDFromString ¶
RepoIDFromString returns a new RepoID from a string
type RepoKey ¶
type RepoKey struct { // RepoID is the id of the repo RepoID RepoID `json:"repo_id"` // Role is the role of the key Role RoleType `json:"role"` // KeyID is the id of the key KeyID KeyID `json:"key_id"` // Key is the public/private key Key Key `json:"key"` }
RepoKey is a key for a repo
Click to show internal directories.
Click to hide internal directories.