]> git.ipfire.org Git - thirdparty/openssl.git/blame - engines/e_ossltest_err.c
Regenerate mkerr files
[thirdparty/openssl.git] / engines / e_ossltest_err.c
CommitLineData
b6cff313 1/*
52df25cf 2 * Generated by util/mkerr.pl DO NOT EDIT
cbfa5b03 3 * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
2d5d70b1 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
2d5d70b1
MC
9 */
10
2d5d70b1
MC
11#include <openssl/err.h>
12#include "e_ossltest_err.h"
13
2d5d70b1
MC
14#ifndef OPENSSL_NO_ERR
15
2d5d70b1 16static ERR_STRING_DATA OSSLTEST_str_reasons[] = {
52df25cf 17 {ERR_PACK(0, 0, OSSLTEST_R_INIT_FAILED), "init failed"},
2d5d70b1
MC
18 {0, NULL}
19};
20
21#endif
22
52df25cf
RS
23static int lib_code = 0;
24static int error_loaded = 0;
2d5d70b1 25
52df25cf 26static int ERR_load_OSSLTEST_strings(void)
2d5d70b1 27{
52df25cf
RS
28 if (lib_code == 0)
29 lib_code = ERR_get_next_error_library();
2d5d70b1 30
52df25cf 31 if (!error_loaded) {
2d5d70b1 32#ifndef OPENSSL_NO_ERR
52df25cf 33 ERR_load_strings(lib_code, OSSLTEST_str_reasons);
2d5d70b1 34#endif
52df25cf 35 error_loaded = 1;
2d5d70b1 36 }
52df25cf 37 return 1;
2d5d70b1
MC
38}
39
40static void ERR_unload_OSSLTEST_strings(void)
41{
52df25cf 42 if (error_loaded) {
2d5d70b1 43#ifndef OPENSSL_NO_ERR
52df25cf 44 ERR_unload_strings(lib_code, OSSLTEST_str_reasons);
2d5d70b1 45#endif
52df25cf 46 error_loaded = 0;
2d5d70b1
MC
47 }
48}
49
50static void ERR_OSSLTEST_error(int function, int reason, char *file, int line)
51{
52df25cf
RS
52 if (lib_code == 0)
53 lib_code = ERR_get_next_error_library();
54 ERR_PUT_error(lib_code, function, reason, file, line);
2d5d70b1 55}