xref: /netbsd-src/crypto/external/bsd/openssl/dist/engines/e_dasync_err.c (revision b0d1725196a7921d003d2c66a14f186abda4176b)
1c7da899bSchristos /*
213d40330Schristos  * Generated by util/mkerr.pl DO NOT EDIT
3*b0d17251Schristos  * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
4c7da899bSchristos  *
5*b0d17251Schristos  * Licensed under the Apache License 2.0 (the "License").  You may not use
6c7da899bSchristos  * this file except in compliance with the License.  You can obtain a copy
7c7da899bSchristos  * in the file LICENSE in the source distribution or at
8c7da899bSchristos  * https://www.openssl.org/source/license.html
9c7da899bSchristos  */
10c7da899bSchristos 
11c7da899bSchristos #include <openssl/err.h>
12c7da899bSchristos #include "e_dasync_err.h"
13c7da899bSchristos 
14c7da899bSchristos #ifndef OPENSSL_NO_ERR
15c7da899bSchristos 
16c7da899bSchristos static ERR_STRING_DATA DASYNC_str_reasons[] = {
1713d40330Schristos     {ERR_PACK(0, 0, DASYNC_R_INIT_FAILED), "init failed"},
18c7da899bSchristos     {0, NULL}
19c7da899bSchristos };
20c7da899bSchristos 
21c7da899bSchristos #endif
22c7da899bSchristos 
2313d40330Schristos static int lib_code = 0;
2413d40330Schristos static int error_loaded = 0;
25c7da899bSchristos 
ERR_load_DASYNC_strings(void)2613d40330Schristos static int ERR_load_DASYNC_strings(void)
27c7da899bSchristos {
2813d40330Schristos     if (lib_code == 0)
2913d40330Schristos         lib_code = ERR_get_next_error_library();
30c7da899bSchristos 
3113d40330Schristos     if (!error_loaded) {
32c7da899bSchristos #ifndef OPENSSL_NO_ERR
3313d40330Schristos         ERR_load_strings(lib_code, DASYNC_str_reasons);
34c7da899bSchristos #endif
3513d40330Schristos         error_loaded = 1;
36c7da899bSchristos     }
3713d40330Schristos     return 1;
38c7da899bSchristos }
39c7da899bSchristos 
ERR_unload_DASYNC_strings(void)40c7da899bSchristos static void ERR_unload_DASYNC_strings(void)
41c7da899bSchristos {
4213d40330Schristos     if (error_loaded) {
43c7da899bSchristos #ifndef OPENSSL_NO_ERR
4413d40330Schristos         ERR_unload_strings(lib_code, DASYNC_str_reasons);
45c7da899bSchristos #endif
4613d40330Schristos         error_loaded = 0;
47c7da899bSchristos     }
48c7da899bSchristos }
49c7da899bSchristos 
ERR_DASYNC_error(int function,int reason,const char * file,int line)50*b0d17251Schristos static void ERR_DASYNC_error(int function, int reason, const char *file, int line)
51c7da899bSchristos {
5213d40330Schristos     if (lib_code == 0)
5313d40330Schristos         lib_code = ERR_get_next_error_library();
54*b0d17251Schristos     ERR_raise(lib_code, reason);
55*b0d17251Schristos     ERR_set_debug(file, line, NULL);
56c7da899bSchristos }
57