Documentation ¶
Index ¶
- type ProxyAgent
- func (a *ProxyAgent) Add(key agent.AddedKey) error
- func (a *ProxyAgent) AddIdentities(key ...agent.AddedKey) error
- func (a *ProxyAgent) Extension(extensionType string, contents []byte) ([]byte, error)
- func (a *ProxyAgent) GetExtendedAgentSocketPath() string
- func (a *ProxyAgent) List() ([]*agent.Key, error)
- func (a *ProxyAgent) Lock(passphrase []byte) error
- func (a *ProxyAgent) Remove(key ssh.PublicKey) error
- func (a *ProxyAgent) RemoveAll() error
- func (a *ProxyAgent) SetExtendedAgent(socketPath string)
- func (a *ProxyAgent) Sign(key ssh.PublicKey, data []byte) (*ssh.Signature, error)
- func (a *ProxyAgent) SignWithFlags(key ssh.PublicKey, data []byte, flags agent.SignatureFlags) (*ssh.Signature, error)
- func (a *ProxyAgent) Signers() ([]ssh.Signer, error)
- func (a *ProxyAgent) Unlock(passphrase []byte) error
- type SSHAgent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProxyAgent ¶
type ProxyAgent struct {
// contains filtered or unexported fields
}
func NewProxyAgent ¶
func NewProxyAgent(log types.Logger) *ProxyAgent
NewProxyAgent creates a new ProxyAgent.
func (*ProxyAgent) Add ¶
func (a *ProxyAgent) Add(key agent.AddedKey) error
Add adds a private key to the agent(local). It will not add from extended agent.
func (*ProxyAgent) AddIdentities ¶
func (a *ProxyAgent) AddIdentities(key ...agent.AddedKey) error
AddIdentities adds identities to the agent(local). It not adds identities to the extended agent.
func (*ProxyAgent) Extension ¶
func (a *ProxyAgent) Extension(extensionType string, contents []byte) ([]byte, error)
Extension not supported.
func (*ProxyAgent) GetExtendedAgentSocketPath ¶ added in v1.1.0
func (a *ProxyAgent) GetExtendedAgentSocketPath() string
GetExtendedAgentSocketPath returns the extended agent path.
func (*ProxyAgent) List ¶
func (a *ProxyAgent) List() ([]*agent.Key, error)
List returns the identities known to the agent(local + extended).
func (*ProxyAgent) Lock ¶
func (a *ProxyAgent) Lock(passphrase []byte) error
Lock locks the agent (local + extended).
func (*ProxyAgent) Remove ¶
func (a *ProxyAgent) Remove(key ssh.PublicKey) error
Remove removes identities with the given public key (local). It will not remove from extended agent.
func (*ProxyAgent) RemoveAll ¶
func (a *ProxyAgent) RemoveAll() error
RemoveAll removes all identities (local). It will not remove all from extended agent.
func (*ProxyAgent) SetExtendedAgent ¶
func (a *ProxyAgent) SetExtendedAgent(socketPath string)
SetExtendedAgent sets the extended agent path.
func (*ProxyAgent) Sign ¶
Sign returns a signature by signing data with the given public key (local + extended). Prioritize signing from the local. If signing from the local source fails, then try extended.
func (*ProxyAgent) SignWithFlags ¶
func (a *ProxyAgent) SignWithFlags(key ssh.PublicKey, data []byte, flags agent.SignatureFlags) (*ssh.Signature, error)
SignWithFlags returns a signature by signing data with the given public key (local + extended). Prioritize signing from the local. If signing from the local source fails, then try extended.
func (*ProxyAgent) Signers ¶
func (a *ProxyAgent) Signers() ([]ssh.Signer, error)
Signers returns signers for all signers (local + extended).
func (*ProxyAgent) Unlock ¶
func (a *ProxyAgent) Unlock(passphrase []byte) error
Unlock undoes the effect of Lock (local + extended).
type SSHAgent ¶
type SSHAgent struct {
// contains filtered or unexported fields
}
func (*SSHAgent) AddIdentities ¶
AddIdentities adds identities to the agent(local). It not adds identities to the extended agent.
func (*SSHAgent) GetExtendedAgentSocketPath ¶ added in v1.1.0
GetExtendedAgentSocketPath returns the extended agent path.
func (*SSHAgent) Listen ¶
func (s *SSHAgent) Listen()
Listen starts listening on the ssh auth socket.
func (*SSHAgent) SetExtendedAgent ¶
SetExtendedAgent sets the extended agent path.