7b2b2019b9a0ca90f269708b3eeb8e4e50f125fc
[openssl.git] / crypto / ec / ec_err.c
1 /*
2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the OpenSSL license (the "License").  You may not use
5  * this file except in compliance with the License.  You can obtain a copy
6  * in the file LICENSE in the source distribution or at
7  * https://www.openssl.org/source/license.html
8  */
9
10 /*
11  * NOTE: this file was auto generated by the mkerr.pl script: any changes
12  * made to it will be overwritten when the script next updates this file,
13  * only reason strings will be preserved.
14  */
15
16 #include <stdio.h>
17 #include <openssl/err.h>
18 #include <openssl/ec.h>
19
20 /* BEGIN ERROR CODES */
21 #ifndef OPENSSL_NO_ERR
22
23 # define ERR_FUNC(func) ERR_PACK(ERR_LIB_EC,func,0)
24 # define ERR_REASON(reason) ERR_PACK(ERR_LIB_EC,0,reason)
25
26 static ERR_STRING_DATA EC_str_functs[] = {
27     {ERR_FUNC(EC_F_BN_TO_FELEM), "BN_to_felem"},
28     {ERR_FUNC(EC_F_COMPUTE_WNAF), "COMPUTE_WNAF"},
29     {ERR_FUNC(EC_F_D2I_ECPARAMETERS), "d2i_ECParameters"},
30     {ERR_FUNC(EC_F_D2I_ECPKPARAMETERS), "d2i_ECPKParameters"},
31     {ERR_FUNC(EC_F_D2I_ECPRIVATEKEY), "d2i_ECPrivateKey"},
32     {ERR_FUNC(EC_F_DO_EC_KEY_PRINT), "do_EC_KEY_print"},
33     {ERR_FUNC(EC_F_ECDH_CMS_DECRYPT), "ecdh_cms_decrypt"},
34     {ERR_FUNC(EC_F_ECDH_CMS_SET_SHARED_INFO), "ecdh_cms_set_shared_info"},
35     {ERR_FUNC(EC_F_ECDH_COMPUTE_KEY), "ECDH_compute_key"},
36     {ERR_FUNC(EC_F_ECDH_SIMPLE_COMPUTE_KEY), "ecdh_simple_compute_key"},
37     {ERR_FUNC(EC_F_ECDSA_DO_SIGN_EX), "ECDSA_do_sign_ex"},
38     {ERR_FUNC(EC_F_ECDSA_DO_VERIFY), "ECDSA_do_verify"},
39     {ERR_FUNC(EC_F_ECDSA_SIGN_EX), "ECDSA_sign_ex"},
40     {ERR_FUNC(EC_F_ECDSA_SIGN_SETUP), "ECDSA_sign_setup"},
41     {ERR_FUNC(EC_F_ECDSA_VERIFY), "ECDSA_verify"},
42     {ERR_FUNC(EC_F_ECKEY_PARAM2TYPE), "eckey_param2type"},
43     {ERR_FUNC(EC_F_ECKEY_PARAM_DECODE), "eckey_param_decode"},
44     {ERR_FUNC(EC_F_ECKEY_PRIV_DECODE), "eckey_priv_decode"},
45     {ERR_FUNC(EC_F_ECKEY_PRIV_ENCODE), "eckey_priv_encode"},
46     {ERR_FUNC(EC_F_ECKEY_PUB_DECODE), "eckey_pub_decode"},
47     {ERR_FUNC(EC_F_ECKEY_PUB_ENCODE), "eckey_pub_encode"},
48     {ERR_FUNC(EC_F_ECKEY_TYPE2PARAM), "eckey_type2param"},
49     {ERR_FUNC(EC_F_ECPARAMETERS_PRINT), "ECParameters_print"},
50     {ERR_FUNC(EC_F_ECPARAMETERS_PRINT_FP), "ECParameters_print_fp"},
51     {ERR_FUNC(EC_F_ECPKPARAMETERS_PRINT), "ECPKParameters_print"},
52     {ERR_FUNC(EC_F_ECPKPARAMETERS_PRINT_FP), "ECPKParameters_print_fp"},
53     {ERR_FUNC(EC_F_ECP_NISTZ256_GET_AFFINE), "ecp_nistz256_get_affine"},
54     {ERR_FUNC(EC_F_ECP_NISTZ256_MULT_PRECOMPUTE),
55      "ecp_nistz256_mult_precompute"},
56     {ERR_FUNC(EC_F_ECP_NISTZ256_POINTS_MUL), "ecp_nistz256_points_mul"},
57     {ERR_FUNC(EC_F_ECP_NISTZ256_PRE_COMP_NEW), "ecp_nistz256_pre_comp_new"},
58     {ERR_FUNC(EC_F_ECP_NISTZ256_WINDOWED_MUL), "ecp_nistz256_windowed_mul"},
59     {ERR_FUNC(EC_F_ECP_NIST_MOD_192), "ECP_NIST_MOD_192"},
60     {ERR_FUNC(EC_F_ECP_NIST_MOD_224), "ECP_NIST_MOD_224"},
61     {ERR_FUNC(EC_F_ECP_NIST_MOD_256), "ECP_NIST_MOD_256"},
62     {ERR_FUNC(EC_F_ECP_NIST_MOD_521), "ECP_NIST_MOD_521"},
63     {ERR_FUNC(EC_F_EC_ASN1_GROUP2CURVE), "ec_asn1_group2curve"},
64     {ERR_FUNC(EC_F_EC_ASN1_GROUP2FIELDID), "ec_asn1_group2fieldid"},
65     {ERR_FUNC(EC_F_EC_EX_DATA_SET_DATA), "EC_EX_DATA_set_data"},
66     {ERR_FUNC(EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY),
67      "ec_GF2m_montgomery_point_multiply"},
68     {ERR_FUNC(EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT),
69      "ec_GF2m_simple_group_check_discriminant"},
70     {ERR_FUNC(EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE),
71      "ec_GF2m_simple_group_set_curve"},
72     {ERR_FUNC(EC_F_EC_GF2M_SIMPLE_OCT2POINT), "ec_GF2m_simple_oct2point"},
73     {ERR_FUNC(EC_F_EC_GF2M_SIMPLE_POINT2OCT), "ec_GF2m_simple_point2oct"},
74     {ERR_FUNC(EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES),
75      "ec_GF2m_simple_point_get_affine_coordinates"},
76     {ERR_FUNC(EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES),
77      "ec_GF2m_simple_point_set_affine_coordinates"},
78     {ERR_FUNC(EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES),
79      "ec_GF2m_simple_set_compressed_coordinates"},
80     {ERR_FUNC(EC_F_EC_GFP_MONT_FIELD_DECODE), "ec_GFp_mont_field_decode"},
81     {ERR_FUNC(EC_F_EC_GFP_MONT_FIELD_ENCODE), "ec_GFp_mont_field_encode"},
82     {ERR_FUNC(EC_F_EC_GFP_MONT_FIELD_MUL), "ec_GFp_mont_field_mul"},
83     {ERR_FUNC(EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE),
84      "ec_GFp_mont_field_set_to_one"},
85     {ERR_FUNC(EC_F_EC_GFP_MONT_FIELD_SQR), "ec_GFp_mont_field_sqr"},
86     {ERR_FUNC(EC_F_EC_GFP_MONT_GROUP_SET_CURVE),
87      "ec_GFp_mont_group_set_curve"},
88     {ERR_FUNC(EC_F_EC_GFP_MONT_GROUP_SET_CURVE_GFP),
89      "EC_GFP_MONT_GROUP_SET_CURVE_GFP"},
90     {ERR_FUNC(EC_F_EC_GFP_NISTP224_GROUP_SET_CURVE),
91      "ec_GFp_nistp224_group_set_curve"},
92     {ERR_FUNC(EC_F_EC_GFP_NISTP224_POINTS_MUL), "ec_GFp_nistp224_points_mul"},
93     {ERR_FUNC(EC_F_EC_GFP_NISTP224_POINT_GET_AFFINE_COORDINATES),
94      "ec_GFp_nistp224_point_get_affine_coordinates"},
95     {ERR_FUNC(EC_F_EC_GFP_NISTP256_GROUP_SET_CURVE),
96      "ec_GFp_nistp256_group_set_curve"},
97     {ERR_FUNC(EC_F_EC_GFP_NISTP256_POINTS_MUL), "ec_GFp_nistp256_points_mul"},
98     {ERR_FUNC(EC_F_EC_GFP_NISTP256_POINT_GET_AFFINE_COORDINATES),
99      "ec_GFp_nistp256_point_get_affine_coordinates"},
100     {ERR_FUNC(EC_F_EC_GFP_NISTP521_GROUP_SET_CURVE),
101      "ec_GFp_nistp521_group_set_curve"},
102     {ERR_FUNC(EC_F_EC_GFP_NISTP521_POINTS_MUL), "ec_GFp_nistp521_points_mul"},
103     {ERR_FUNC(EC_F_EC_GFP_NISTP521_POINT_GET_AFFINE_COORDINATES),
104      "ec_GFp_nistp521_point_get_affine_coordinates"},
105     {ERR_FUNC(EC_F_EC_GFP_NIST_FIELD_MUL), "ec_GFp_nist_field_mul"},
106     {ERR_FUNC(EC_F_EC_GFP_NIST_FIELD_SQR), "ec_GFp_nist_field_sqr"},
107     {ERR_FUNC(EC_F_EC_GFP_NIST_GROUP_SET_CURVE),
108      "ec_GFp_nist_group_set_curve"},
109     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT),
110      "ec_GFp_simple_group_check_discriminant"},
111     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE),
112      "ec_GFp_simple_group_set_curve"},
113     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP),
114      "EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP"},
115     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR),
116      "EC_GFP_SIMPLE_GROUP_SET_GENERATOR"},
117     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_MAKE_AFFINE), "ec_GFp_simple_make_affine"},
118     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_OCT2POINT), "ec_GFp_simple_oct2point"},
119     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_POINT2OCT), "ec_GFp_simple_point2oct"},
120     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE),
121      "ec_GFp_simple_points_make_affine"},
122     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES),
123      "ec_GFp_simple_point_get_affine_coordinates"},
124     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP),
125      "EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP"},
126     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES),
127      "ec_GFp_simple_point_set_affine_coordinates"},
128     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP),
129      "EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP"},
130     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES),
131      "ec_GFp_simple_set_compressed_coordinates"},
132     {ERR_FUNC(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP),
133      "EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP"},
134     {ERR_FUNC(EC_F_EC_GROUP_CHECK), "EC_GROUP_check"},
135     {ERR_FUNC(EC_F_EC_GROUP_CHECK_DISCRIMINANT),
136      "EC_GROUP_check_discriminant"},
137     {ERR_FUNC(EC_F_EC_GROUP_COPY), "EC_GROUP_copy"},
138     {ERR_FUNC(EC_F_EC_GROUP_GET0_GENERATOR), "EC_GROUP_get0_generator"},
139     {ERR_FUNC(EC_F_EC_GROUP_GET_COFACTOR), "EC_GROUP_get_cofactor"},
140     {ERR_FUNC(EC_F_EC_GROUP_GET_CURVE_GF2M), "EC_GROUP_get_curve_GF2m"},
141     {ERR_FUNC(EC_F_EC_GROUP_GET_CURVE_GFP), "EC_GROUP_get_curve_GFp"},
142     {ERR_FUNC(EC_F_EC_GROUP_GET_DEGREE), "EC_GROUP_get_degree"},
143     {ERR_FUNC(EC_F_EC_GROUP_GET_ECPARAMETERS), "EC_GROUP_get_ecparameters"},
144     {ERR_FUNC(EC_F_EC_GROUP_GET_ECPKPARAMETERS),
145      "EC_GROUP_get_ecpkparameters"},
146     {ERR_FUNC(EC_F_EC_GROUP_GET_ORDER), "EC_GROUP_get_order"},
147     {ERR_FUNC(EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS),
148      "EC_GROUP_get_pentanomial_basis"},
149     {ERR_FUNC(EC_F_EC_GROUP_GET_TRINOMIAL_BASIS),
150      "EC_GROUP_get_trinomial_basis"},
151     {ERR_FUNC(EC_F_EC_GROUP_NEW), "EC_GROUP_new"},
152     {ERR_FUNC(EC_F_EC_GROUP_NEW_BY_CURVE_NAME), "EC_GROUP_new_by_curve_name"},
153     {ERR_FUNC(EC_F_EC_GROUP_NEW_FROM_DATA), "ec_group_new_from_data"},
154     {ERR_FUNC(EC_F_EC_GROUP_NEW_FROM_ECPARAMETERS),
155      "EC_GROUP_new_from_ecparameters"},
156     {ERR_FUNC(EC_F_EC_GROUP_NEW_FROM_ECPKPARAMETERS),
157      "EC_GROUP_new_from_ecpkparameters"},
158     {ERR_FUNC(EC_F_EC_GROUP_PRECOMPUTE_MULT), "EC_GROUP_precompute_mult"},
159     {ERR_FUNC(EC_F_EC_GROUP_SET_CURVE_GF2M), "EC_GROUP_set_curve_GF2m"},
160     {ERR_FUNC(EC_F_EC_GROUP_SET_CURVE_GFP), "EC_GROUP_set_curve_GFp"},
161     {ERR_FUNC(EC_F_EC_GROUP_SET_EXTRA_DATA), "EC_GROUP_SET_EXTRA_DATA"},
162     {ERR_FUNC(EC_F_EC_GROUP_SET_GENERATOR), "EC_GROUP_set_generator"},
163     {ERR_FUNC(EC_F_EC_KEY_CHECK_KEY), "EC_KEY_check_key"},
164     {ERR_FUNC(EC_F_EC_KEY_COPY), "EC_KEY_copy"},
165     {ERR_FUNC(EC_F_EC_KEY_GENERATE_KEY), "EC_KEY_generate_key"},
166     {ERR_FUNC(EC_F_EC_KEY_NEW), "EC_KEY_new"},
167     {ERR_FUNC(EC_F_EC_KEY_NEW_METHOD), "EC_KEY_new_method"},
168     {ERR_FUNC(EC_F_EC_KEY_OCT2PRIV), "EC_KEY_oct2priv"},
169     {ERR_FUNC(EC_F_EC_KEY_PRINT), "EC_KEY_print"},
170     {ERR_FUNC(EC_F_EC_KEY_PRINT_FP), "EC_KEY_print_fp"},
171     {ERR_FUNC(EC_F_EC_KEY_PRIV2OCT), "EC_KEY_priv2oct"},
172     {ERR_FUNC(EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES),
173      "EC_KEY_set_public_key_affine_coordinates"},
174     {ERR_FUNC(EC_F_EC_KEY_SIMPLE_CHECK_KEY), "ec_key_simple_check_key"},
175     {ERR_FUNC(EC_F_EC_KEY_SIMPLE_OCT2PRIV), "ec_key_simple_oct2priv"},
176     {ERR_FUNC(EC_F_EC_KEY_SIMPLE_PRIV2OCT), "ec_key_simple_priv2oct"},
177     {ERR_FUNC(EC_F_EC_POINTS_MAKE_AFFINE), "EC_POINTs_make_affine"},
178     {ERR_FUNC(EC_F_EC_POINT_ADD), "EC_POINT_add"},
179     {ERR_FUNC(EC_F_EC_POINT_CMP), "EC_POINT_cmp"},
180     {ERR_FUNC(EC_F_EC_POINT_COPY), "EC_POINT_copy"},
181     {ERR_FUNC(EC_F_EC_POINT_DBL), "EC_POINT_dbl"},
182     {ERR_FUNC(EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M),
183      "EC_POINT_get_affine_coordinates_GF2m"},
184     {ERR_FUNC(EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP),
185      "EC_POINT_get_affine_coordinates_GFp"},
186     {ERR_FUNC(EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP),
187      "EC_POINT_get_Jprojective_coordinates_GFp"},
188     {ERR_FUNC(EC_F_EC_POINT_INVERT), "EC_POINT_invert"},
189     {ERR_FUNC(EC_F_EC_POINT_IS_AT_INFINITY), "EC_POINT_is_at_infinity"},
190     {ERR_FUNC(EC_F_EC_POINT_IS_ON_CURVE), "EC_POINT_is_on_curve"},
191     {ERR_FUNC(EC_F_EC_POINT_MAKE_AFFINE), "EC_POINT_make_affine"},
192     {ERR_FUNC(EC_F_EC_POINT_MUL), "EC_POINT_mul"},
193     {ERR_FUNC(EC_F_EC_POINT_NEW), "EC_POINT_new"},
194     {ERR_FUNC(EC_F_EC_POINT_OCT2POINT), "EC_POINT_oct2point"},
195     {ERR_FUNC(EC_F_EC_POINT_POINT2OCT), "EC_POINT_point2oct"},
196     {ERR_FUNC(EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M),
197      "EC_POINT_set_affine_coordinates_GF2m"},
198     {ERR_FUNC(EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP),
199      "EC_POINT_set_affine_coordinates_GFp"},
200     {ERR_FUNC(EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M),
201      "EC_POINT_set_compressed_coordinates_GF2m"},
202     {ERR_FUNC(EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP),
203      "EC_POINT_set_compressed_coordinates_GFp"},
204     {ERR_FUNC(EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP),
205      "EC_POINT_set_Jprojective_coordinates_GFp"},
206     {ERR_FUNC(EC_F_EC_POINT_SET_TO_INFINITY), "EC_POINT_set_to_infinity"},
207     {ERR_FUNC(EC_F_EC_PRE_COMP_DUP), "EC_PRE_COMP_DUP"},
208     {ERR_FUNC(EC_F_EC_PRE_COMP_NEW), "ec_pre_comp_new"},
209     {ERR_FUNC(EC_F_EC_WNAF_MUL), "ec_wNAF_mul"},
210     {ERR_FUNC(EC_F_EC_WNAF_PRECOMPUTE_MULT), "ec_wNAF_precompute_mult"},
211     {ERR_FUNC(EC_F_I2D_ECPARAMETERS), "i2d_ECParameters"},
212     {ERR_FUNC(EC_F_I2D_ECPKPARAMETERS), "i2d_ECPKParameters"},
213     {ERR_FUNC(EC_F_I2D_ECPRIVATEKEY), "i2d_ECPrivateKey"},
214     {ERR_FUNC(EC_F_I2O_ECPUBLICKEY), "i2o_ECPublicKey"},
215     {ERR_FUNC(EC_F_NISTP224_PRE_COMP_NEW), "nistp224_pre_comp_new"},
216     {ERR_FUNC(EC_F_NISTP256_PRE_COMP_NEW), "nistp256_pre_comp_new"},
217     {ERR_FUNC(EC_F_NISTP521_PRE_COMP_NEW), "nistp521_pre_comp_new"},
218     {ERR_FUNC(EC_F_O2I_ECPUBLICKEY), "o2i_ECPublicKey"},
219     {ERR_FUNC(EC_F_OLD_EC_PRIV_DECODE), "old_ec_priv_decode"},
220     {ERR_FUNC(EC_F_OSSL_ECDH_COMPUTE_KEY), "ossl_ecdh_compute_key"},
221     {ERR_FUNC(EC_F_OSSL_ECDSA_SIGN_SIG), "ossl_ecdsa_sign_sig"},
222     {ERR_FUNC(EC_F_OSSL_ECDSA_VERIFY_SIG), "ossl_ecdsa_verify_sig"},
223     {ERR_FUNC(EC_F_PKEY_EC_CTRL), "pkey_ec_ctrl"},
224     {ERR_FUNC(EC_F_PKEY_EC_CTRL_STR), "pkey_ec_ctrl_str"},
225     {ERR_FUNC(EC_F_PKEY_EC_DERIVE), "pkey_ec_derive"},
226     {ERR_FUNC(EC_F_PKEY_EC_KEYGEN), "pkey_ec_keygen"},
227     {ERR_FUNC(EC_F_PKEY_EC_PARAMGEN), "pkey_ec_paramgen"},
228     {ERR_FUNC(EC_F_PKEY_EC_SIGN), "pkey_ec_sign"},
229     {0, NULL}
230 };
231
232 static ERR_STRING_DATA EC_str_reasons[] = {
233     {ERR_REASON(EC_R_ASN1_ERROR), "asn1 error"},
234     {ERR_REASON(EC_R_ASN1_UNKNOWN_FIELD), "asn1 unknown field"},
235     {ERR_REASON(EC_R_BAD_SIGNATURE), "bad signature"},
236     {ERR_REASON(EC_R_BIGNUM_OUT_OF_RANGE), "bignum out of range"},
237     {ERR_REASON(EC_R_BUFFER_TOO_SMALL), "buffer too small"},
238     {ERR_REASON(EC_R_COORDINATES_OUT_OF_RANGE), "coordinates out of range"},
239     {ERR_REASON(EC_R_CURVE_DOES_NOT_SUPPORT_ECDH),
240      "curve does not support ecdh"},
241     {ERR_REASON(EC_R_CURVE_DOES_NOT_SUPPORT_SIGNING),
242      "curve does not support signing"},
243     {ERR_REASON(EC_R_D2I_ECPKPARAMETERS_FAILURE),
244      "d2i ecpkparameters failure"},
245     {ERR_REASON(EC_R_DECODE_ERROR), "decode error"},
246     {ERR_REASON(EC_R_DISCRIMINANT_IS_ZERO), "discriminant is zero"},
247     {ERR_REASON(EC_R_EC_GROUP_NEW_BY_NAME_FAILURE),
248      "ec group new by name failure"},
249     {ERR_REASON(EC_R_FIELD_TOO_LARGE), "field too large"},
250     {ERR_REASON(EC_R_GF2M_NOT_SUPPORTED), "gf2m not supported"},
251     {ERR_REASON(EC_R_GROUP2PKPARAMETERS_FAILURE),
252      "group2pkparameters failure"},
253     {ERR_REASON(EC_R_I2D_ECPKPARAMETERS_FAILURE),
254      "i2d ecpkparameters failure"},
255     {ERR_REASON(EC_R_INCOMPATIBLE_OBJECTS), "incompatible objects"},
256     {ERR_REASON(EC_R_INVALID_ARGUMENT), "invalid argument"},
257     {ERR_REASON(EC_R_INVALID_COMPRESSED_POINT), "invalid compressed point"},
258     {ERR_REASON(EC_R_INVALID_COMPRESSION_BIT), "invalid compression bit"},
259     {ERR_REASON(EC_R_INVALID_CURVE), "invalid curve"},
260     {ERR_REASON(EC_R_INVALID_DIGEST), "invalid digest"},
261     {ERR_REASON(EC_R_INVALID_DIGEST_TYPE), "invalid digest type"},
262     {ERR_REASON(EC_R_INVALID_ENCODING), "invalid encoding"},
263     {ERR_REASON(EC_R_INVALID_FIELD), "invalid field"},
264     {ERR_REASON(EC_R_INVALID_FORM), "invalid form"},
265     {ERR_REASON(EC_R_INVALID_GROUP_ORDER), "invalid group order"},
266     {ERR_REASON(EC_R_INVALID_OUTPUT_LENGTH), "invalid output length"},
267     {ERR_REASON(EC_R_INVALID_PENTANOMIAL_BASIS), "invalid pentanomial basis"},
268     {ERR_REASON(EC_R_INVALID_PRIVATE_KEY), "invalid private key"},
269     {ERR_REASON(EC_R_INVALID_TRINOMIAL_BASIS), "invalid trinomial basis"},
270     {ERR_REASON(EC_R_KDF_FAILED), "kdf failed"},
271     {ERR_REASON(EC_R_KDF_PARAMETER_ERROR), "kdf parameter error"},
272     {ERR_REASON(EC_R_KEYS_NOT_SET), "keys not set"},
273     {ERR_REASON(EC_R_MISSING_PARAMETERS), "missing parameters"},
274     {ERR_REASON(EC_R_MISSING_PRIVATE_KEY), "missing private key"},
275     {ERR_REASON(EC_R_NEED_NEW_SETUP_VALUES), "need new setup values"},
276     {ERR_REASON(EC_R_NOT_A_NIST_PRIME), "not a NIST prime"},
277     {ERR_REASON(EC_R_NOT_A_SUPPORTED_NIST_PRIME),
278      "not a supported NIST prime"},
279     {ERR_REASON(EC_R_NOT_IMPLEMENTED), "not implemented"},
280     {ERR_REASON(EC_R_NOT_INITIALIZED), "not initialized"},
281     {ERR_REASON(EC_R_NO_FIELD_MOD), "no field mod"},
282     {ERR_REASON(EC_R_NO_PARAMETERS_SET), "no parameters set"},
283     {ERR_REASON(EC_R_NO_PRIVATE_VALUE), "no private value"},
284     {ERR_REASON(EC_R_OPERATION_NOT_SUPPORTED), "operation not supported"},
285     {ERR_REASON(EC_R_PASSED_NULL_PARAMETER), "passed null parameter"},
286     {ERR_REASON(EC_R_PEER_KEY_ERROR), "peer key error"},
287     {ERR_REASON(EC_R_PKPARAMETERS2GROUP_FAILURE),
288      "pkparameters2group failure"},
289     {ERR_REASON(EC_R_POINT_ARITHMETIC_FAILURE), "point arithmetic failure"},
290     {ERR_REASON(EC_R_POINT_AT_INFINITY), "point at infinity"},
291     {ERR_REASON(EC_R_POINT_IS_NOT_ON_CURVE), "point is not on curve"},
292     {ERR_REASON(EC_R_RANDOM_NUMBER_GENERATION_FAILED),
293      "random number generation failed"},
294     {ERR_REASON(EC_R_SHARED_INFO_ERROR), "shared info error"},
295     {ERR_REASON(EC_R_SLOT_FULL), "slot full"},
296     {ERR_REASON(EC_R_UNDEFINED_GENERATOR), "undefined generator"},
297     {ERR_REASON(EC_R_UNDEFINED_ORDER), "undefined order"},
298     {ERR_REASON(EC_R_UNKNOWN_GROUP), "unknown group"},
299     {ERR_REASON(EC_R_UNKNOWN_ORDER), "unknown order"},
300     {ERR_REASON(EC_R_UNSUPPORTED_FIELD), "unsupported field"},
301     {ERR_REASON(EC_R_WRONG_CURVE_PARAMETERS), "wrong curve parameters"},
302     {ERR_REASON(EC_R_WRONG_ORDER), "wrong order"},
303     {0, NULL}
304 };
305
306 #endif
307
308 void ERR_load_EC_strings(void)
309 {
310 #ifndef OPENSSL_NO_ERR
311
312     if (ERR_func_error_string(EC_str_functs[0].error) == NULL) {
313         ERR_load_strings(0, EC_str_functs);
314         ERR_load_strings(0, EC_str_reasons);
315     }
316 #endif
317 }