| Line | Count | Source | 
| 1 |  | /* | 
| 2 |  |  * Copyright (c) 2018 Yubico AB. All rights reserved. | 
| 3 |  |  * SPDX-License-Identifier: BSD-2-Clause | 
| 4 |  |  *  | 
| 5 |  |  * Redistribution and use in source and binary forms, with or without | 
| 6 |  |  * modification, are permitted provided that the following conditions are | 
| 7 |  |  * met: | 
| 8 |  |  *  | 
| 9 |  |  *    1. Redistributions of source code must retain the above copyright | 
| 10 |  |  *       notice, this list of conditions and the following disclaimer. | 
| 11 |  |  *    2. Redistributions in binary form must reproduce the above copyright | 
| 12 |  |  *       notice, this list of conditions and the following disclaimer in | 
| 13 |  |  *       the documentation and/or other materials provided with the | 
| 14 |  |  *       distribution. | 
| 15 |  |  *  | 
| 16 |  |  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 
| 17 |  |  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 
| 18 |  |  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 
| 19 |  |  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 
| 20 |  |  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 
| 21 |  |  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 
| 22 |  |  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 
| 23 |  |  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 
| 24 |  |  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 
| 25 |  |  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 
| 26 |  |  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 
| 27 |  |  */ | 
| 28 |  |  | 
| 29 |  | #ifndef _FIDO_ERR_H | 
| 30 |  | #define _FIDO_ERR_H | 
| 31 |  |  | 
| 32 | 4.40M | #define FIDO_ERR_SUCCESS                0x00 | 
| 33 | 3.94k | #define FIDO_ERR_INVALID_COMMAND        0x01 | 
| 34 | 19 | #define FIDO_ERR_INVALID_PARAMETER      0x02 | 
| 35 | 12 | #define FIDO_ERR_INVALID_LENGTH         0x03 | 
| 36 | 15 | #define FIDO_ERR_INVALID_SEQ            0x04 | 
| 37 | 13 | #define FIDO_ERR_TIMEOUT                0x05 | 
| 38 | 13 | #define FIDO_ERR_CHANNEL_BUSY           0x06 | 
| 39 | 16 | #define FIDO_ERR_LOCK_REQUIRED          0x0a | 
| 40 | 16 | #define FIDO_ERR_INVALID_CHANNEL        0x0b | 
| 41 | 16 | #define FIDO_ERR_CBOR_UNEXPECTED_TYPE   0x11 | 
| 42 | 37 | #define FIDO_ERR_INVALID_CBOR           0x12 | 
| 43 | 14 | #define FIDO_ERR_MISSING_PARAMETER      0x14 | 
| 44 | 13 | #define FIDO_ERR_LIMIT_EXCEEDED         0x15 | 
| 45 | 12 | #define FIDO_ERR_UNSUPPORTED_EXTENSION  0x16 | 
| 46 | 13 | #define FIDO_ERR_FP_DATABASE_FULL       0x17 | 
| 47 | 12 | #define FIDO_ERR_LARGEBLOB_STORAGE_FULL 0x18 | 
| 48 | 893 | #define FIDO_ERR_CREDENTIAL_EXCLUDED    0x19 | 
| 49 | 12 | #define FIDO_ERR_PROCESSING             0x21 | 
| 50 | 14 | #define FIDO_ERR_INVALID_CREDENTIAL     0x22 | 
| 51 | 15 | #define FIDO_ERR_USER_ACTION_PENDING    0x23 | 
| 52 | 12 | #define FIDO_ERR_OPERATION_PENDING      0x24 | 
| 53 | 60 | #define FIDO_ERR_NO_OPERATIONS          0x25 | 
| 54 | 13 | #define FIDO_ERR_UNSUPPORTED_ALGORITHM  0x26 | 
| 55 | 12 | #define FIDO_ERR_OPERATION_DENIED       0x27 | 
| 56 | 12 | #define FIDO_ERR_KEY_STORE_FULL         0x28 | 
| 57 | 85 | #define FIDO_ERR_NOT_BUSY               0x29 | 
| 58 | 12 | #define FIDO_ERR_NO_OPERATION_PENDING   0x2a | 
| 59 | 1.46k | #define FIDO_ERR_UNSUPPORTED_OPTION     0x2b | 
| 60 | 13 | #define FIDO_ERR_INVALID_OPTION         0x2c | 
| 61 | 12 | #define FIDO_ERR_KEEPALIVE_CANCEL       0x2d | 
| 62 | 17 | #define FIDO_ERR_NO_CREDENTIALS         0x2e | 
| 63 | 12 | #define FIDO_ERR_USER_ACTION_TIMEOUT    0x2f | 
| 64 | 12 | #define FIDO_ERR_NOT_ALLOWED            0x30 | 
| 65 | 13 | #define FIDO_ERR_PIN_INVALID            0x31 | 
| 66 | 15 | #define FIDO_ERR_PIN_BLOCKED            0x32 | 
| 67 | 12 | #define FIDO_ERR_PIN_AUTH_INVALID       0x33 | 
| 68 | 13 | #define FIDO_ERR_PIN_AUTH_BLOCKED       0x34 | 
| 69 | 14 | #define FIDO_ERR_PIN_NOT_SET            0x35 | 
| 70 | 24 | #define FIDO_ERR_PIN_REQUIRED           0x36 | 
| 71 | 41 | #define FIDO_ERR_PIN_POLICY_VIOLATION   0x37 | 
| 72 | 14 | #define FIDO_ERR_PIN_TOKEN_EXPIRED      0x38 | 
| 73 | 12 | #define FIDO_ERR_REQUEST_TOO_LARGE      0x39 | 
| 74 | 12 | #define FIDO_ERR_ACTION_TIMEOUT         0x3a | 
| 75 | 13 | #define FIDO_ERR_UP_REQUIRED            0x3b | 
| 76 | 12 | #define FIDO_ERR_UV_BLOCKED             0x3c | 
| 77 | 12 | #define FIDO_ERR_UV_INVALID             0x3f | 
| 78 | 13 | #define FIDO_ERR_UNAUTHORIZED_PERM      0x40 | 
| 79 | 14 | #define FIDO_ERR_ERR_OTHER              0x7f | 
| 80 | 16 | #define FIDO_ERR_SPEC_LAST              0xdf | 
| 81 |  |  | 
| 82 |  | /* defined internally */ | 
| 83 | 3.47M | #define FIDO_OK                         FIDO_ERR_SUCCESS | 
| 84 | 4.93k | #define FIDO_ERR_TX                     -1 | 
| 85 | 93.5k | #define FIDO_ERR_RX                     -2 | 
| 86 | 4.28k | #define FIDO_ERR_RX_NOT_CBOR            -3 | 
| 87 | 6.68k | #define FIDO_ERR_RX_INVALID_CBOR        -4 | 
| 88 | 361 | #define FIDO_ERR_INVALID_PARAM          -5 | 
| 89 | 2.60k | #define FIDO_ERR_INVALID_SIG            -6 | 
| 90 | 544k | #define FIDO_ERR_INVALID_ARGUMENT       -7 | 
| 91 | 824 | #define FIDO_ERR_USER_PRESENCE_REQUIRED -8 | 
| 92 | 809k | #define FIDO_ERR_INTERNAL               -9 | 
| 93 | 843 | #define FIDO_ERR_NOTFOUND               -10 | 
| 94 | 8 | #define FIDO_ERR_COMPRESS               -11 | 
| 95 |  |  | 
| 96 |  | #ifdef __cplusplus | 
| 97 |  | extern "C" { | 
| 98 |  | #endif /* __cplusplus */ | 
| 99 |  |  | 
| 100 |  | const char *fido_strerr(int); | 
| 101 |  |  | 
| 102 |  | #ifdef __cplusplus | 
| 103 |  | } /* extern "C" */ | 
| 104 |  | #endif /* __cplusplus */ | 
| 105 |  |  | 
| 106 |  | #endif /* _FIDO_ERR_H */ |