yubikey

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: MIT Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AID_MGR = AID{0xa0, 0x00, 0x00, 0x05, 0x27, 0x47, 0x11, 0x17}
View Source
var AID_OATH = AID{0xa0, 0x00, 0x00, 0x05, 0x27, 0x21, 0x01}
View Source
var AID_OTP = AID{0xA0, 0x00, 0x00, 0x05, 0x27, 0x20, 0x01}
View Source
var GP_INS_SELECT byte = 0xA4
View Source
var OTP_INS_YK2_REQ byte = 0x01
View Source
var SLOT_DEVICE_SERIAL byte = 0x10

Functions

func YubiReaderDiscovererNew

func YubiReaderDiscovererNew(ctx context.Context, eventChanel chan DeviceChangeEvent) (oath.ReaderDiscoverer, error)

Types

type AID

type AID []byte

type DeviceChangeEvent

type DeviceChangeEvent interface {
	Presence() DevicePresence
	Id() string
	Vendor() gousb.ID
	Product() gousb.ID
}

type DevicePresence

type DevicePresence int
const (
	Present DevicePresence = iota
	Removed DevicePresence = iota
)

type INS

type INS byte
const (
	PUT            INS = 0x01
	DELETE         INS = 0x02
	SET_CODE       INS = 0x03
	RESET          INS = 0x04
	LIST           INS = 0xa1
	CALCULATE      INS = 0xa2
	VALIDATE       INS = 0xa3
	CALCULATE_ALL  INS = 0xa4
	SEND_REMAINING INS = 0xa5
)

type Tlv

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

type UsbDeviceMonitor

type UsbDeviceMonitor interface {
	Monitor() (chan DeviceChangeEvent, error)
}

func UdevDeviceMonitorNew

func UdevDeviceMonitorNew(ctx context.Context) (UsbDeviceMonitor, error)

type UsbEvent

type UsbEvent struct {
}

type UsbMonitor

type UsbMonitor interface {
}

type YubikeyReaderStatus

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

func (YubikeyReaderStatus) Availability

func (yrs YubikeyReaderStatus) Availability() oath.ReaderPresence

func (YubikeyReaderStatus) Get

func (YubikeyReaderStatus) Id

func (yrs YubikeyReaderStatus) Id() string

Jump to

Keyboard shortcuts

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