Example #1
0
// 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)
}
Example #2
0
// 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
}