Coverage Report

Created: 2022-07-22 12:05

/libfido2/src/fido/err.h
Line
Count
Source
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
2.16M
#define FIDO_ERR_SUCCESS                0x00
11
1.58k
#define FIDO_ERR_INVALID_COMMAND        0x01
12
7
#define FIDO_ERR_INVALID_PARAMETER      0x02
13
2
#define FIDO_ERR_INVALID_LENGTH         0x03
14
9
#define FIDO_ERR_INVALID_SEQ            0x04
15
9
#define FIDO_ERR_TIMEOUT                0x05
16
1
#define FIDO_ERR_CHANNEL_BUSY           0x06
17
1
#define FIDO_ERR_LOCK_REQUIRED          0x0a
18
2
#define FIDO_ERR_INVALID_CHANNEL        0x0b
19
1
#define FIDO_ERR_CBOR_UNEXPECTED_TYPE   0x11
20
6
#define FIDO_ERR_INVALID_CBOR           0x12
21
1
#define FIDO_ERR_MISSING_PARAMETER      0x14
22
1
#define FIDO_ERR_LIMIT_EXCEEDED         0x15
23
1
#define FIDO_ERR_UNSUPPORTED_EXTENSION  0x16
24
2
#define FIDO_ERR_FP_DATABASE_FULL       0x17
25
2
#define FIDO_ERR_LARGEBLOB_STORAGE_FULL 0x18
26
535
#define FIDO_ERR_CREDENTIAL_EXCLUDED    0x19
27
8
#define FIDO_ERR_PROCESSING             0x21
28
7
#define FIDO_ERR_INVALID_CREDENTIAL     0x22
29
2
#define FIDO_ERR_USER_ACTION_PENDING    0x23
30
1
#define FIDO_ERR_OPERATION_PENDING      0x24
31
1
#define FIDO_ERR_NO_OPERATIONS          0x25
32
1
#define FIDO_ERR_UNSUPPORTED_ALGORITHM  0x26
33
1
#define FIDO_ERR_OPERATION_DENIED       0x27
34
2
#define FIDO_ERR_KEY_STORE_FULL         0x28
35
4
#define FIDO_ERR_NOT_BUSY               0x29
36
1
#define FIDO_ERR_NO_OPERATION_PENDING   0x2a
37
674
#define FIDO_ERR_UNSUPPORTED_OPTION     0x2b
38
1
#define FIDO_ERR_INVALID_OPTION         0x2c
39
1
#define FIDO_ERR_KEEPALIVE_CANCEL       0x2d
40
2
#define FIDO_ERR_NO_CREDENTIALS         0x2e
41
2
#define FIDO_ERR_USER_ACTION_TIMEOUT    0x2f
42
5
#define FIDO_ERR_NOT_ALLOWED            0x30
43
9
#define FIDO_ERR_PIN_INVALID            0x31
44
7
#define FIDO_ERR_PIN_BLOCKED            0x32
45
8
#define FIDO_ERR_PIN_AUTH_INVALID       0x33
46
1
#define FIDO_ERR_PIN_AUTH_BLOCKED       0x34
47
3
#define FIDO_ERR_PIN_NOT_SET            0x35
48
13
#define FIDO_ERR_PIN_REQUIRED           0x36
49
7
#define FIDO_ERR_PIN_POLICY_VIOLATION   0x37
50
1
#define FIDO_ERR_PIN_TOKEN_EXPIRED      0x38
51
7
#define FIDO_ERR_REQUEST_TOO_LARGE      0x39
52
1
#define FIDO_ERR_ACTION_TIMEOUT         0x3a
53
1
#define FIDO_ERR_UP_REQUIRED            0x3b
54
1
#define FIDO_ERR_UV_BLOCKED             0x3c
55
1
#define FIDO_ERR_UV_INVALID             0x3f
56
1
#define FIDO_ERR_UNAUTHORIZED_PERM      0x40
57
10
#define FIDO_ERR_ERR_OTHER              0x7f
58
1
#define FIDO_ERR_SPEC_LAST              0xdf
59
60
/* defined internally */
61
1.64M
#define FIDO_OK                         FIDO_ERR_SUCCESS
62
2.37k
#define FIDO_ERR_TX                     -1
63
34.6k
#define FIDO_ERR_RX                     -2
64
224
#define FIDO_ERR_RX_NOT_CBOR            -3
65
2.40k
#define FIDO_ERR_RX_INVALID_CBOR        -4
66
157
#define FIDO_ERR_INVALID_PARAM          -5
67
380
#define FIDO_ERR_INVALID_SIG            -6
68
315k
#define FIDO_ERR_INVALID_ARGUMENT       -7
69
279
#define FIDO_ERR_USER_PRESENCE_REQUIRED -8
70
479k
#define FIDO_ERR_INTERNAL               -9
71
199
#define FIDO_ERR_NOTFOUND               -10
72
7
#define FIDO_ERR_COMPRESS               -11
73
74
#ifdef __cplusplus
75
extern "C" {
76
#endif /* __cplusplus */
77
78
const char *fido_strerr(int);
79
80
#ifdef __cplusplus
81
} /* extern "C" */
82
#endif /* __cplusplus */
83
84
#endif /* _FIDO_ERR_H */