sshagent

package
v0.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2020 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSigningService

func NewSigningService() signing.Service

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

func SetAgentSockName

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.

Types

type Client

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

Client represents an ssh-agent client.

func NewClient

func NewClient() *Client

NewClient returns a new instance of Client.

func (*Client) Close

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

Close implements signing.Service.

func (*Client) Lock

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

Lock will lock the agent using the specified passphrase.

func (*Client) SetAgentSockName

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

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

Signer implements signing.Service.

func (*Client) Unlock

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

Unlock will unlock the agent using the specified passphrase.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL