## Coverage Report

#### Created: 2025-03-01 02:43

next uncovered line (L), next uncovered region (R), next uncovered branch (B)

    /libfido2/src/err.c

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