Versions in this module Expand all Collapse all v1 v1.3.0 Apr 11, 2020 Changes in this version + const FormfactorUSBAKeychain + const FormfactorUSBANano + const FormfactorUSBCKeychain + const FormfactorUSBCNano + var DefaultManagementKey = [24]byte + var DefaultPIN = "123456" + var DefaultPUK = "12345678" + var SlotAuthentication = Slot + var SlotCardAuthentication = Slot + var SlotSignature = Slot + func Cards() ([]string, error) + type Algorithm int + const AlgorithmEC256 + const AlgorithmEC384 + const AlgorithmRSA1024 + const AlgorithmRSA2048 + type Attestation struct + Formfactor Formfactor + PINPolicy PINPolicy + Serial uint32 + TouchPolicy TouchPolicy + Version Version + func Verify(attestationCert, slotCert *x509.Certificate) (*Attestation, error) + type Formfactor int + type Key struct + Algorithm Algorithm + PINPolicy PINPolicy + TouchPolicy TouchPolicy + type KeyAuth struct + PIN string + PINPrompt func() (pin string, err error) + type Metadata struct + ManagementKey *[24]byte + type PINPolicy int + const PINPolicyAlways + const PINPolicyNever + const PINPolicyOnce + type Slot struct + Key uint32 + Object uint32 + type TouchPolicy int + const TouchPolicyAlways + const TouchPolicyCached + const TouchPolicyNever + type Version struct + Major int + Minor int + Patch int + type YubiKey struct + func Open(card string) (*YubiKey, error) + func (yk *YubiKey) Attest(slot Slot) (*x509.Certificate, error) + func (yk *YubiKey) AttestationCertificate() (*x509.Certificate, error) + func (yk *YubiKey) Certificate(slot Slot) (*x509.Certificate, error) + func (yk *YubiKey) Close() error + func (yk *YubiKey) GenerateKey(key [24]byte, slot Slot, opts Key) (crypto.PublicKey, error) + func (yk *YubiKey) Metadata(pin string) (*Metadata, error) + func (yk *YubiKey) PrivateKey(slot Slot, public crypto.PublicKey, auth KeyAuth) (crypto.PrivateKey, error) + func (yk *YubiKey) Reset() error + func (yk *YubiKey) Retries() (int, error) + func (yk *YubiKey) Serial() (uint32, error) + func (yk *YubiKey) SetCertificate(key [24]byte, slot Slot, cert *x509.Certificate) error + func (yk *YubiKey) SetManagementKey(oldKey, newKey [24]byte) error + func (yk *YubiKey) SetMetadata(key [24]byte, m *Metadata) error + func (yk *YubiKey) SetPIN(oldPIN, newPIN string) error + func (yk *YubiKey) SetPUK(oldPUK, newPUK string) error + func (yk *YubiKey) Unblock(puk, newPIN string) error