agent

package
v0.1.4-0...-398b95c Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: BSD-3-Clause Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOperationUnsupported = errors.New("operation unsupported")
View Source
var Version string

Version can be set at link time to override debug.BuildInfo.Main.Version, which is "(devel)" when building from within the module. See golang.org/issue/29814 and golang.org/issue/29228.

Functions

func Run

func Run()

Run executes the agent using the specified socket path

func RunReset

func RunReset(yk *piv.YubiKey)

func RunSetup

func RunSetup(yk *piv.YubiKey)

Types

type Agent

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

Agent holds status of the current agent in use and all yubikeys associated with it

func (*Agent) Add

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

func (*Agent) Close

func (a *Agent) Close() error

Close finish the connection to the YubiKey device and unlock it

func (*Agent) Extension

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

func (*Agent) List

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

List return a list with all available keys

func (*Agent) Lock

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

func (*Agent) Remove

func (a *Agent) Remove(key 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) Unlock

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

type Yubi

type Yubi struct {
	Name   string
	Device *piv.YubiKey
	Serial uint32
}

Yubi contains all the information about a YubiKey

func LoadYubiKeys

func LoadYubiKeys() (yubikeys []*Yubi, err error)

LoadYubiKeys load all connected YubiKeys, it's possible to filter and load only one passing the serial

Jump to

Keyboard shortcuts

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