yubikey

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Scheme = "yubikey"

Scheme is the scheme used in uris.

Variables

This section is empty.

Functions

This section is empty.

Types

type YubiKey

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

YubiKey implements the KMS interface on a YubiKey.

func New

func New(ctx context.Context, opts apiv1.Options) (*YubiKey, error)

New initializes a new YubiKey. TODO(mariano): only one card is currently supported.

func (*YubiKey) Close

func (k *YubiKey) Close() error

Close releases the connection to the YubiKey.

func (*YubiKey) CreateKey

func (k *YubiKey) CreateKey(req *apiv1.CreateKeyRequest) (*apiv1.CreateKeyResponse, error)

CreateKey generates a new key in the YubiKey and returns the public key.

func (*YubiKey) CreateSigner

func (k *YubiKey) CreateSigner(req *apiv1.CreateSignerRequest) (crypto.Signer, error)

CreateSigner creates a signer using the key present in the YubiKey signature slot.

func (*YubiKey) GetPublicKey

func (k *YubiKey) GetPublicKey(req *apiv1.GetPublicKeyRequest) (crypto.PublicKey, error)

GetPublicKey returns the public key present in the YubiKey signature slot.

func (*YubiKey) LoadCertificate

func (k *YubiKey) LoadCertificate(req *apiv1.LoadCertificateRequest) (*x509.Certificate, error)

LoadCertificate implements kms.CertificateManager and loads a certificate from the YubiKey.

func (*YubiKey) StoreCertificate

func (k *YubiKey) StoreCertificate(req *apiv1.StoreCertificateRequest) error

StoreCertificate implements kms.CertificateManager and stores a certificate in the YubiKey.

Jump to

Keyboard shortcuts

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