]>
Commit | Line | Data |
---|---|---|
b6cff313 | 1 | /* |
0cd0a820 | 2 | * Generated by util/mkerr.pl DO NOT EDIT |
d8171446 | 3 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. |
65e81670 | 4 | * |
a7f182b7 | 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 | |
65e81670 BM |
9 | */ |
10 | ||
65e81670 | 11 | #include <openssl/err.h> |
52df25cf | 12 | #include <openssl/ecerr.h> |
14a6c6a4 | 13 | #include "crypto/ecerr.h" |
65e81670 | 14 | |
14a6c6a4 RL |
15 | #ifndef OPENSSL_NO_EC |
16 | ||
17 | # ifndef OPENSSL_NO_ERR | |
29dc3508 | 18 | |
52df25cf RS |
19 | static const ERR_STRING_DATA EC_str_reasons[] = { |
20 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_ASN1_ERROR), "asn1 error"}, | |
21 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_BAD_SIGNATURE), "bad signature"}, | |
22 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_BIGNUM_OUT_OF_RANGE), "bignum out of range"}, | |
23 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_BUFFER_TOO_SMALL), "buffer too small"}, | |
e0033efc | 24 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_CANNOT_INVERT), "cannot invert"}, |
52df25cf RS |
25 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_COORDINATES_OUT_OF_RANGE), |
26 | "coordinates out of range"}, | |
27 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_CURVE_DOES_NOT_SUPPORT_ECDH), | |
28 | "curve does not support ecdh"}, | |
59cba5ac P |
29 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_CURVE_DOES_NOT_SUPPORT_ECDSA), |
30 | "curve does not support ecdsa"}, | |
52df25cf RS |
31 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_CURVE_DOES_NOT_SUPPORT_SIGNING), |
32 | "curve does not support signing"}, | |
52df25cf RS |
33 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_DECODE_ERROR), "decode error"}, |
34 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_DISCRIMINANT_IS_ZERO), | |
35 | "discriminant is zero"}, | |
36 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_EC_GROUP_NEW_BY_NAME_FAILURE), | |
37 | "ec group new by name failure"}, | |
d8171446 P |
38 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_FAILED_MAKING_PUBLIC_KEY), |
39 | "failed making public key"}, | |
52df25cf RS |
40 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_FIELD_TOO_LARGE), "field too large"}, |
41 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_GF2M_NOT_SUPPORTED), "gf2m not supported"}, | |
42 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_GROUP2PKPARAMETERS_FAILURE), | |
43 | "group2pkparameters failure"}, | |
44 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_I2D_ECPKPARAMETERS_FAILURE), | |
45 | "i2d ecpkparameters failure"}, | |
46 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INCOMPATIBLE_OBJECTS), | |
47 | "incompatible objects"}, | |
c0f39ded | 48 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_A), "invalid a"}, |
52df25cf | 49 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_ARGUMENT), "invalid argument"}, |
c0f39ded SL |
50 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_B), "invalid b"}, |
51 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_COFACTOR), "invalid cofactor"}, | |
52df25cf RS |
52 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_COMPRESSED_POINT), |
53 | "invalid compressed point"}, | |
54 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_COMPRESSION_BIT), | |
55 | "invalid compression bit"}, | |
56 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_CURVE), "invalid curve"}, | |
57 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_DIGEST), "invalid digest"}, | |
58 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_DIGEST_TYPE), "invalid digest type"}, | |
59 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_ENCODING), "invalid encoding"}, | |
60 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_FIELD), "invalid field"}, | |
61 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_FORM), "invalid form"}, | |
c0f39ded | 62 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_GENERATOR), "invalid generator"}, |
52df25cf RS |
63 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_GROUP_ORDER), "invalid group order"}, |
64 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_KEY), "invalid key"}, | |
c0f39ded SL |
65 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_NAMED_GROUP_CONVERSION), |
66 | "invalid named group conversion"}, | |
52df25cf RS |
67 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_OUTPUT_LENGTH), |
68 | "invalid output length"}, | |
c0f39ded | 69 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_P), "invalid p"}, |
52df25cf RS |
70 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_PEER_KEY), "invalid peer key"}, |
71 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_PENTANOMIAL_BASIS), | |
72 | "invalid pentanomial basis"}, | |
73 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_PRIVATE_KEY), "invalid private key"}, | |
c0f39ded | 74 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_SEED), "invalid seed"}, |
52df25cf RS |
75 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_INVALID_TRINOMIAL_BASIS), |
76 | "invalid trinomial basis"}, | |
77 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_KDF_PARAMETER_ERROR), "kdf parameter error"}, | |
78 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_KEYS_NOT_SET), "keys not set"}, | |
37124360 NT |
79 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_LADDER_POST_FAILURE), "ladder post failure"}, |
80 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_LADDER_PRE_FAILURE), "ladder pre failure"}, | |
81 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_LADDER_STEP_FAILURE), "ladder step failure"}, | |
e0137ca9 | 82 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_MISSING_OID), "missing OID"}, |
52df25cf RS |
83 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_MISSING_PARAMETERS), "missing parameters"}, |
84 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_MISSING_PRIVATE_KEY), "missing private key"}, | |
85 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_NEED_NEW_SETUP_VALUES), | |
86 | "need new setup values"}, | |
87 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_NOT_A_NIST_PRIME), "not a NIST prime"}, | |
88 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_NOT_IMPLEMENTED), "not implemented"}, | |
89 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_NOT_INITIALIZED), "not initialized"}, | |
90 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_NO_PARAMETERS_SET), "no parameters set"}, | |
91 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_NO_PRIVATE_VALUE), "no private value"}, | |
92 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_OPERATION_NOT_SUPPORTED), | |
93 | "operation not supported"}, | |
94 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_PASSED_NULL_PARAMETER), | |
95 | "passed null parameter"}, | |
96 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_PEER_KEY_ERROR), "peer key error"}, | |
52df25cf RS |
97 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_POINT_ARITHMETIC_FAILURE), |
98 | "point arithmetic failure"}, | |
99 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_POINT_AT_INFINITY), "point at infinity"}, | |
37124360 NT |
100 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_POINT_COORDINATES_BLIND_FAILURE), |
101 | "point coordinates blind failure"}, | |
52df25cf RS |
102 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_POINT_IS_NOT_ON_CURVE), |
103 | "point is not on curve"}, | |
104 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_RANDOM_NUMBER_GENERATION_FAILED), | |
105 | "random number generation failed"}, | |
106 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_SHARED_INFO_ERROR), "shared info error"}, | |
107 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_SLOT_FULL), "slot full"}, | |
108 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_UNDEFINED_GENERATOR), "undefined generator"}, | |
109 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_UNDEFINED_ORDER), "undefined order"}, | |
01ad66f8 | 110 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_UNKNOWN_COFACTOR), "unknown cofactor"}, |
52df25cf RS |
111 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_UNKNOWN_GROUP), "unknown group"}, |
112 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_UNKNOWN_ORDER), "unknown order"}, | |
113 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_UNSUPPORTED_FIELD), "unsupported field"}, | |
114 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_WRONG_CURVE_PARAMETERS), | |
115 | "wrong curve parameters"}, | |
116 | {ERR_PACK(ERR_LIB_EC, 0, EC_R_WRONG_ORDER), "wrong order"}, | |
0f113f3e MC |
117 | {0, NULL} |
118 | }; | |
65e81670 | 119 | |
14a6c6a4 | 120 | # endif |
65e81670 | 121 | |
b93f6c2d | 122 | int ossl_err_load_EC_strings(void) |
0f113f3e | 123 | { |
14a6c6a4 | 124 | # ifndef OPENSSL_NO_ERR |
0cd1b144 | 125 | if (ERR_reason_error_string(EC_str_reasons[0].error) == NULL) |
52df25cf | 126 | ERR_load_strings_const(EC_str_reasons); |
14a6c6a4 | 127 | # endif |
69588edb | 128 | return 1; |
0f113f3e | 129 | } |
14a6c6a4 RL |
130 | #else |
131 | NON_EMPTY_TRANSLATION_UNIT | |
132 | #endif |