xref: /netbsd-src/crypto/external/bsd/openssl.old/dist/engines/e_afalg_err.c (revision 4724848cf0da353df257f730694b7882798e5daf)
1*4724848cSchristos /*
2*4724848cSchristos  * Generated by util/mkerr.pl DO NOT EDIT
3*4724848cSchristos  * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
4*4724848cSchristos  *
5*4724848cSchristos  * Licensed under the OpenSSL license (the "License").  You may not use
6*4724848cSchristos  * this file except in compliance with the License.  You can obtain a copy
7*4724848cSchristos  * in the file LICENSE in the source distribution or at
8*4724848cSchristos  * https://www.openssl.org/source/license.html
9*4724848cSchristos  */
10*4724848cSchristos 
11*4724848cSchristos #include <openssl/err.h>
12*4724848cSchristos #include "e_afalg_err.h"
13*4724848cSchristos 
14*4724848cSchristos #ifndef OPENSSL_NO_ERR
15*4724848cSchristos 
16*4724848cSchristos static ERR_STRING_DATA AFALG_str_functs[] = {
17*4724848cSchristos     {ERR_PACK(0, AFALG_F_AFALG_CHK_PLATFORM, 0), "afalg_chk_platform"},
18*4724848cSchristos     {ERR_PACK(0, AFALG_F_AFALG_CREATE_SK, 0), "afalg_create_sk"},
19*4724848cSchristos     {ERR_PACK(0, AFALG_F_AFALG_INIT_AIO, 0), "afalg_init_aio"},
20*4724848cSchristos     {ERR_PACK(0, AFALG_F_AFALG_SETUP_ASYNC_EVENT_NOTIFICATION, 0),
21*4724848cSchristos      "afalg_setup_async_event_notification"},
22*4724848cSchristos     {ERR_PACK(0, AFALG_F_AFALG_SET_KEY, 0), "afalg_set_key"},
23*4724848cSchristos     {ERR_PACK(0, AFALG_F_BIND_AFALG, 0), "bind_afalg"},
24*4724848cSchristos     {0, NULL}
25*4724848cSchristos };
26*4724848cSchristos 
27*4724848cSchristos static ERR_STRING_DATA AFALG_str_reasons[] = {
28*4724848cSchristos     {ERR_PACK(0, 0, AFALG_R_EVENTFD_FAILED), "eventfd failed"},
29*4724848cSchristos     {ERR_PACK(0, 0, AFALG_R_FAILED_TO_GET_PLATFORM_INFO),
30*4724848cSchristos     "failed to get platform info"},
31*4724848cSchristos     {ERR_PACK(0, 0, AFALG_R_INIT_FAILED), "init failed"},
32*4724848cSchristos     {ERR_PACK(0, 0, AFALG_R_IO_SETUP_FAILED), "io setup failed"},
33*4724848cSchristos     {ERR_PACK(0, 0, AFALG_R_KERNEL_DOES_NOT_SUPPORT_AFALG),
34*4724848cSchristos     "kernel does not support afalg"},
35*4724848cSchristos     {ERR_PACK(0, 0, AFALG_R_KERNEL_DOES_NOT_SUPPORT_ASYNC_AFALG),
36*4724848cSchristos     "kernel does not support async afalg"},
37*4724848cSchristos     {ERR_PACK(0, 0, AFALG_R_MEM_ALLOC_FAILED), "mem alloc failed"},
38*4724848cSchristos     {ERR_PACK(0, 0, AFALG_R_SOCKET_ACCEPT_FAILED), "socket accept failed"},
39*4724848cSchristos     {ERR_PACK(0, 0, AFALG_R_SOCKET_BIND_FAILED), "socket bind failed"},
40*4724848cSchristos     {ERR_PACK(0, 0, AFALG_R_SOCKET_CREATE_FAILED), "socket create failed"},
41*4724848cSchristos     {ERR_PACK(0, 0, AFALG_R_SOCKET_OPERATION_FAILED),
42*4724848cSchristos     "socket operation failed"},
43*4724848cSchristos     {ERR_PACK(0, 0, AFALG_R_SOCKET_SET_KEY_FAILED), "socket set key failed"},
44*4724848cSchristos     {0, NULL}
45*4724848cSchristos };
46*4724848cSchristos 
47*4724848cSchristos #endif
48*4724848cSchristos 
49*4724848cSchristos static int lib_code = 0;
50*4724848cSchristos static int error_loaded = 0;
51*4724848cSchristos 
ERR_load_AFALG_strings(void)52*4724848cSchristos static int ERR_load_AFALG_strings(void)
53*4724848cSchristos {
54*4724848cSchristos     if (lib_code == 0)
55*4724848cSchristos         lib_code = ERR_get_next_error_library();
56*4724848cSchristos 
57*4724848cSchristos     if (!error_loaded) {
58*4724848cSchristos #ifndef OPENSSL_NO_ERR
59*4724848cSchristos         ERR_load_strings(lib_code, AFALG_str_functs);
60*4724848cSchristos         ERR_load_strings(lib_code, AFALG_str_reasons);
61*4724848cSchristos #endif
62*4724848cSchristos         error_loaded = 1;
63*4724848cSchristos     }
64*4724848cSchristos     return 1;
65*4724848cSchristos }
66*4724848cSchristos 
ERR_unload_AFALG_strings(void)67*4724848cSchristos static void ERR_unload_AFALG_strings(void)
68*4724848cSchristos {
69*4724848cSchristos     if (error_loaded) {
70*4724848cSchristos #ifndef OPENSSL_NO_ERR
71*4724848cSchristos         ERR_unload_strings(lib_code, AFALG_str_functs);
72*4724848cSchristos         ERR_unload_strings(lib_code, AFALG_str_reasons);
73*4724848cSchristos #endif
74*4724848cSchristos         error_loaded = 0;
75*4724848cSchristos     }
76*4724848cSchristos }
77*4724848cSchristos 
ERR_AFALG_error(int function,int reason,char * file,int line)78*4724848cSchristos static void ERR_AFALG_error(int function, int reason, char *file, int line)
79*4724848cSchristos {
80*4724848cSchristos     if (lib_code == 0)
81*4724848cSchristos         lib_code = ERR_get_next_error_library();
82*4724848cSchristos     ERR_PUT_error(lib_code, function, reason, file, line);
83*4724848cSchristos }
84