## Coverage Report

#### Created: 2023-09-23 17:42

    /libfido2/src/err.c

    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
     * SPDX-License-Identifier: BSD-2-Clause
    6
     */
    7
    8
    #include "fido/err.h"
    9
    10
    const char *
    11
    fido_strerr(int n)
    12
    9.71k
    {
    13
    9.71k
            switch (n) {
    14
    3.85k
            case FIDO_ERR_SUCCESS:
    15
    3.85k
                    return "FIDO_ERR_SUCCESS";
    16
    29
            case FIDO_ERR_INVALID_COMMAND:
    17
    29
                    return "FIDO_ERR_INVALID_COMMAND";
    18
    18
            case FIDO_ERR_INVALID_PARAMETER:
    19
    18
                    return "FIDO_ERR_INVALID_PARAMETER";
    20
    12
            case FIDO_ERR_INVALID_LENGTH:
    21
    12
                    return "FIDO_ERR_INVALID_LENGTH";
    22
    15
            case FIDO_ERR_INVALID_SEQ:
    23
    15
                    return "FIDO_ERR_INVALID_SEQ";
    24
    13
            case FIDO_ERR_TIMEOUT:
    25
    13
                    return "FIDO_ERR_TIMEOUT";
    26
    13
            case FIDO_ERR_CHANNEL_BUSY:
    27
    13
                    return "FIDO_ERR_CHANNEL_BUSY";
    28
    12
            case FIDO_ERR_LOCK_REQUIRED:
    29
    12
                    return "FIDO_ERR_LOCK_REQUIRED";
    30
    12
            case FIDO_ERR_INVALID_CHANNEL:
    31
    12
                    return "FIDO_ERR_INVALID_CHANNEL";
    32
    13
            case FIDO_ERR_CBOR_UNEXPECTED_TYPE:
    33
    13
                    return "FIDO_ERR_CBOR_UNEXPECTED_TYPE";
    34
    12
            case FIDO_ERR_INVALID_CBOR:
    35
    12
                    return "FIDO_ERR_INVALID_CBOR";
    36
    13
            case FIDO_ERR_MISSING_PARAMETER:
    37
    13
                    return "FIDO_ERR_MISSING_PARAMETER";
    38
    12
            case FIDO_ERR_LIMIT_EXCEEDED:
    39
    12
                    return "FIDO_ERR_LIMIT_EXCEEDED";
    40
    12
            case FIDO_ERR_UNSUPPORTED_EXTENSION:
    41
    12
                    return "FIDO_ERR_UNSUPPORTED_EXTENSION";
    42
    12
            case FIDO_ERR_FP_DATABASE_FULL:
    43
    12
                    return "FIDO_ERR_FP_DATABASE_FULL";
    44
    12
            case FIDO_ERR_LARGEBLOB_STORAGE_FULL:
    45
    12
                    return "FIDO_ERR_LARGEBLOB_STORAGE_FULL";
    46
    12
            case FIDO_ERR_CREDENTIAL_EXCLUDED:
    47
    12
                    return "FIDO_ERR_CREDENTIAL_EXCLUDED";
    48
    12
            case FIDO_ERR_PROCESSING:
    49
    12
                    return "FIDO_ERR_PROCESSING";
    50
    14
            case FIDO_ERR_INVALID_CREDENTIAL:
    51
    14
                    return "FIDO_ERR_INVALID_CREDENTIAL";
    52
    14
            case FIDO_ERR_USER_ACTION_PENDING:
    53
    14
                    return "FIDO_ERR_USER_ACTION_PENDING";
    54
    12
            case FIDO_ERR_OPERATION_PENDING:
    55
    12
                    return "FIDO_ERR_OPERATION_PENDING";
    56
    12
            case FIDO_ERR_NO_OPERATIONS:
    57
    12
                    return "FIDO_ERR_NO_OPERATIONS";
    58
    12
            case FIDO_ERR_UNSUPPORTED_ALGORITHM:
    59
    12
                    return "FIDO_ERR_UNSUPPORTED_ALGORITHM";
    60
    12
            case FIDO_ERR_OPERATION_DENIED:
    61
    12
                    return "FIDO_ERR_OPERATION_DENIED";
    62
    12
            case FIDO_ERR_KEY_STORE_FULL:
    63
    12
                    return "FIDO_ERR_KEY_STORE_FULL";
    64
    48
            case FIDO_ERR_NOT_BUSY:
    65
    48
                    return "FIDO_ERR_NOT_BUSY";
    66
    12
            case FIDO_ERR_NO_OPERATION_PENDING:
    67
    12
                    return "FIDO_ERR_NO_OPERATION_PENDING";
    68
    12
            case FIDO_ERR_UNSUPPORTED_OPTION:
    69
    12
                    return "FIDO_ERR_UNSUPPORTED_OPTION";
    70
    13
            case FIDO_ERR_INVALID_OPTION:
    71
    13
                    return "FIDO_ERR_INVALID_OPTION";
    72
    12
            case FIDO_ERR_KEEPALIVE_CANCEL:
    73
    12
                    return "FIDO_ERR_KEEPALIVE_CANCEL";
    74
    12
            case FIDO_ERR_NO_CREDENTIALS:
    75
    12
                    return "FIDO_ERR_NO_CREDENTIALS";
    76
    12
            case FIDO_ERR_USER_ACTION_TIMEOUT:
    77
    12
                    return "FIDO_ERR_USER_ACTION_TIMEOUT";
    78
    12
            case FIDO_ERR_NOT_ALLOWED:
    79
    12
                    return "FIDO_ERR_NOT_ALLOWED";
    80
    11
            case FIDO_ERR_PIN_INVALID:
    81
    11
                    return "FIDO_ERR_PIN_INVALID";
    82
    15
            case FIDO_ERR_PIN_BLOCKED:
    83
    15
                    return "FIDO_ERR_PIN_BLOCKED";
    84
    11
            case FIDO_ERR_PIN_AUTH_INVALID:
    85
    11
                    return "FIDO_ERR_PIN_AUTH_INVALID";
    86
    13
            case FIDO_ERR_PIN_AUTH_BLOCKED:
    87
    13
                    return "FIDO_ERR_PIN_AUTH_BLOCKED";
    88
    11
            case FIDO_ERR_PIN_NOT_SET:
    89
    11
                    return "FIDO_ERR_PIN_NOT_SET";
    90
    12
            case FIDO_ERR_PIN_REQUIRED:
    91
    12
                    return "FIDO_ERR_PIN_REQUIRED";
    92
    13
            case FIDO_ERR_PIN_POLICY_VIOLATION:
    93
    13
                    return "FIDO_ERR_PIN_POLICY_VIOLATION";
    94
    15
            case FIDO_ERR_PIN_TOKEN_EXPIRED:
    95
    15
                    return "FIDO_ERR_PIN_TOKEN_EXPIRED";
    96
    12
            case FIDO_ERR_REQUEST_TOO_LARGE:
    97
    12
                    return "FIDO_ERR_REQUEST_TOO_LARGE";
    98
    12
            case FIDO_ERR_ACTION_TIMEOUT:
    99
    12
                    return "FIDO_ERR_ACTION_TIMEOUT";
    100
    12
            case FIDO_ERR_UP_REQUIRED:
    101
    12
                    return "FIDO_ERR_UP_REQUIRED";
    102
    12
            case FIDO_ERR_UV_BLOCKED:
    103
    12
                    return "FIDO_ERR_UV_BLOCKED";
    104
    12
            case FIDO_ERR_UV_INVALID:
    105
    12
                    return "FIDO_ERR_UV_INVALID";
    106
    13
            case FIDO_ERR_UNAUTHORIZED_PERM:
    107
    13
                    return "FIDO_ERR_UNAUTHORIZED_PERM";
    108
    16
            case FIDO_ERR_ERR_OTHER:
    109
    16
                    return "FIDO_ERR_ERR_OTHER";
    110
    14
            case FIDO_ERR_SPEC_LAST:
    111
    14
                    return "FIDO_ERR_SPEC_LAST";
    112
    347
            case FIDO_ERR_TX:
    113
    347
                    return "FIDO_ERR_TX";
    114
    2.02k
            case FIDO_ERR_RX:
    115
    2.02k
                    return "FIDO_ERR_RX";
    116
    33
            case FIDO_ERR_RX_NOT_CBOR:
    117
    33
                    return "FIDO_ERR_RX_NOT_CBOR";
    118
    327
            case FIDO_ERR_RX_INVALID_CBOR:
    119
    327
                    return "FIDO_ERR_RX_INVALID_CBOR";
    120
    0
            case FIDO_ERR_INVALID_PARAM:
    121
    0
                    return "FIDO_ERR_INVALID_PARAM";
    122
    0
            case FIDO_ERR_INVALID_SIG:
    123
    0
                    return "FIDO_ERR_INVALID_SIG";
    124
    387
            case FIDO_ERR_INVALID_ARGUMENT:
    125
    387
                    return "FIDO_ERR_INVALID_ARGUMENT";
    126
    0
            case FIDO_ERR_USER_PRESENCE_REQUIRED:
    127
    0
                    return "FIDO_ERR_USER_PRESENCE_REQUIRED";
    128
    0
            case FIDO_ERR_NOTFOUND:
    129
    0
                    return "FIDO_ERR_NOTFOUND";
    130
    0
            case FIDO_ERR_COMPRESS:
    131
    0
                    return "FIDO_ERR_COMPRESS";
    132
    2.04k
            case FIDO_ERR_INTERNAL:
    133
    2.04k
                    return "FIDO_ERR_INTERNAL";
    134
    36
            default:
    135
    36
                    return "FIDO_ERR_UNKNOWN";
    136
    9.71k
            }
    137
    9.71k
    }