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