yubikit.support

Functions

read_info(conn[, pid])

Reads out DeviceInfo from a YubiKey, or attempts to synthesize the data.

get_name(info, key_type)

Determine the product name of a YubiKey

Module Contents

yubikit.support.read_info(conn, pid=None)[source]

Reads out DeviceInfo from a YubiKey, or attempts to synthesize the data.

Reading DeviceInfo from a ManagementSession is only supported for newer YubiKeys. This function attempts to read that information, but will fall back to gathering the data using other mechanisms if needed. It will also make adjustments to the data if required, for example to “fix” known bad values.

The pid parameter must be provided whenever the YubiKey is connected via USB.

Parameters:
Return type:

yubikit.management.DeviceInfo

yubikit.support.get_name(info, key_type)[source]

Determine the product name of a YubiKey

Parameters:
Return type:

str