Libu2f-emu
0.0.0
Universal 2nd Factor (U2F) Emulation C Library
|
Go to the source code of this file.
Data Structures | |
struct | frame_header |
APDU Frame header. More... | |
Macros | |
#define | __packed __attribute__((__packed__)) |
#define | U2F_REGISTER 0x01 |
#define | U2F_AUTHENTICATE 0x02 |
#define | U2F_VERSION 0x03 |
#define | SW_NO_ERROR 0x9000 |
#define | SW_CONDITIONS_NOT_SATISFIED 0x6985 |
#define | SW_WRONG_DATA 0x6A80 |
#define | SW_WRONG_LENGTH 0x6700 |
#define | SW_CLA_NOT_SUPPORTED 0x6E00 |
#define | SW_INS_NOT_SUPPORTED 0x6D00 |
#define | U2F_AUTH_CHECK 0x07 |
#define | U2F_AUTH_ENFORCE 0x03 |
#define | U2F_AUTH_NO_ENFORCE 0x08 |
#define | VERSION_STR "U2F_V2" |
Functions | |
struct frame_header | __attribute__ ((__packed__)) |
struct payload * | u2f_emu_vdev_raw_generate_error (uint16_t error) |
Generate an error raw payload response. More... | |
struct payload * | u2f_emu_vdev_raw_process (u2f_emu_vdev *vdev, const void *apdu, size_t size) |
Process incoming data from a RAW APDU. More... | |
struct payload * | raw_authenticate (u2f_emu_vdev *vdev, const uint8_t *apdu, size_t size) |
Handle authentification request. More... | |
struct payload * | raw_register (u2f_emu_vdev *vdev, const uint8_t *apdu, size_t size) |
Handle registration request. More... | |
Variables | |
uint8_t | cla |
uint8_t | ins |
uint8_t | p1 |
uint8_t | p2 |
uint8_t | optional [4] |
#define __packed __attribute__((__packed__)) |
#define SW_CLA_NOT_SUPPORTED 0x6E00 |
#define SW_CONDITIONS_NOT_SATISFIED 0x6985 |
#define SW_INS_NOT_SUPPORTED 0x6D00 |
#define SW_NO_ERROR 0x9000 |
#define SW_WRONG_DATA 0x6A80 |
#define SW_WRONG_LENGTH 0x6700 |
#define U2F_AUTH_CHECK 0x07 |
#define U2F_AUTH_ENFORCE 0x03 |
#define U2F_AUTH_NO_ENFORCE 0x08 |
#define U2F_AUTHENTICATE 0x02 |
#define U2F_REGISTER 0x01 |
#define U2F_VERSION 0x03 |
#define VERSION_STR "U2F_V2" |
struct frame_header __attribute__ | ( | (__packed__) | ) |
struct payload* raw_authenticate | ( | u2f_emu_vdev * | vdev, |
const uint8_t * | apdu, | ||
size_t | size | ||
) |
Handle authentification request.
vdev | The virtual device. |
apdu | The apdu data. |
size | The apdu data size. |
struct payload* raw_register | ( | u2f_emu_vdev * | vdev, |
const uint8_t * | apdu, | ||
size_t | size | ||
) |
Handle registration request.
vdev | The virtual device. |
apdu | The apdu data. |
size | The apdu data size. |
struct payload* u2f_emu_vdev_raw_generate_error | ( | uint16_t | error | ) |
Generate an error raw payload response.
error | The error. |
struct payload* u2f_emu_vdev_raw_process | ( | u2f_emu_vdev * | vdev, |
const void * | apdu, | ||
size_t | size | ||
) |
Process incoming data from a RAW APDU.
vdev | The virtual device. |
apdu | The RAW APDU packet. |
size | The size of the RAW APDU packet. |
uint8_t cla |
uint8_t ins |
uint8_t optional[4] |
uint8_t p1 |
uint8_t p2 |