示例#1
0
文件: sign.go 项目: BillTheBest/fleet
// NewSignatureVerifierFromSSHAgent return SignatureVerifier which uses public keys in the local ssh-agent to verify signatures
func NewSignatureVerifierFromSSHAgent() (*SignatureVerifier, error) {
	keyring, err := ssh.SSHAgentClient()
	if err != nil {
		return nil, err
	}
	return NewSignatureVerifierFromKeyring(keyring)
}
示例#2
0
文件: sign.go 项目: BillTheBest/fleet
// NewSignatureCreatorFromSSHAgent return a SignatureCreator which uses the local ssh-agent as its keyring
func NewSignatureCreatorFromSSHAgent() (*SignatureCreator, error) {
	keyring, err := ssh.SSHAgentClient()
	if err != nil {
		return nil, err
	}
	return &SignatureCreator{keyring}, nil
}