xref: /freebsd/crypto/openssl/engines/e_dasync_err.c (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim /*
2e71b7053SJung-uk Kim  * Generated by util/mkerr.pl DO NOT EDIT
3*b077aed3SPierre Pronchery  * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
4e71b7053SJung-uk Kim  *
5*b077aed3SPierre Pronchery  * Licensed under the Apache License 2.0 (the "License").  You may not use
6e71b7053SJung-uk Kim  * this file except in compliance with the License.  You can obtain a copy
7e71b7053SJung-uk Kim  * in the file LICENSE in the source distribution or at
8e71b7053SJung-uk Kim  * https://www.openssl.org/source/license.html
9e71b7053SJung-uk Kim  */
10e71b7053SJung-uk Kim 
11e71b7053SJung-uk Kim #include <openssl/err.h>
12e71b7053SJung-uk Kim #include "e_dasync_err.h"
13e71b7053SJung-uk Kim 
14e71b7053SJung-uk Kim #ifndef OPENSSL_NO_ERR
15e71b7053SJung-uk Kim 
16e71b7053SJung-uk Kim static ERR_STRING_DATA DASYNC_str_reasons[] = {
17e71b7053SJung-uk Kim     {ERR_PACK(0, 0, DASYNC_R_INIT_FAILED), "init failed"},
18e71b7053SJung-uk Kim     {0, NULL}
19e71b7053SJung-uk Kim };
20e71b7053SJung-uk Kim 
21e71b7053SJung-uk Kim #endif
22e71b7053SJung-uk Kim 
23e71b7053SJung-uk Kim static int lib_code = 0;
24e71b7053SJung-uk Kim static int error_loaded = 0;
25e71b7053SJung-uk Kim 
ERR_load_DASYNC_strings(void)26e71b7053SJung-uk Kim static int ERR_load_DASYNC_strings(void)
27e71b7053SJung-uk Kim {
28e71b7053SJung-uk Kim     if (lib_code == 0)
29e71b7053SJung-uk Kim         lib_code = ERR_get_next_error_library();
30e71b7053SJung-uk Kim 
31e71b7053SJung-uk Kim     if (!error_loaded) {
32e71b7053SJung-uk Kim #ifndef OPENSSL_NO_ERR
33e71b7053SJung-uk Kim         ERR_load_strings(lib_code, DASYNC_str_reasons);
34e71b7053SJung-uk Kim #endif
35e71b7053SJung-uk Kim         error_loaded = 1;
36e71b7053SJung-uk Kim     }
37e71b7053SJung-uk Kim     return 1;
38e71b7053SJung-uk Kim }
39e71b7053SJung-uk Kim 
ERR_unload_DASYNC_strings(void)40e71b7053SJung-uk Kim static void ERR_unload_DASYNC_strings(void)
41e71b7053SJung-uk Kim {
42e71b7053SJung-uk Kim     if (error_loaded) {
43e71b7053SJung-uk Kim #ifndef OPENSSL_NO_ERR
44e71b7053SJung-uk Kim         ERR_unload_strings(lib_code, DASYNC_str_reasons);
45e71b7053SJung-uk Kim #endif
46e71b7053SJung-uk Kim         error_loaded = 0;
47e71b7053SJung-uk Kim     }
48e71b7053SJung-uk Kim }
49e71b7053SJung-uk Kim 
ERR_DASYNC_error(int function,int reason,const char * file,int line)50*b077aed3SPierre Pronchery static void ERR_DASYNC_error(int function, int reason, const char *file, int line)
51e71b7053SJung-uk Kim {
52e71b7053SJung-uk Kim     if (lib_code == 0)
53e71b7053SJung-uk Kim         lib_code = ERR_get_next_error_library();
54*b077aed3SPierre Pronchery     ERR_raise(lib_code, reason);
55*b077aed3SPierre Pronchery     ERR_set_debug(file, line, NULL);
56e71b7053SJung-uk Kim }
57