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