pkg

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMuxAgent

func NewMuxAgent(targets []*Agent, addTarget *Agent) agent.Agent

Types

type Agent

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

func MustNewAgent

func MustNewAgent(path string) *Agent

func (*Agent) Add added in v0.0.3

func (a *Agent) Add(key agent.AddedKey) error

Add adds a private key to the agent.

func (*Agent) List added in v0.0.3

func (a *Agent) List() ([]*agent.Key, error)

List returns the identities known to the agent.

func (*Agent) Lock added in v0.0.3

func (a *Agent) Lock(passphrase []byte) error

Lock locks the agent. Sign and Remove will fail, and List will empty an empty list.

func (*Agent) Remove added in v0.0.3

func (a *Agent) Remove(key ssh.PublicKey) error

Remove removes all identities with the given public key.

func (*Agent) RemoveAll added in v0.0.3

func (a *Agent) RemoveAll() error

RemoveAll removes all identities.

func (*Agent) Sign added in v0.0.3

func (a *Agent) Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error)

Sign has the agent sign the data using a protocol 2 key as defined in [PROTOCOL.agent] section 2.6.2.

func (*Agent) Signers added in v0.0.3

func (a *Agent) Signers() ([]ssh.Signer, error)

Signers returns signers for all the known keys.

func (*Agent) Unlock added in v0.0.3

func (a *Agent) Unlock(passphrase []byte) error

Unlock undoes the effect of Lock

type MuxAgent

type MuxAgent struct {
	AddTarget *Agent
	Targets   []*Agent
}

func (*MuxAgent) Add

func (m *MuxAgent) Add(key agent.AddedKey) error

Add implements agent.Agent

func (*MuxAgent) List

func (m *MuxAgent) List() ([]*agent.Key, error)

List implements agent.Agent

func (*MuxAgent) Lock

func (m *MuxAgent) Lock(passphrase []byte) error

Lock implements agent.Agent

func (*MuxAgent) Remove

func (m *MuxAgent) Remove(key ssh.PublicKey) error

Remove implements agent.Agent

func (*MuxAgent) RemoveAll

func (m *MuxAgent) RemoveAll() error

RemoveAll implements agent.Agent

func (*MuxAgent) Sign

func (m *MuxAgent) Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error)

Sign implements agent.Agent

func (*MuxAgent) Signers

func (m *MuxAgent) Signers() ([]ssh.Signer, error)

Signers implements agent.Agent

func (*MuxAgent) Unlock

func (m *MuxAgent) Unlock(passphrase []byte) error

Unlock implements agent.Agent

Jump to

Keyboard shortcuts

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