detector

package
v0.0.0-...-3b3aaaf Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: ISC Imports: 14 Imported by: 7

Documentation

Index

Constants

View Source
const (
	// https://fidoalliance.org/specs/u2f-specs-master/inc/u2f_hid.h
	// and its backwards-compatible successor
	// https://fidoalliance.org/specs/fido2/fido-client-to-authenticator-protocol-v2.1-rd-20191217.html
	TYPE_INIT          = 0x80
	CTAPHID_MSG        = TYPE_INIT | 0x03
	CTAPHID_KEEPALIVE  = TYPE_INIT | 0x3b
	FIDO_USAGE_PAGE    = 0xf1d0
	FIDO_USAGE_CTAPHID = 0x01
	STATUS_UPNEEDED    = 0x02

	// https://fidoalliance.org/specs/u2f-specs-master/inc/u2f.h
	U2F_SW_CONDITIONS_NOT_SATISFIED = 0x6985

	// https://github.com/torvalds/linux/blob/master/include/linux/hid.h
	HID_ITEM_TYPE_GLOBAL           = 1
	HID_ITEM_TYPE_LOCAL            = 2
	HID_GLOBAL_ITEM_TAG_USAGE_PAGE = 0
	HID_LOCAL_ITEM_TAG_USAGE       = 0
)

Variables

View Source
var (
	// https://github.com/torvalds/linux/blob/master/include/uapi/linux/hidraw.h
	HIDIOCGRDESCSIZE = ioctl.IOR('H', 1, 4)
	HIDIOCGRDESC     = ioctl.IOR('H', 2, unsafe.Sizeof(hidrawDescriptor{}))
)

Functions

func CheckGPGOnRequest

func CheckGPGOnRequest(requestGPGCheck chan bool, notifiers *sync.Map, ctx *gpgme.Context)

CheckGPGOnRequest checks whether YubiKey is actually waiting for a touch on a GPG request

func WatchGPG

func WatchGPG(gpgPubringPath string, requestGPGCheck chan bool)

WatchGPG watches for hints that YubiKey is maybe waiting for a touch on a GPG request

func WatchHMAC

func WatchHMAC(notifiers *sync.Map)

WatchHMAC watches when YubiKey is waiting for a touch on a HMAC request

func WatchSSH

func WatchSSH(requestGPGCheck chan bool, exits *sync.Map)

WatchSSH watches for hints that YubiKey is maybe waiting for a touch on a SSH auth request

func WatchU2F

func WatchU2F(notifiers *sync.Map)

WatchU2F watches when YubiKey is waiting for a touch on a U2F request

Types

This section is empty.

Jump to

Keyboard shortcuts

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