agent

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SSH_AGENT_FAILURE             = 5
	SSH_AGENTC_REQUEST_IDENTITIES = 11
	SSH_AGENT_IDENTITIES_ANSWER   = 12
	SSH_AGENTC_SIGN_REQUEST       = 13
	SSH_AGENT_SIGN_RESPONSE       = 14
)

Variables

View Source
var NoPEMError = errors.New("not a PEM file")

Functions

func ReadPrivateKeyFile

func ReadPrivateKeyFile(fileName string) (crypto.Signer, error)

Reads an ASCII format private key. Supports only the case of a single unencrypted key.

func ServeAgent

func ServeAgent(r io.Reader, w io.Writer, keys map[string]SSHSign) error

The map keys are SSH public key blobs (without outer length field).

Types

type SSHSign

type SSHSign func([]byte) ([]byte, error)

Returns signature formatted as an SSH signature (without outer length field).

func SSHFromEd25519

func SSHFromEd25519(signer crypto.Signer) (string, SSHSign, error)

Jump to

Keyboard shortcuts

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