ykman.pcsc

Attributes

YK_READER_NAME

Classes

YkmanDevice

YubiKey device reference, with optional PID

ScardSmartCardConnection

A connection to a YubiKey

ScardYubiKeyDevice

YubiKey Smart card device

Functions

kill_scdaemon()

kill_yubikey_agent()

list_readers()

list_devices([name_filter])

Package Contents

class ykman.pcsc.YkmanDevice(transport, fingerprint, pid)[source]

Bases: yubikit.core.YubiKeyDevice

YubiKey device reference, with optional PID

Parameters:
property pid: yubikit.core.PID | None

Return the PID of the YubiKey, if available.

Return type:

Optional[yubikit.core.PID]

__repr__()[source]
ykman.pcsc.YK_READER_NAME = 'yubico yubikey'
class ykman.pcsc.ScardSmartCardConnection(connection)[source]

Bases: yubikit.core.smartcard.SmartCardConnection

A connection to a YubiKey

connection
property transport

Get the transport type of the connection (USB or NFC)

close()[source]

Close the device, releasing any held resources.

send_and_receive(apdu)[source]

Sends a command APDU and returns the response data and sw

class ykman.pcsc.ScardYubiKeyDevice(reader)[source]

Bases: ykman.base.YkmanDevice

YubiKey Smart card device

reader
supports_connection(connection_type)[source]

Check if a YubiKeyDevice supports a specific Connection type

open_connection(connection_type)[source]

Opens a connection to the YubiKey

ykman.pcsc.kill_scdaemon()[source]
ykman.pcsc.kill_yubikey_agent()[source]
ykman.pcsc.list_readers()[source]
ykman.pcsc.list_devices(name_filter=None)[source]