Documentation ¶
Index ¶
- func CertHexFingerprint(certificate *x509.Certificate) string
- func Confirm(label string) (bool, error)
- func DeriveManagementKey(pin string) *[24]byte
- func GetOrSetManagementKey(yk *piv.YubiKey, pin string) (*[24]byte, error)
- func GetPin() (string, error)
- func GetSlot(slot string) piv.Slot
- func RandomManagementKey() (*[24]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertHexFingerprint ¶
func CertHexFingerprint(certificate *x509.Certificate) string
CertHexFingerprint returns the SHA1 checksum a certificate's raw bytes
func DeriveManagementKey ¶ added in v0.7.0
DeriveManagementKey returns the first 24 bytes of the SHA256 checksum of the given pin
func GetOrSetManagementKey ¶ added in v0.7.0
GetOrSetManagementKey returns the management key from the PIV metadata section. If it's not found, it derives the management key from the PIN, and will then:
- create a new random management key
- set it as the new management key
- store it in the PIV metadata section
- return the newly set management key
func RandomManagementKey ¶ added in v0.7.0
RandomManagementKey returns a *[24]byte slice filled with random byte values
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.