v.io: v.io/x/ref/lib/security/signing/sshagent Index | Files

package sshagent

import "v.io/x/ref/lib/security/signing/sshagent"

Package sshagent provides the ability to use openssh's ssh-agent to carry out key signing operations using keys stored therein. This allows ssh keys to be used as Vanadium principals.

Index

Package Files

sshagent.go

func NewSigningService Uses

func NewSigningService() signing.Service

NewSigningService returns an implementation of signing.Service that uses an ssh-agent to perform signing operations.

func SetAgentSockName Uses

func SetAgentSockName(service signing.Service, name string)

SetAgentSockName will call the SetAgentSockName method on the specified signing.Service iff it is an instance of sshagent.Client.

type Client Uses

type Client struct {
    // contains filtered or unexported fields
}

Client represents an ssh-agent client.

func NewClient Uses

func NewClient() *Client

NewClient returns a new instance of Client.

func (*Client) Close Uses

func (ac *Client) Close(ctx context.Context) error

Close implements signing.Service.

func (*Client) Lock Uses

func (ac *Client) Lock(passphrase []byte) error

Lock will lock the agent using the specified passphrase.

func (*Client) SetAgentSockName Uses

func (ac *Client) SetAgentSockName(name string)

SetAgentSockName specifies the name of the unix domain socket to use to communicate with the agent. It must be called before any other method, otherwise the value of the SSH_AUTH_SOCK environment variable is used.

func (*Client) Signer Uses

func (ac *Client) Signer(ctx context.Context, publicKeyFile string, passphrase []byte) (s security.Signer, err error)

Signer implements signing.Service.

func (*Client) Unlock Uses

func (ac *Client) Unlock(passphrase []byte) error

Unlock will unlock the agent using the specified passphrase.

Package sshagent imports 12 packages (graph) and is imported by 2 packages. Updated 2020-10-22. Refresh now. Tools for package owners.