#include <stdbool.h>
#include <stdint.h>
#include "payload.h"
#include "transport.h"
#include "u2f-emu.h"
Go to the source code of this file.
size_t u2f_emu_vdev_apdu_get_response |
( |
void * |
state, |
|
|
uint8_t ** |
data |
|
) |
| |
Get the response frim the APDU transport.
- Parameters
-
state | The APDU transport state. |
data | The data ref buffer to put rhe resonse |
- Returns
- The size of the allocated data.
bool u2f_emu_vdev_apdu_has_response |
( |
void * |
state | ) |
|
Check the precense of a response from the APDU transport.
- Parameters
-
state | The APDU transport state. |
- Returns
- Has response: true. Has no response: false.
void u2f_emu_vdev_apdu_process |
( |
void * |
state, |
|
|
const void * |
apdu, |
|
|
size_t |
size |
|
) |
| |
Process incoming data from an APDU.
- Parameters
-
state | The APDU transport state. |
apdu | The APDU. |
size | The size of the APDU packet. |
void u2f_emu_vdev_apdu_set_apdu |
( |
void * |
state, |
|
|
u2f_emu_apdu |
apdu |
|
) |
| |
Set the APDU formatof the APDU transport.
- Parameters
-
state | The APDU transport state. |
apdu | The APDU format to set. |
void u2f_emu_vdev_apdu_state_free |
( |
void * |
state | ) |
|
Free the APDU state.
- Parameters
-
state | The APDU transport state. |
int u2f_emu_vdev_apdu_state_init |
( |
u2f_emu_vdev * |
vdev, |
|
|
void ** |
state_ref |
|
) |
| |
Init the APDU state.
- Parameters
-
vdev | The virtual device. |
state_ref | The APDU transport state ref. |
- Returns
- Sucess: 0. Failure: -errno.