Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (c) 2018 Yubico AB. All rights reserved. |
3 | | * Use of this source code is governed by a BSD-style |
4 | | * license that can be found in the LICENSE file. |
5 | | */ |
6 | | |
7 | | #ifndef _FIDO_ERR_H |
8 | | #define _FIDO_ERR_H |
9 | | |
10 | 1.83M | #define FIDO_ERR_SUCCESS 0x00 |
11 | 4.09k | #define FIDO_ERR_INVALID_COMMAND 0x01 |
12 | 0 | #define FIDO_ERR_INVALID_PARAMETER 0x02 |
13 | 0 | #define FIDO_ERR_INVALID_LENGTH 0x03 |
14 | 0 | #define FIDO_ERR_INVALID_SEQ 0x04 |
15 | 0 | #define FIDO_ERR_TIMEOUT 0x05 |
16 | 0 | #define FIDO_ERR_CHANNEL_BUSY 0x06 |
17 | 0 | #define FIDO_ERR_LOCK_REQUIRED 0x0a |
18 | 0 | #define FIDO_ERR_INVALID_CHANNEL 0x0b |
19 | 0 | #define FIDO_ERR_CBOR_UNEXPECTED_TYPE 0x11 |
20 | 31 | #define FIDO_ERR_INVALID_CBOR 0x12 |
21 | 0 | #define FIDO_ERR_MISSING_PARAMETER 0x14 |
22 | 0 | #define FIDO_ERR_LIMIT_EXCEEDED 0x15 |
23 | 0 | #define FIDO_ERR_UNSUPPORTED_EXTENSION 0x16 |
24 | 1.21k | #define FIDO_ERR_CREDENTIAL_EXCLUDED 0x19 |
25 | 0 | #define FIDO_ERR_PROCESSING 0x21 |
26 | 0 | #define FIDO_ERR_INVALID_CREDENTIAL 0x22 |
27 | 0 | #define FIDO_ERR_USER_ACTION_PENDING 0x23 |
28 | 0 | #define FIDO_ERR_OPERATION_PENDING 0x24 |
29 | 0 | #define FIDO_ERR_NO_OPERATIONS 0x25 |
30 | 0 | #define FIDO_ERR_UNSUPPORTED_ALGORITHM 0x26 |
31 | 0 | #define FIDO_ERR_OPERATION_DENIED 0x27 |
32 | 0 | #define FIDO_ERR_KEY_STORE_FULL 0x28 |
33 | 0 | #define FIDO_ERR_NOT_BUSY 0x29 |
34 | 0 | #define FIDO_ERR_NO_OPERATION_PENDING 0x2a |
35 | 2.27k | #define FIDO_ERR_UNSUPPORTED_OPTION 0x2b |
36 | 0 | #define FIDO_ERR_INVALID_OPTION 0x2c |
37 | 0 | #define FIDO_ERR_KEEPALIVE_CANCEL 0x2d |
38 | 0 | #define FIDO_ERR_NO_CREDENTIALS 0x2e |
39 | 0 | #define FIDO_ERR_USER_ACTION_TIMEOUT 0x2f |
40 | 0 | #define FIDO_ERR_NOT_ALLOWED 0x30 |
41 | 0 | #define FIDO_ERR_PIN_INVALID 0x31 |
42 | 0 | #define FIDO_ERR_PIN_BLOCKED 0x32 |
43 | 0 | #define FIDO_ERR_PIN_AUTH_INVALID 0x33 |
44 | 0 | #define FIDO_ERR_PIN_AUTH_BLOCKED 0x34 |
45 | 0 | #define FIDO_ERR_PIN_NOT_SET 0x35 |
46 | 0 | #define FIDO_ERR_PIN_REQUIRED 0x36 |
47 | 570 | #define FIDO_ERR_PIN_POLICY_VIOLATION 0x37 |
48 | 0 | #define FIDO_ERR_PIN_TOKEN_EXPIRED 0x38 |
49 | 0 | #define FIDO_ERR_REQUEST_TOO_LARGE 0x39 |
50 | 0 | #define FIDO_ERR_ACTION_TIMEOUT 0x3a |
51 | 0 | #define FIDO_ERR_UP_REQUIRED 0x3b |
52 | 0 | #define FIDO_ERR_ERR_OTHER 0x7f |
53 | 0 | #define FIDO_ERR_SPEC_LAST 0xdf |
54 | | |
55 | | /* defined internally */ |
56 | 1.71M | #define FIDO_OK FIDO_ERR_SUCCESS |
57 | 1.02k | #define FIDO_ERR_TX -1 |
58 | 45.7k | #define FIDO_ERR_RX -2 |
59 | 11.2k | #define FIDO_ERR_RX_NOT_CBOR -3 |
60 | 5.41k | #define FIDO_ERR_RX_INVALID_CBOR -4 |
61 | 131 | #define FIDO_ERR_INVALID_PARAM -5 |
62 | 1.26k | #define FIDO_ERR_INVALID_SIG -6 |
63 | 637k | #define FIDO_ERR_INVALID_ARGUMENT -7 |
64 | 912 | #define FIDO_ERR_USER_PRESENCE_REQUIRED -8 |
65 | 39.6k | #define FIDO_ERR_INTERNAL -9 |
66 | | |
67 | | #ifdef __cplusplus |
68 | | extern "C" { |
69 | | #endif /* __cplusplus */ |
70 | | |
71 | | const char *fido_strerr(int); |
72 | | |
73 | | #ifdef __cplusplus |
74 | | } /* extern "C" */ |
75 | | #endif /* __cplusplus */ |
76 | | |
77 | | #endif /* _FIDO_ERR_H */ |