Embedded SDK
Embedded SDK
|
#include "u2f_service.h"
Go to the source code of this file.
Functions | |
void | u2f_transport_init (u2f_service_t *service, uint8_t *message_buffer, uint16_t message_buffer_length) |
void | u2f_transport_sent (u2f_service_t *service, u2f_transport_media_t media) |
void | u2f_transport_received (u2f_service_t *service, uint8_t *buffer, uint16_t size, u2f_transport_media_t media) |
bool | u2f_is_channel_broadcast (uint8_t *channel) |
bool | u2f_is_channel_forbidden (uint8_t *channel) |
void | u2f_transport_ctap2_send_keepalive (u2f_service_t *service, uint8_t reason) |
#define CTAP2_CMD_CANCEL 0x91 |
Definition at line 29 of file u2f_transport.h.
#define CTAP2_CMD_CBOR 0x90 |
Definition at line 28 of file u2f_transport.h.
#define CTAP2_STATUS_KEEPALIVE 0xBB |
Definition at line 42 of file u2f_transport.h.
#define ERROR_ACTION_TIMEOUT 0x3A |
Definition at line 87 of file u2f_transport.h.
#define ERROR_CBOR_UNEXPECTED_TYPE 0x11 |
Definition at line 57 of file u2f_transport.h.
#define ERROR_CHANNEL_BUSY 0x06 |
Definition at line 53 of file u2f_transport.h.
#define ERROR_CREDENTIAL_EXCLUDED 0x19 |
Definition at line 62 of file u2f_transport.h.
#define ERROR_INVALID_CBOR 0x12 |
Definition at line 58 of file u2f_transport.h.
#define ERROR_INVALID_CID 0x0b |
Definition at line 55 of file u2f_transport.h.
#define ERROR_INVALID_CMD 0x01 |
Definition at line 46 of file u2f_transport.h.
#define ERROR_INVALID_CREDENTIAL 0x22 |
Definition at line 64 of file u2f_transport.h.
#define ERROR_INVALID_LEN 0x03 |
Definition at line 48 of file u2f_transport.h.
#define ERROR_INVALID_OPTION 0x2C |
Definition at line 73 of file u2f_transport.h.
#define ERROR_INVALID_PAR 0x02 |
Definition at line 47 of file u2f_transport.h.
#define ERROR_INVALID_SEQ 0x04 |
Definition at line 49 of file u2f_transport.h.
#define ERROR_KEEPALIVE_CANCEL 0x2D |
Definition at line 74 of file u2f_transport.h.
#define ERROR_KEY_STORE_FULL 0x28 |
Definition at line 70 of file u2f_transport.h.
#define ERROR_LIMIT_EXCEEDED 0x15 |
Definition at line 60 of file u2f_transport.h.
#define ERROR_LOCK_REQUIRED 0x0a |
Definition at line 54 of file u2f_transport.h.
#define ERROR_MISSING_PARAMETER 0x14 |
Definition at line 59 of file u2f_transport.h.
#define ERROR_MSG_TIMEOUT 0x05 |
Definition at line 50 of file u2f_transport.h.
#define ERROR_NO_CREDENTIALS 0x2E |
Definition at line 75 of file u2f_transport.h.
#define ERROR_NO_OPERATION_PENDING 0x2A |
Definition at line 71 of file u2f_transport.h.
#define ERROR_NO_OPERATIONS 0x25 |
Definition at line 67 of file u2f_transport.h.
#define ERROR_NONE 0x00 |
Definition at line 45 of file u2f_transport.h.
#define ERROR_NOT_ALLOWED 0x30 |
Definition at line 77 of file u2f_transport.h.
#define ERROR_OPERATION_DENIED 0x27 |
Definition at line 69 of file u2f_transport.h.
#define ERROR_OPERATION_PENDING 0x24 |
Definition at line 66 of file u2f_transport.h.
#define ERROR_OTHER 0x7f |
Definition at line 51 of file u2f_transport.h.
#define ERROR_PIN_AUTH_BLOCKED 0x34 |
Definition at line 81 of file u2f_transport.h.
#define ERROR_PIN_AUTH_INVALID 0x33 |
Definition at line 80 of file u2f_transport.h.
#define ERROR_PIN_BLOCKED 0x32 |
Definition at line 79 of file u2f_transport.h.
#define ERROR_PIN_INVALID 0x31 |
Definition at line 78 of file u2f_transport.h.
#define ERROR_PIN_NOT_SET 0x35 |
Definition at line 82 of file u2f_transport.h.
#define ERROR_PIN_POLICY_VIOLATION 0x37 |
Definition at line 84 of file u2f_transport.h.
#define ERROR_PIN_REQUIRED 0x36 |
Definition at line 83 of file u2f_transport.h.
#define ERROR_PIN_TOKEN_EXPIRED 0x38 |
Definition at line 85 of file u2f_transport.h.
#define ERROR_PROCESSING 0x21 |
Definition at line 63 of file u2f_transport.h.
#define ERROR_PROP_COMMAND_TOO_LONG 0x81 |
Definition at line 91 of file u2f_transport.h.
#define ERROR_PROP_CONTINUATION_OVERFLOW 0x84 |
Definition at line 94 of file u2f_transport.h.
#define ERROR_PROP_DEVICE_NOT_SETUP 0x8C |
Definition at line 102 of file u2f_transport.h.
#define ERROR_PROP_INTERNAL_ERROR_APDU 0x89 |
Definition at line 99 of file u2f_transport.h.
#define ERROR_PROP_INVALID_CONTINUATION 0x82 |
Definition at line 92 of file u2f_transport.h.
#define ERROR_PROP_INVALID_DATA_APDU 0x8B |
Definition at line 101 of file u2f_transport.h.
#define ERROR_PROP_INVALID_DATA_LENGTH_APDU 0x88 |
Definition at line 98 of file u2f_transport.h.
#define ERROR_PROP_INVALID_PARAMETERS_APDU 0x8A |
Definition at line 100 of file u2f_transport.h.
#define ERROR_PROP_MEDIA_MIXED 0x8D |
Definition at line 103 of file u2f_transport.h.
#define ERROR_PROP_MESSAGE_TOO_SHORT 0x85 |
Definition at line 95 of file u2f_transport.h.
#define ERROR_PROP_RPID_MEDIA_DENIED 0x8E |
Definition at line 104 of file u2f_transport.h.
#define ERROR_PROP_UNCONSISTENT_MSG_LENGTH 0x86 |
Definition at line 96 of file u2f_transport.h.
#define ERROR_PROP_UNEXPECTED_CONTINUATION 0x83 |
Definition at line 93 of file u2f_transport.h.
#define ERROR_PROP_UNKNOWN_COMMAND 0x80 |
Definition at line 90 of file u2f_transport.h.
#define ERROR_PROP_UNSUPPORTED_MSG_APDU 0x87 |
Definition at line 97 of file u2f_transport.h.
#define ERROR_REQUEST_TOO_LARGE 0x39 |
Definition at line 86 of file u2f_transport.h.
#define ERROR_UNSUPPORTED_ALGORITHM 0x26 |
Definition at line 68 of file u2f_transport.h.
#define ERROR_UNSUPPORTED_EXTENSION 0x16 |
Definition at line 61 of file u2f_transport.h.
#define ERROR_UNSUPPORTED_OPTION 0x2B |
Definition at line 72 of file u2f_transport.h.
#define ERROR_UP_REQUIRED 0x3B |
Definition at line 88 of file u2f_transport.h.
#define ERROR_USER_ACTION_PENDING 0x23 |
Definition at line 65 of file u2f_transport.h.
#define ERROR_USER_ACTION_TIMEOUT 0x2F |
Definition at line 76 of file u2f_transport.h.
#define KEEPALIVE_REASON_PROCESSING 0x01 |
Definition at line 38 of file u2f_transport.h.
#define KEEPALIVE_REASON_TUP_NEEDED 0x02 |
Definition at line 39 of file u2f_transport.h.
#define U2F_CMD_INIT 0x86 |
Definition at line 32 of file u2f_transport.h.
#define U2F_CMD_KEEPALIVE 0x82 |
Definition at line 37 of file u2f_transport.h.
#define U2F_CMD_LOCK 0x84 |
Definition at line 33 of file u2f_transport.h.
#define U2F_CMD_MSG 0x83 |
Definition at line 27 of file u2f_transport.h.
#define U2F_CMD_PING 0x81 |
Definition at line 26 of file u2f_transport.h.
#define U2F_CMD_WINK 0x88 |
Definition at line 34 of file u2f_transport.h.
#define U2F_STATUS_ERROR 0xBF |
Definition at line 41 of file u2f_transport.h.
bool u2f_is_channel_broadcast | ( | uint8_t * | channel | ) |
Returns 0 if the provided channel buffer is not a broadcast channel
bool u2f_is_channel_forbidden | ( | uint8_t * | channel | ) |
Returns 0 if the provided channel buffer is not a forbidden channel
void u2f_transport_ctap2_send_keepalive | ( | u2f_service_t * | service, |
uint8_t | reason | ||
) |
Send a CTAP 2 KEEPALIVE command while processing a CBOR message
void u2f_transport_init | ( | u2f_service_t * | service, |
uint8_t * | message_buffer, | ||
uint16_t | message_buffer_length | ||
) |
Initialize the U2F transport library Incoming messages are store in the provided message buffer. It can be overlapped with io APDU buffer to save RAM (but won't allow for multiple IO model (no mutual exclusion in the buffer access))
void u2f_transport_received | ( | u2f_service_t * | service, |
uint8_t * | buffer, | ||
uint16_t | size, | ||
u2f_transport_media_t | media | ||
) |
Function to be called when an IO message has been received.
void u2f_transport_sent | ( | u2f_service_t * | service, |
u2f_transport_media_t | media | ||
) |
Function to be called when an IO message has been sent.