Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByLamportTime ¶
type ByLamportTime []*versionInfo
func (ByLamportTime) Len ¶
func (a ByLamportTime) Len() int
func (ByLamportTime) Less ¶
func (a ByLamportTime) Less(i, j int) bool
func (ByLamportTime) Swap ¶
func (a ByLamportTime) Swap(i, j int)
type Validator ¶
type Validator struct { // FirstKey is the key used to sign the first commit. FirstKey *identity.Key // contains filtered or unexported fields }
func NewValidator ¶
func NewValidator(repo repository.ClockedRepo, backend *cache.RepoCache) (*Validator, error)
NewValidator creates a validator for the current identities snapshot. If identities are changed a new Validator instance should be used.
The returned instance can be used to verify multiple git refs from the main repository against the keychain built from the identities snapshot loaded initially.
func (*Validator) KeyCommitHash ¶
KeyCommitHash reports the hash of the commit associated with the Identity Version introducing the key using the specified keyId, if any.
func (*Validator) ValidateCommit ¶
ValidateCommit checks the commit signature along with the key's expire time. Returns the pubkey used to sign the specified commit, or an error.
func (*Validator) ValidateExternalCommit ¶
ValidateExternalCommit checks the commit (located in another repository) signature along with the key's expire time. Returns the pubkey used to sign the specified commit, or an error.