1*b077aed3SPierre Pronchery /*
2*b077aed3SPierre Pronchery * Generated by util/mkerr.pl DO NOT EDIT
3*b077aed3SPierre Pronchery * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
4*b077aed3SPierre Pronchery *
5*b077aed3SPierre Pronchery * Licensed under the Apache License 2.0 (the "License"). You may not use
6*b077aed3SPierre Pronchery * this file except in compliance with the License. You can obtain a copy
7*b077aed3SPierre Pronchery * in the file LICENSE in the source distribution or at
8*b077aed3SPierre Pronchery * https://www.openssl.org/source/license.html
9*b077aed3SPierre Pronchery */
10*b077aed3SPierre Pronchery
11*b077aed3SPierre Pronchery #include <openssl/err.h>
12*b077aed3SPierre Pronchery #include "e_loader_attic_err.h"
13*b077aed3SPierre Pronchery
14*b077aed3SPierre Pronchery #ifndef OPENSSL_NO_ERR
15*b077aed3SPierre Pronchery
16*b077aed3SPierre Pronchery static ERR_STRING_DATA ATTIC_str_reasons[] = {
17*b077aed3SPierre Pronchery {ERR_PACK(0, 0, ATTIC_R_AMBIGUOUS_CONTENT_TYPE), "ambiguous content type"},
18*b077aed3SPierre Pronchery {ERR_PACK(0, 0, ATTIC_R_BAD_PASSWORD_READ), "bad password read"},
19*b077aed3SPierre Pronchery {ERR_PACK(0, 0, ATTIC_R_ERROR_VERIFYING_PKCS12_MAC),
20*b077aed3SPierre Pronchery "error verifying pkcs12 mac"},
21*b077aed3SPierre Pronchery {ERR_PACK(0, 0, ATTIC_R_INIT_FAILED), "init failed"},
22*b077aed3SPierre Pronchery {ERR_PACK(0, 0, ATTIC_R_PASSPHRASE_CALLBACK_ERROR),
23*b077aed3SPierre Pronchery "passphrase callback error"},
24*b077aed3SPierre Pronchery {ERR_PACK(0, 0, ATTIC_R_PATH_MUST_BE_ABSOLUTE), "path must be absolute"},
25*b077aed3SPierre Pronchery {ERR_PACK(0, 0, ATTIC_R_SEARCH_ONLY_SUPPORTED_FOR_DIRECTORIES),
26*b077aed3SPierre Pronchery "search only supported for directories"},
27*b077aed3SPierre Pronchery {ERR_PACK(0, 0, ATTIC_R_UI_PROCESS_INTERRUPTED_OR_CANCELLED),
28*b077aed3SPierre Pronchery "ui process interrupted or cancelled"},
29*b077aed3SPierre Pronchery {ERR_PACK(0, 0, ATTIC_R_UNSUPPORTED_CONTENT_TYPE),
30*b077aed3SPierre Pronchery "unsupported content type"},
31*b077aed3SPierre Pronchery {ERR_PACK(0, 0, ATTIC_R_UNSUPPORTED_SEARCH_TYPE),
32*b077aed3SPierre Pronchery "unsupported search type"},
33*b077aed3SPierre Pronchery {ERR_PACK(0, 0, ATTIC_R_URI_AUTHORITY_UNSUPPORTED),
34*b077aed3SPierre Pronchery "uri authority unsupported"},
35*b077aed3SPierre Pronchery {0, NULL}
36*b077aed3SPierre Pronchery };
37*b077aed3SPierre Pronchery
38*b077aed3SPierre Pronchery #endif
39*b077aed3SPierre Pronchery
40*b077aed3SPierre Pronchery static int lib_code = 0;
41*b077aed3SPierre Pronchery static int error_loaded = 0;
42*b077aed3SPierre Pronchery
ERR_load_ATTIC_strings(void)43*b077aed3SPierre Pronchery static int ERR_load_ATTIC_strings(void)
44*b077aed3SPierre Pronchery {
45*b077aed3SPierre Pronchery if (lib_code == 0)
46*b077aed3SPierre Pronchery lib_code = ERR_get_next_error_library();
47*b077aed3SPierre Pronchery
48*b077aed3SPierre Pronchery if (!error_loaded) {
49*b077aed3SPierre Pronchery #ifndef OPENSSL_NO_ERR
50*b077aed3SPierre Pronchery ERR_load_strings(lib_code, ATTIC_str_reasons);
51*b077aed3SPierre Pronchery #endif
52*b077aed3SPierre Pronchery error_loaded = 1;
53*b077aed3SPierre Pronchery }
54*b077aed3SPierre Pronchery return 1;
55*b077aed3SPierre Pronchery }
56*b077aed3SPierre Pronchery
ERR_unload_ATTIC_strings(void)57*b077aed3SPierre Pronchery static void ERR_unload_ATTIC_strings(void)
58*b077aed3SPierre Pronchery {
59*b077aed3SPierre Pronchery if (error_loaded) {
60*b077aed3SPierre Pronchery #ifndef OPENSSL_NO_ERR
61*b077aed3SPierre Pronchery ERR_unload_strings(lib_code, ATTIC_str_reasons);
62*b077aed3SPierre Pronchery #endif
63*b077aed3SPierre Pronchery error_loaded = 0;
64*b077aed3SPierre Pronchery }
65*b077aed3SPierre Pronchery }
66*b077aed3SPierre Pronchery
ERR_ATTIC_error(int function,int reason,const char * file,int line)67*b077aed3SPierre Pronchery static void ERR_ATTIC_error(int function, int reason, const char *file, int line)
68*b077aed3SPierre Pronchery {
69*b077aed3SPierre Pronchery if (lib_code == 0)
70*b077aed3SPierre Pronchery lib_code = ERR_get_next_error_library();
71*b077aed3SPierre Pronchery ERR_raise(lib_code, reason);
72*b077aed3SPierre Pronchery ERR_set_debug(file, line, NULL);
73*b077aed3SPierre Pronchery }
74