/src/openssl33/providers/common/provider_err.c
Line | Count | Source |
1 | | /* |
2 | | * Generated by util/mkerr.pl DO NOT EDIT |
3 | | * Copyright 1995-2023 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 <openssl/proverr.h> |
13 | | #include "include/prov/proverr.h" |
14 | | |
15 | | #ifndef OPENSSL_NO_ERR |
16 | | |
17 | | static const ERR_STRING_DATA PROV_str_reasons[] = { |
18 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ADDITIONAL_INPUT_TOO_LONG), |
19 | | "additional input too long" }, |
20 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ALGORITHM_MISMATCH), |
21 | | "algorithm mismatch" }, |
22 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ALREADY_INSTANTIATED), |
23 | | "already instantiated" }, |
24 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_BAD_DECRYPT), "bad decrypt" }, |
25 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_BAD_ENCODING), "bad encoding" }, |
26 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_BAD_LENGTH), "bad length" }, |
27 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_BAD_TLS_CLIENT_VERSION), |
28 | | "bad tls client version" }, |
29 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_BN_ERROR), "bn error" }, |
30 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_CIPHER_OPERATION_FAILED), |
31 | | "cipher operation failed" }, |
32 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_DERIVATION_FUNCTION_INIT_FAILED), |
33 | | "derivation function init failed" }, |
34 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_DIGEST_NOT_ALLOWED), |
35 | | "digest not allowed" }, |
36 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_EMS_NOT_ENABLED), "ems not enabled" }, |
37 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ENTROPY_SOURCE_STRENGTH_TOO_WEAK), |
38 | | "entropy source strength too weak" }, |
39 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ERROR_INSTANTIATING_DRBG), |
40 | | "error instantiating drbg" }, |
41 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ERROR_RETRIEVING_ENTROPY), |
42 | | "error retrieving entropy" }, |
43 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ERROR_RETRIEVING_NONCE), |
44 | | "error retrieving nonce" }, |
45 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_DURING_DERIVATION), |
46 | | "failed during derivation" }, |
47 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_CREATE_LOCK), |
48 | | "failed to create lock" }, |
49 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_DECRYPT), "failed to decrypt" }, |
50 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_GENERATE_KEY), |
51 | | "failed to generate key" }, |
52 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_GET_PARAMETER), |
53 | | "failed to get parameter" }, |
54 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_SET_PARAMETER), |
55 | | "failed to set parameter" }, |
56 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FAILED_TO_SIGN), "failed to sign" }, |
57 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FIPS_MODULE_CONDITIONAL_ERROR), |
58 | | "fips module conditional error" }, |
59 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FIPS_MODULE_ENTERING_ERROR_STATE), |
60 | | "fips module entering error state" }, |
61 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_FIPS_MODULE_IN_ERROR_STATE), |
62 | | "fips module in error state" }, |
63 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_GENERATE_ERROR), "generate error" }, |
64 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE), |
65 | | "illegal or unsupported padding mode" }, |
66 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INDICATOR_INTEGRITY_FAILURE), |
67 | | "indicator integrity failure" }, |
68 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INSUFFICIENT_DRBG_STRENGTH), |
69 | | "insufficient drbg strength" }, |
70 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_AAD), "invalid aad" }, |
71 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_AEAD), "invalid aead" }, |
72 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_CONFIG_DATA), |
73 | | "invalid config data" }, |
74 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_CONSTANT_LENGTH), |
75 | | "invalid constant length" }, |
76 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_CURVE), "invalid curve" }, |
77 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_CUSTOM_LENGTH), |
78 | | "invalid custom length" }, |
79 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_DATA), "invalid data" }, |
80 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_DIGEST), "invalid digest" }, |
81 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_DIGEST_LENGTH), |
82 | | "invalid digest length" }, |
83 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_DIGEST_SIZE), |
84 | | "invalid digest size" }, |
85 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_INPUT_LENGTH), |
86 | | "invalid input length" }, |
87 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_ITERATION_COUNT), |
88 | | "invalid iteration count" }, |
89 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_IV_LENGTH), "invalid iv length" }, |
90 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_KDF), "invalid kdf" }, |
91 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_KEY), "invalid key" }, |
92 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_KEY_LENGTH), |
93 | | "invalid key length" }, |
94 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_MAC), "invalid mac" }, |
95 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_MEMORY_SIZE), |
96 | | "invalid memory size" }, |
97 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_MGF1_MD), "invalid mgf1 md" }, |
98 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_MODE), "invalid mode" }, |
99 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_OUTPUT_LENGTH), |
100 | | "invalid output length" }, |
101 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_PADDING_MODE), |
102 | | "invalid padding mode" }, |
103 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_PUBINFO), "invalid pubinfo" }, |
104 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_SALT_LENGTH), |
105 | | "invalid salt length" }, |
106 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_SEED_LENGTH), |
107 | | "invalid seed length" }, |
108 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_SIGNATURE_SIZE), |
109 | | "invalid signature size" }, |
110 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_STATE), "invalid state" }, |
111 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_TAG), "invalid tag" }, |
112 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_TAG_LENGTH), |
113 | | "invalid tag length" }, |
114 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_THREAD_POOL_SIZE), |
115 | | "invalid thread pool size" }, |
116 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_UKM_LENGTH), |
117 | | "invalid ukm length" }, |
118 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_INVALID_X931_DIGEST), |
119 | | "invalid x931 digest" }, |
120 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_IN_ERROR_STATE), "in error state" }, |
121 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_KEY_SETUP_FAILED), "key setup failed" }, |
122 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_KEY_SIZE_TOO_SMALL), |
123 | | "key size too small" }, |
124 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_LENGTH_TOO_LARGE), "length too large" }, |
125 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISMATCHING_DOMAIN_PARAMETERS), |
126 | | "mismatching domain parameters" }, |
127 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_CEK_ALG), "missing cek alg" }, |
128 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_CIPHER), "missing cipher" }, |
129 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_CONFIG_DATA), |
130 | | "missing config data" }, |
131 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_CONSTANT), "missing constant" }, |
132 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_KEY), "missing key" }, |
133 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_MAC), "missing mac" }, |
134 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_MESSAGE_DIGEST), |
135 | | "missing message digest" }, |
136 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_OID), "missing OID" }, |
137 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_PASS), "missing pass" }, |
138 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_SALT), "missing salt" }, |
139 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_SECRET), "missing secret" }, |
140 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_SEED), "missing seed" }, |
141 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_SESSION_ID), |
142 | | "missing session id" }, |
143 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_TYPE), "missing type" }, |
144 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MISSING_XCGHASH), "missing xcghash" }, |
145 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_MODULE_INTEGRITY_FAILURE), |
146 | | "module integrity failure" }, |
147 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_A_PRIVATE_KEY), "not a private key" }, |
148 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_A_PUBLIC_KEY), "not a public key" }, |
149 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_INSTANTIATED), "not instantiated" }, |
150 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_PARAMETERS), "not parameters" }, |
151 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_SUPPORTED), "not supported" }, |
152 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NOT_XOF_OR_INVALID_LENGTH), |
153 | | "not xof or invalid length" }, |
154 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NO_KEY_SET), "no key set" }, |
155 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_NO_PARAMETERS_SET), "no parameters set" }, |
156 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE), |
157 | | "operation not supported for this keytype" }, |
158 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_OUTPUT_BUFFER_TOO_SMALL), |
159 | | "output buffer too small" }, |
160 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PARENT_CANNOT_GENERATE_RANDOM_NUMBERS), |
161 | | "parent cannot generate random numbers" }, |
162 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PARENT_CANNOT_SUPPLY_ENTROPY_SEED), |
163 | | "parent cannot supply entropy seed" }, |
164 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PARENT_LOCKING_NOT_ENABLED), |
165 | | "parent locking not enabled" }, |
166 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PARENT_STRENGTH_TOO_WEAK), |
167 | | "parent strength too weak" }, |
168 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PATH_MUST_BE_ABSOLUTE), |
169 | | "path must be absolute" }, |
170 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PERSONALISATION_STRING_TOO_LONG), |
171 | | "personalisation string too long" }, |
172 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_PSS_SALTLEN_TOO_SMALL), |
173 | | "pss saltlen too small" }, |
174 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_REQUEST_TOO_LARGE_FOR_DRBG), |
175 | | "request too large for drbg" }, |
176 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_REQUIRE_CTR_MODE_CIPHER), |
177 | | "require ctr mode cipher" }, |
178 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_RESEED_ERROR), "reseed error" }, |
179 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_SEARCH_ONLY_SUPPORTED_FOR_DIRECTORIES), |
180 | | "search only supported for directories" }, |
181 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_SEED_SOURCES_MUST_NOT_HAVE_A_PARENT), |
182 | | "seed sources must not have a parent" }, |
183 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_SELF_TEST_KAT_FAILURE), |
184 | | "self test kat failure" }, |
185 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_SELF_TEST_POST_FAILURE), |
186 | | "self test post failure" }, |
187 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_TAG_NOT_NEEDED), "tag not needed" }, |
188 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_TAG_NOT_SET), "tag not set" }, |
189 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_TOO_MANY_RECORDS), "too many records" }, |
190 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_FIND_CIPHERS), |
191 | | "unable to find ciphers" }, |
192 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_GET_PARENT_STRENGTH), |
193 | | "unable to get parent strength" }, |
194 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_GET_PASSPHRASE), |
195 | | "unable to get passphrase" }, |
196 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_INITIALISE_CIPHERS), |
197 | | "unable to initialise ciphers" }, |
198 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_LOAD_SHA256), |
199 | | "unable to load sha256" }, |
200 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_LOCK_PARENT), |
201 | | "unable to lock parent" }, |
202 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNABLE_TO_RESEED), "unable to reseed" }, |
203 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNSUPPORTED_CEK_ALG), |
204 | | "unsupported cek alg" }, |
205 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNSUPPORTED_KEY_SIZE), |
206 | | "unsupported key size" }, |
207 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNSUPPORTED_MAC_TYPE), |
208 | | "unsupported mac type" }, |
209 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_UNSUPPORTED_NUMBER_OF_ROUNDS), |
210 | | "unsupported number of rounds" }, |
211 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_URI_AUTHORITY_UNSUPPORTED), |
212 | | "uri authority unsupported" }, |
213 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_VALUE_ERROR), "value error" }, |
214 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_WRONG_FINAL_BLOCK_LENGTH), |
215 | | "wrong final block length" }, |
216 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_WRONG_OUTPUT_BUFFER_SIZE), |
217 | | "wrong output buffer size" }, |
218 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_XOF_DIGESTS_NOT_ALLOWED), |
219 | | "xof digests not allowed" }, |
220 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_XTS_DATA_UNIT_IS_TOO_LARGE), |
221 | | "xts data unit is too large" }, |
222 | | { ERR_PACK(ERR_LIB_PROV, 0, PROV_R_XTS_DUPLICATED_KEYS), |
223 | | "xts duplicated keys" }, |
224 | | { 0, NULL } |
225 | | }; |
226 | | |
227 | | #endif |
228 | | |
229 | | int ossl_err_load_PROV_strings(void) |
230 | 273 | { |
231 | 273 | #ifndef OPENSSL_NO_ERR |
232 | 273 | if (ERR_reason_error_string(PROV_str_reasons[0].error) == NULL) |
233 | 273 | ERR_load_strings_const(PROV_str_reasons); |
234 | 273 | #endif |
235 | 273 | return 1; |
236 | 273 | } |