]> git.ipfire.org Git - thirdparty/openssl.git/blame - engines/e_afalg_err.c
Fix intermittent sslapitest early data related failures
[thirdparty/openssl.git] / engines / e_afalg_err.c
CommitLineData
b6cff313 1/*
52df25cf 2 * Generated by util/mkerr.pl DO NOT EDIT
bd19999b 3 * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
7f458a48 4 *
ab3fa1c0 5 * Licensed under the Apache License 2.0 (the "License"). You may not use
b6cff313
RS
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
7f458a48 9 */
10
7f458a48 11#include <openssl/err.h>
12#include "e_afalg_err.h"
13
7f458a48 14#ifndef OPENSSL_NO_ERR
15
7f458a48 16static ERR_STRING_DATA AFALG_str_reasons[] = {
52df25cf
RS
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"},
bd19999b 26 {ERR_PACK(0, 0, AFALG_R_KERNEL_OP_FAILED), "kernel op failed"},
52df25cf
RS
27 {ERR_PACK(0, 0, AFALG_R_MEM_ALLOC_FAILED), "mem alloc failed"},
28 {ERR_PACK(0, 0, AFALG_R_SOCKET_ACCEPT_FAILED), "socket accept failed"},
29 {ERR_PACK(0, 0, AFALG_R_SOCKET_BIND_FAILED), "socket bind failed"},
30 {ERR_PACK(0, 0, AFALG_R_SOCKET_CREATE_FAILED), "socket create failed"},
31 {ERR_PACK(0, 0, AFALG_R_SOCKET_OPERATION_FAILED),
32 "socket operation failed"},
33 {ERR_PACK(0, 0, AFALG_R_SOCKET_SET_KEY_FAILED), "socket set key failed"},
7f458a48 34 {0, NULL}
35};
36
37#endif
38
52df25cf
RS
39static int lib_code = 0;
40static int error_loaded = 0;
7f458a48 41
52df25cf 42static int ERR_load_AFALG_strings(void)
7f458a48 43{
52df25cf
RS
44 if (lib_code == 0)
45 lib_code = ERR_get_next_error_library();
7f458a48 46
52df25cf 47 if (!error_loaded) {
7f458a48 48#ifndef OPENSSL_NO_ERR
52df25cf 49 ERR_load_strings(lib_code, AFALG_str_reasons);
7f458a48 50#endif
52df25cf 51 error_loaded = 1;
7f458a48 52 }
52df25cf 53 return 1;
7f458a48 54}
55
52df25cf 56static void ERR_unload_AFALG_strings(void)
7f458a48 57{
52df25cf 58 if (error_loaded) {
7f458a48 59#ifndef OPENSSL_NO_ERR
52df25cf 60 ERR_unload_strings(lib_code, AFALG_str_reasons);
7f458a48 61#endif
52df25cf 62 error_loaded = 0;
7f458a48 63 }
64}
65
29253e1e 66static void ERR_AFALG_error(int function, int reason, const char *file, int line)
7f458a48 67{
52df25cf
RS
68 if (lib_code == 0)
69 lib_code = ERR_get_next_error_library();
c3612970
RL
70 ERR_raise(lib_code, reason);
71 ERR_set_debug(file, line, NULL);
7f458a48 72}