sshkeys

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2015 License: BSD-4-Clause, MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultKeyPath = filepath.Join(config.HomeDir(), ".ssh", "id_rsa")
)

Functions

func PKCS5Or7Unpadding

func PKCS5Or7Unpadding(src []byte) []byte

func ReadPrivateKey

func ReadPrivateKey(path string) (ssh.Signer, error)

func ReadPrivateKeyWithContent

func ReadPrivateKeyWithContent(path string, privateKeyContent []byte) (ssh.Signer, error)

func ReadPrivateKeysFromAgent

func ReadPrivateKeysFromAgent() ([]ssh.Signer, io.Closer, error)

Types

type PasswordMethod

type PasswordMethod func(prompt string) (string, error)

func DummyPasswordMethod

func DummyPasswordMethod(password string) PasswordMethod

type PrivateKey

type PrivateKey struct {
	Path  string
	Block *pem.Block
	PasswordMethod
}

func (*PrivateKey) Decrypt

func (p *PrivateKey) Decrypt() error

func (*PrivateKey) IsCipherImplemented

func (p *PrivateKey) IsCipherImplemented(cipher string) bool

func (*PrivateKey) IsEncrypted

func (p *PrivateKey) IsEncrypted() bool

func (*PrivateKey) Signer

func (p *PrivateKey) Signer() (ssh.Signer, error)

Jump to

Keyboard shortcuts

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