2 * Generated by util/mkerr.pl DO NOT EDIT
3 * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
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
11 #include <openssl/err.h>
12 #include "e_capi_err.h"
14 #ifndef OPENSSL_NO_ERR
16 static ERR_STRING_DATA CAPI_str_reasons[] = {
17 {ERR_PACK(0, 0, CAPI_R_CANT_CREATE_HASH_OBJECT), "cant create hash object"},
18 {ERR_PACK(0, 0, CAPI_R_CANT_FIND_CAPI_CONTEXT), "cant find capi context"},
19 {ERR_PACK(0, 0, CAPI_R_CANT_GET_KEY), "cant get key"},
20 {ERR_PACK(0, 0, CAPI_R_CANT_SET_HASH_VALUE), "cant set hash value"},
21 {ERR_PACK(0, 0, CAPI_R_CRYPTACQUIRECONTEXT_ERROR),
22 "cryptacquirecontext error"},
23 {ERR_PACK(0, 0, CAPI_R_CRYPTENUMPROVIDERS_ERROR),
24 "cryptenumproviders error"},
25 {ERR_PACK(0, 0, CAPI_R_DECRYPT_ERROR), "decrypt error"},
26 {ERR_PACK(0, 0, CAPI_R_ENGINE_NOT_INITIALIZED), "engine not initialized"},
27 {ERR_PACK(0, 0, CAPI_R_ENUMCONTAINERS_ERROR), "enumcontainers error"},
28 {ERR_PACK(0, 0, CAPI_R_ERROR_ADDING_CERT), "error adding cert"},
29 {ERR_PACK(0, 0, CAPI_R_ERROR_CREATING_STORE), "error creating store"},
30 {ERR_PACK(0, 0, CAPI_R_ERROR_GETTING_FRIENDLY_NAME),
31 "error getting friendly name"},
32 {ERR_PACK(0, 0, CAPI_R_ERROR_GETTING_KEY_PROVIDER_INFO),
33 "error getting key provider info"},
34 {ERR_PACK(0, 0, CAPI_R_ERROR_OPENING_STORE), "error opening store"},
35 {ERR_PACK(0, 0, CAPI_R_ERROR_SIGNING_HASH), "error signing hash"},
36 {ERR_PACK(0, 0, CAPI_R_FILE_OPEN_ERROR), "file open error"},
37 {ERR_PACK(0, 0, CAPI_R_FUNCTION_NOT_SUPPORTED), "function not supported"},
38 {ERR_PACK(0, 0, CAPI_R_GETUSERKEY_ERROR), "getuserkey error"},
39 {ERR_PACK(0, 0, CAPI_R_INVALID_DIGEST_LENGTH), "invalid digest length"},
40 {ERR_PACK(0, 0, CAPI_R_INVALID_DSA_PUBLIC_KEY_BLOB_MAGIC_NUMBER),
41 "invalid dsa public key blob magic number"},
42 {ERR_PACK(0, 0, CAPI_R_INVALID_LOOKUP_METHOD), "invalid lookup method"},
43 {ERR_PACK(0, 0, CAPI_R_INVALID_PUBLIC_KEY_BLOB), "invalid public key blob"},
44 {ERR_PACK(0, 0, CAPI_R_INVALID_RSA_PUBLIC_KEY_BLOB_MAGIC_NUMBER),
45 "invalid rsa public key blob magic number"},
46 {ERR_PACK(0, 0, CAPI_R_PUBKEY_EXPORT_ERROR), "pubkey export error"},
47 {ERR_PACK(0, 0, CAPI_R_PUBKEY_EXPORT_LENGTH_ERROR),
48 "pubkey export length error"},
49 {ERR_PACK(0, 0, CAPI_R_UNKNOWN_COMMAND), "unknown command"},
50 {ERR_PACK(0, 0, CAPI_R_UNSUPPORTED_ALGORITHM_NID),
51 "unsupported algorithm nid"},
52 {ERR_PACK(0, 0, CAPI_R_UNSUPPORTED_PADDING), "unsupported padding"},
53 {ERR_PACK(0, 0, CAPI_R_UNSUPPORTED_PUBLIC_KEY_ALGORITHM),
54 "unsupported public key algorithm"},
55 {ERR_PACK(0, 0, CAPI_R_WIN32_ERROR), "win32 error"},
61 static int lib_code = 0;
62 static int error_loaded = 0;
64 static int ERR_load_CAPI_strings(void)
67 lib_code = ERR_get_next_error_library();
70 #ifndef OPENSSL_NO_ERR
71 ERR_load_strings(lib_code, CAPI_str_reasons);
78 static void ERR_unload_CAPI_strings(void)
81 #ifndef OPENSSL_NO_ERR
82 ERR_unload_strings(lib_code, CAPI_str_reasons);
88 static void ERR_CAPI_error(int function, int reason, char *file, int line)
91 lib_code = ERR_get_next_error_library();
92 ERR_raise(lib_code, reason);
93 ERR_set_debug(file, line, NULL);