agent

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOperationUnsupported = errors.New("operation unsupported")
	ErrNoMatchPrivateKeys   = errors.New("no private keys match the requested public key")
)
View Source
var SSH_TPM_AGENT_ADD = "tpm-add-key"

Functions

func LoadKeys

func LoadKeys(keyDir string) ([]key.SSHTPMKeys, error)

func MarshalTPMKeyMsg added in v0.6.0

func MarshalTPMKeyMsg(cert *sshagent.AddedKey) []byte

func ParseTPMKeyMsg added in v0.6.0

func ParseTPMKeyMsg(req []byte) (*key.SSHTPMKey, error)

Types

type Agent

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

func NewAgent

func NewAgent(listener *net.UnixListener, agents []agent.ExtendedAgent, keyring func() *keyring.ThreadKeyring, tpmFetch func() transport.TPMCloser, ownerPassword func() ([]byte, error), pin func(key.SSHTPMKeys) ([]byte, error)) *Agent

func (*Agent) Add

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

func (*Agent) AddHierarchyKeys added in v0.8.0

func (a *Agent) AddHierarchyKeys(hier string) error

func (*Agent) AddKey

func (a *Agent) AddKey(k *key.SSHTPMKey) error

func (*Agent) AddProxyAgent added in v0.8.0

func (a *Agent) AddProxyAgent(es agent.ExtendedAgent) error

func (*Agent) AddTPMKey added in v0.2.0

func (a *Agent) AddTPMKey(addedkey []byte) ([]byte, error)

func (*Agent) Close

func (a *Agent) Close() error

func (*Agent) Extension

func (a *Agent) Extension(extensionType string, contents []byte) ([]byte, error)

func (*Agent) List

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

func (*Agent) LoadKeys

func (a *Agent) LoadKeys(keys []key.SSHTPMKeys)

func (*Agent) Lock

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

func (*Agent) Remove

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

func (*Agent) RemoveAll

func (a *Agent) RemoveAll() error

func (*Agent) Sign

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

func (*Agent) SignWithFlags

func (a *Agent) SignWithFlags(key ssh.PublicKey, data []byte, flags agent.SignatureFlags) (*ssh.Signature, error)

func (*Agent) Signers

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

func (*Agent) Stop

func (a *Agent) Stop()

func (*Agent) Unlock

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

func (*Agent) Wait

func (a *Agent) Wait()

type TPMKeyMsg added in v0.6.0

type TPMKeyMsg struct {
	Type        string `sshtype:"17|25"`
	PrivateKey  []byte
	CertBytes   []byte
	Constraints []byte `ssh:"rest"`
}

Jump to

Keyboard shortcuts

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