yubikey

package
v0.14.5-rc.2.100MB.bad... Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

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