Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultAuthorizedKeysFile = "~/.ssh/authorized_keys"
)
Variables ¶
View Source
var (
ErrMalformedResp = errors.New("malformed signature response from agent client")
)
Functions ¶
func TagForPayload ¶
TagForPayload returns tag used for payload
Types ¶
type SignatureCreator ¶
type SignatureCreator struct {
// contains filtered or unexported fields
}
func NewSignatureCreator ¶
func NewSignatureCreator(keyring gosshagent.Agent) *SignatureCreator
func NewSignatureCreatorFromSSHAgent ¶
func NewSignatureCreatorFromSSHAgent() (*SignatureCreator, error)
NewSignatureCreatorFromSSHAgent return SignatureCreator which uses ssh-agent to sign
func (*SignatureCreator) Sign ¶
func (sc *SignatureCreator) Sign(tag string, data []byte) (*SignatureSet, error)
Sign generates signature for the data labled by tag
func (*SignatureCreator) SignPayload ¶
func (sc *SignatureCreator) SignPayload(jp *job.JobPayload) (*SignatureSet, error)
SignPayload signs the payload
type SignatureSet ¶
type SignatureVerifier ¶
type SignatureVerifier struct {
// contains filtered or unexported fields
}
func NewSignatureVerifier ¶
func NewSignatureVerifier() *SignatureVerifier
func NewSignatureVerifierFromAuthorizedKeysFile ¶
func NewSignatureVerifierFromAuthorizedKeysFile(filepath string) (*SignatureVerifier, error)
NewSignatureVerifierFromAuthorizedKeysFile return SignatureVerifier which uses authorized key file to verify
func NewSignatureVerifierFromKeyring ¶
func NewSignatureVerifierFromKeyring(keyring gosshagent.Agent) (*SignatureVerifier, error)
NewSignatureVerifierFromKeyring return SignatureVerifier which uses public keys fetched from keyring to verify
func NewSignatureVerifierFromSSHAgent ¶
func NewSignatureVerifierFromSSHAgent() (*SignatureVerifier, error)
NewSignatureVerifierFromSSHAgent return SignatureVerifier which uses ssh-agent to verify
func (*SignatureVerifier) Verify ¶
func (sv *SignatureVerifier) Verify(data []byte, s *SignatureSet) (bool, error)
Verify verifies whether or not data fits the signature
func (*SignatureVerifier) VerifyPayload ¶
func (sc *SignatureVerifier) VerifyPayload(jp *job.JobPayload, s *SignatureSet) (bool, error)
VerifyPayload verifies the payload using signature
Click to show internal directories.
Click to hide internal directories.