Documentation ¶
Index ¶
- func NewWrappedSignerFromSSHSigner(signer ssh.Signer) crypto.Signer
- type SSHAgentKMS
- func (k *SSHAgentKMS) Close() error
- func (k *SSHAgentKMS) CreateKey(req *apiv1.CreateKeyRequest) (*apiv1.CreateKeyResponse, error)
- func (k *SSHAgentKMS) CreateSigner(req *apiv1.CreateSignerRequest) (crypto.Signer, error)
- func (k *SSHAgentKMS) GetPublicKey(req *apiv1.GetPublicKeyRequest) (crypto.PublicKey, error)
- type WrappedSSHSigner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SSHAgentKMS ¶
type SSHAgentKMS struct {
// contains filtered or unexported fields
}
SSHAgentKMS is a key manager that uses keys provided by ssh-agent
func NewFromAgent ¶
func NewFromAgent(ctx context.Context, opts apiv1.Options, agentClient agent.Agent) (*SSHAgentKMS, error)
NewFromAgent initializes an SSHAgentKMS from a given agent, this method is used for testing purposes.
func (*SSHAgentKMS) Close ¶
func (k *SSHAgentKMS) Close() error
Close closes the agent. This is a noop for the SSHAgentKMS.
func (*SSHAgentKMS) CreateKey ¶
func (k *SSHAgentKMS) CreateKey(req *apiv1.CreateKeyRequest) (*apiv1.CreateKeyResponse, error)
CreateKey generates a new key and returns both public and private key.
func (*SSHAgentKMS) CreateSigner ¶
func (k *SSHAgentKMS) CreateSigner(req *apiv1.CreateSignerRequest) (crypto.Signer, error)
CreateSigner returns a new signer configured with the given signing key.
func (*SSHAgentKMS) GetPublicKey ¶
func (k *SSHAgentKMS) GetPublicKey(req *apiv1.GetPublicKeyRequest) (crypto.PublicKey, error)
GetPublicKey returns the public key from the file passed in the request name.
type WrappedSSHSigner ¶
WrappedSSHSigner is a utility type to wrap a ssh.Signer as a crypto.Signer
func (*WrappedSSHSigner) Public ¶
func (s *WrappedSSHSigner) Public() crypto.PublicKey
Public returns the agent public key. The type of this public key is *agent.Key.
func (*WrappedSSHSigner) Sign ¶
func (s *WrappedSSHSigner) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)
Sign signs the given digest using the ssh agent and returns the signature.