1e1051a39Sopenharmony_ci/*
2e1051a39Sopenharmony_ci * Generated by util/mkerr.pl DO NOT EDIT
3e1051a39Sopenharmony_ci * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
4e1051a39Sopenharmony_ci *
5e1051a39Sopenharmony_ci * Licensed under the Apache License 2.0 (the "License").  You may not use
6e1051a39Sopenharmony_ci * this file except in compliance with the License.  You can obtain a copy
7e1051a39Sopenharmony_ci * in the file LICENSE in the source distribution or at
8e1051a39Sopenharmony_ci * https://www.openssl.org/source/license.html
9e1051a39Sopenharmony_ci */
10e1051a39Sopenharmony_ci
11e1051a39Sopenharmony_ci#include <openssl/err.h>
12e1051a39Sopenharmony_ci#include <openssl/rsaerr.h>
13e1051a39Sopenharmony_ci#include "crypto/rsaerr.h"
14e1051a39Sopenharmony_ci
15e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_ERR
16e1051a39Sopenharmony_ci
17e1051a39Sopenharmony_cistatic const ERR_STRING_DATA RSA_str_reasons[] = {
18e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_ALGORITHM_MISMATCH), "algorithm mismatch"},
19e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_BAD_E_VALUE), "bad e value"},
20e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_BAD_FIXED_HEADER_DECRYPT),
21e1051a39Sopenharmony_ci    "bad fixed header decrypt"},
22e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_BAD_PAD_BYTE_COUNT), "bad pad byte count"},
23e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_BAD_SIGNATURE), "bad signature"},
24e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_BLOCK_TYPE_IS_NOT_01),
25e1051a39Sopenharmony_ci    "block type is not 01"},
26e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_BLOCK_TYPE_IS_NOT_02),
27e1051a39Sopenharmony_ci    "block type is not 02"},
28e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_DATA_GREATER_THAN_MOD_LEN),
29e1051a39Sopenharmony_ci    "data greater than mod len"},
30e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_DATA_TOO_LARGE), "data too large"},
31e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE),
32e1051a39Sopenharmony_ci    "data too large for key size"},
33e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_DATA_TOO_LARGE_FOR_MODULUS),
34e1051a39Sopenharmony_ci    "data too large for modulus"},
35e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_DATA_TOO_SMALL), "data too small"},
36e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE),
37e1051a39Sopenharmony_ci    "data too small for key size"},
38e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_DIGEST_DOES_NOT_MATCH),
39e1051a39Sopenharmony_ci    "digest does not match"},
40e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_DIGEST_NOT_ALLOWED), "digest not allowed"},
41e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY),
42e1051a39Sopenharmony_ci    "digest too big for rsa key"},
43e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_DMP1_NOT_CONGRUENT_TO_D),
44e1051a39Sopenharmony_ci    "dmp1 not congruent to d"},
45e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_DMQ1_NOT_CONGRUENT_TO_D),
46e1051a39Sopenharmony_ci    "dmq1 not congruent to d"},
47e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_D_E_NOT_CONGRUENT_TO_1),
48e1051a39Sopenharmony_ci    "d e not congruent to 1"},
49e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_FIRST_OCTET_INVALID),
50e1051a39Sopenharmony_ci    "first octet invalid"},
51e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE),
52e1051a39Sopenharmony_ci    "illegal or unsupported padding mode"},
53e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_DIGEST), "invalid digest"},
54e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_DIGEST_LENGTH),
55e1051a39Sopenharmony_ci    "invalid digest length"},
56e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_HEADER), "invalid header"},
57e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_KEYPAIR), "invalid keypair"},
58e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_KEY_LENGTH), "invalid key length"},
59e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_LABEL), "invalid label"},
60e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_LENGTH), "invalid length"},
61e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_MESSAGE_LENGTH),
62e1051a39Sopenharmony_ci    "invalid message length"},
63e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_MGF1_MD), "invalid mgf1 md"},
64e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_MODULUS), "invalid modulus"},
65e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_MULTI_PRIME_KEY),
66e1051a39Sopenharmony_ci    "invalid multi prime key"},
67e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_OAEP_PARAMETERS),
68e1051a39Sopenharmony_ci    "invalid oaep parameters"},
69e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_PADDING), "invalid padding"},
70e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_PADDING_MODE),
71e1051a39Sopenharmony_ci    "invalid padding mode"},
72e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_PSS_PARAMETERS),
73e1051a39Sopenharmony_ci    "invalid pss parameters"},
74e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_PSS_SALTLEN),
75e1051a39Sopenharmony_ci    "invalid pss saltlen"},
76e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_REQUEST), "invalid request"},
77e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_SALT_LENGTH),
78e1051a39Sopenharmony_ci    "invalid salt length"},
79e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_STRENGTH), "invalid strength"},
80e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_TRAILER), "invalid trailer"},
81e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_INVALID_X931_DIGEST),
82e1051a39Sopenharmony_ci    "invalid x931 digest"},
83e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_IQMP_NOT_INVERSE_OF_Q),
84e1051a39Sopenharmony_ci    "iqmp not inverse of q"},
85e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_KEY_PRIME_NUM_INVALID),
86e1051a39Sopenharmony_ci    "key prime num invalid"},
87e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_KEY_SIZE_TOO_SMALL), "key size too small"},
88e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_LAST_OCTET_INVALID), "last octet invalid"},
89e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_MGF1_DIGEST_NOT_ALLOWED),
90e1051a39Sopenharmony_ci    "mgf1 digest not allowed"},
91e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_MISSING_PRIVATE_KEY),
92e1051a39Sopenharmony_ci    "missing private key"},
93e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_MODULUS_TOO_LARGE), "modulus too large"},
94e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_MP_COEFFICIENT_NOT_INVERSE_OF_R),
95e1051a39Sopenharmony_ci    "mp coefficient not inverse of r"},
96e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_MP_EXPONENT_NOT_CONGRUENT_TO_D),
97e1051a39Sopenharmony_ci    "mp exponent not congruent to d"},
98e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_MP_R_NOT_PRIME), "mp r not prime"},
99e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_NO_PUBLIC_EXPONENT), "no public exponent"},
100e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_NULL_BEFORE_BLOCK_MISSING),
101e1051a39Sopenharmony_ci    "null before block missing"},
102e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_N_DOES_NOT_EQUAL_PRODUCT_OF_PRIMES),
103e1051a39Sopenharmony_ci    "n does not equal product of primes"},
104e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_N_DOES_NOT_EQUAL_P_Q),
105e1051a39Sopenharmony_ci    "n does not equal p q"},
106e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_OAEP_DECODING_ERROR),
107e1051a39Sopenharmony_ci    "oaep decoding error"},
108e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE),
109e1051a39Sopenharmony_ci    "operation not supported for this keytype"},
110e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_PADDING_CHECK_FAILED),
111e1051a39Sopenharmony_ci    "padding check failed"},
112e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_PAIRWISE_TEST_FAILURE),
113e1051a39Sopenharmony_ci    "pairwise test failure"},
114e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_PKCS_DECODING_ERROR),
115e1051a39Sopenharmony_ci    "pkcs decoding error"},
116e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_PSS_SALTLEN_TOO_SMALL),
117e1051a39Sopenharmony_ci    "pss saltlen too small"},
118e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_PUB_EXPONENT_OUT_OF_RANGE),
119e1051a39Sopenharmony_ci    "pub exponent out of range"},
120e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_P_NOT_PRIME), "p not prime"},
121e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_Q_NOT_PRIME), "q not prime"},
122e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_RANDOMNESS_SOURCE_STRENGTH_INSUFFICIENT),
123e1051a39Sopenharmony_ci    "randomness source strength insufficient"},
124e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED),
125e1051a39Sopenharmony_ci    "rsa operations not supported"},
126e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_SLEN_CHECK_FAILED),
127e1051a39Sopenharmony_ci    "salt length check failed"},
128e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_SLEN_RECOVERY_FAILED),
129e1051a39Sopenharmony_ci    "salt length recovery failed"},
130e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_SSLV3_ROLLBACK_ATTACK),
131e1051a39Sopenharmony_ci    "sslv3 rollback attack"},
132e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD),
133e1051a39Sopenharmony_ci    "the asn1 object identifier is not known for this md"},
134e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_UNKNOWN_ALGORITHM_TYPE),
135e1051a39Sopenharmony_ci    "unknown algorithm type"},
136e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_UNKNOWN_DIGEST), "unknown digest"},
137e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_UNKNOWN_MASK_DIGEST),
138e1051a39Sopenharmony_ci    "unknown mask digest"},
139e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_UNKNOWN_PADDING_TYPE),
140e1051a39Sopenharmony_ci    "unknown padding type"},
141e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_UNSUPPORTED_ENCRYPTION_TYPE),
142e1051a39Sopenharmony_ci    "unsupported encryption type"},
143e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_UNSUPPORTED_LABEL_SOURCE),
144e1051a39Sopenharmony_ci    "unsupported label source"},
145e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_UNSUPPORTED_MASK_ALGORITHM),
146e1051a39Sopenharmony_ci    "unsupported mask algorithm"},
147e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_UNSUPPORTED_MASK_PARAMETER),
148e1051a39Sopenharmony_ci    "unsupported mask parameter"},
149e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_UNSUPPORTED_SIGNATURE_TYPE),
150e1051a39Sopenharmony_ci    "unsupported signature type"},
151e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_VALUE_MISSING), "value missing"},
152e1051a39Sopenharmony_ci    {ERR_PACK(ERR_LIB_RSA, 0, RSA_R_WRONG_SIGNATURE_LENGTH),
153e1051a39Sopenharmony_ci    "wrong signature length"},
154e1051a39Sopenharmony_ci    {0, NULL}
155e1051a39Sopenharmony_ci};
156e1051a39Sopenharmony_ci
157e1051a39Sopenharmony_ci#endif
158e1051a39Sopenharmony_ci
159e1051a39Sopenharmony_ciint ossl_err_load_RSA_strings(void)
160e1051a39Sopenharmony_ci{
161e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_ERR
162e1051a39Sopenharmony_ci    if (ERR_reason_error_string(RSA_str_reasons[0].error) == NULL)
163e1051a39Sopenharmony_ci        ERR_load_strings_const(RSA_str_reasons);
164e1051a39Sopenharmony_ci#endif
165e1051a39Sopenharmony_ci    return 1;
166e1051a39Sopenharmony_ci}
167