Coverage Report

Created: 2025-06-13 06:58

/src/openssl30/engines/e_afalg_err.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Generated by util/mkerr.pl DO NOT EDIT
3
 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
4
 *
5
 * Licensed under the Apache License 2.0 (the "License").  You may not use
6
 * this file except in compliance with the License.  You can obtain a copy
7
 * in the file LICENSE in the source distribution or at
8
 * https://www.openssl.org/source/license.html
9
 */
10
11
#include <openssl/err.h>
12
#include "e_afalg_err.h"
13
14
#ifndef OPENSSL_NO_ERR
15
16
static ERR_STRING_DATA AFALG_str_reasons[] = {
17
    {ERR_PACK(0, 0, AFALG_R_EVENTFD_FAILED), "eventfd failed"},
18
    {ERR_PACK(0, 0, AFALG_R_FAILED_TO_GET_PLATFORM_INFO),
19
    "failed to get platform info"},
20
    {ERR_PACK(0, 0, AFALG_R_INIT_FAILED), "init failed"},
21
    {ERR_PACK(0, 0, AFALG_R_IO_SETUP_FAILED), "io setup failed"},
22
    {ERR_PACK(0, 0, AFALG_R_KERNEL_DOES_NOT_SUPPORT_AFALG),
23
    "kernel does not support afalg"},
24
    {ERR_PACK(0, 0, AFALG_R_KERNEL_DOES_NOT_SUPPORT_ASYNC_AFALG),
25
    "kernel does not support async afalg"},
26
    {ERR_PACK(0, 0, AFALG_R_MEM_ALLOC_FAILED), "mem alloc failed"},
27
    {ERR_PACK(0, 0, AFALG_R_SOCKET_ACCEPT_FAILED), "socket accept failed"},
28
    {ERR_PACK(0, 0, AFALG_R_SOCKET_BIND_FAILED), "socket bind failed"},
29
    {ERR_PACK(0, 0, AFALG_R_SOCKET_CREATE_FAILED), "socket create failed"},
30
    {ERR_PACK(0, 0, AFALG_R_SOCKET_OPERATION_FAILED),
31
    "socket operation failed"},
32
    {ERR_PACK(0, 0, AFALG_R_SOCKET_SET_KEY_FAILED), "socket set key failed"},
33
    {0, NULL}
34
};
35
36
#endif
37
38
static int lib_code = 0;
39
static int error_loaded = 0;
40
41
static int ERR_load_AFALG_strings(void)
42
0
{
43
0
    if (lib_code == 0)
44
0
        lib_code = ERR_get_next_error_library();
45
46
0
    if (!error_loaded) {
47
0
#ifndef OPENSSL_NO_ERR
48
0
        ERR_load_strings(lib_code, AFALG_str_reasons);
49
0
#endif
50
0
        error_loaded = 1;
51
0
    }
52
0
    return 1;
53
0
}
54
55
static void ERR_unload_AFALG_strings(void)
56
0
{
57
0
    if (error_loaded) {
58
0
#ifndef OPENSSL_NO_ERR
59
0
        ERR_unload_strings(lib_code, AFALG_str_reasons);
60
0
#endif
61
0
        error_loaded = 0;
62
0
    }
63
0
}
64
65
static void ERR_AFALG_error(int function, int reason, const char *file, int line)
66
0
{
67
0
    if (lib_code == 0)
68
0
        lib_code = ERR_get_next_error_library();
69
0
    ERR_raise(lib_code, reason);
70
0
    ERR_set_debug(file, line, NULL);
71
0
}