yubikey

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSigner added in v0.3.0

func GetSigner(slot string) (*piv.YubiKey, error)

GetSigner returns a piv.YubiKey for the given slot or an error if the given slot doesn't contain a certificate

func Yubikey

func Yubikey() (*piv.YubiKey, error)

Yubikey returns a handle to the first Yubikey found in the system

Types

type Signer added in v0.3.0

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

Signer is a type that implements crypto.Signer using a yubikey

func NewYubikeySigner

func NewYubikeySigner(yk *piv.YubiKey, s piv.Slot) Signer

NewYubikeySigner returns a Signer

func (Signer) Public added in v0.3.0

func (y Signer) Public() crypto.PublicKey

Public implements crypto.Signer

func (Signer) Sign added in v0.3.0

func (y Signer) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error)

Sign implements crypto.Signer

Jump to

Keyboard shortcuts

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