Set SM2 error codes
[openssl.git] / crypto / include / internal / sm2err.h
1 /*
2  * Generated by util/mkerr.pl DO NOT EDIT
3  * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
4  *
5  * Licensed under the OpenSSL license (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 #ifndef HEADER_SM2ERR_H
12 # define HEADER_SM2ERR_H
13
14 # include <openssl/opensslconf.h>
15
16 # ifndef OPENSSL_NO_SM2
17
18 #  ifdef  __cplusplus
19 extern "C"
20 #  endif
21 int ERR_load_SM2_strings(void);
22
23 /*
24  * SM2 function codes.
25  */
26 #  define SM2_F_PKEY_SM2_CTRL                              274
27 #  define SM2_F_PKEY_SM2_CTRL_STR                          275
28 #  define SM2_F_PKEY_SM2_KEYGEN                            276
29 #  define SM2_F_PKEY_SM2_PARAMGEN                          277
30 #  define SM2_F_PKEY_SM2_SIGN                              278
31 #  define SM2_F_SM2_COMPUTE_MSG_HASH                       284
32 #  define SM2_F_SM2_DECRYPT                                279
33 #  define SM2_F_SM2_ENCRYPT                                280
34 #  define SM2_F_SM2_SIGN                                   281
35 #  define SM2_F_SM2_SIG_GEN                                285
36 #  define SM2_F_SM2_SIG_VERIFY                             282
37 #  define SM2_F_SM2_VERIFY                                 283
38
39 /*
40  * SM2 reason codes.
41  */
42 #  define SM2_R_ASN1_ERROR                                 115
43 #  define SM2_R_ASN5_ERROR                                 1150
44 #  define SM2_R_BAD_SIGNATURE                              156
45 #  define SM2_R_BIGNUM_OUT_OF_RANGE                        144
46 #  define SM2_R_BUFFER_TOO_SMALL                           100
47 #  define SM2_R_COORDINATES_OUT_OF_RANGE                   146
48 #  define SM2_R_CURVE_DOES_NOT_SUPPORT_ECDH                160
49 #  define SM2_R_CURVE_DOES_NOT_SUPPORT_SIGNING             159
50 #  define SM2_R_D2I_ECPKPARAMETERS_FAILURE                 117
51 #  define SM2_R_DECODE_ERROR                               142
52 #  define SM2_R_DISCRIMINANT_IS_ZERO                       118
53 #  define SM2_R_EC_GROUP_NEW_BY_NAME_FAILURE               119
54 #  define SM2_R_FIELD_TOO_LARGE                            143
55 #  define SM2_R_GF2M_NOT_SUPPORTED                         147
56 #  define SM2_R_GROUP2PKPARAMETERS_FAILURE                 120
57 #  define SM2_R_I2D_ECPKPARAMETERS_FAILURE                 121
58 #  define SM2_R_INCOMPATIBLE_OBJECTS                       101
59 #  define SM2_R_INVALID_ARGUMENT                           112
60 #  define SM2_R_INVALID_COMPRESSED_POINT                   110
61 #  define SM2_R_INVALID_COMPRESSION_BIT                    109
62 #  define SM2_R_INVALID_CURVE                              141
63 #  define SM2_R_INVALID_DIGEST                             151
64 #  define SM2_R_INVALID_DIGEST_TYPE                        138
65 #  define SM2_R_INVALID_ENCODING                           102
66 #  define SM2_R_INVALID_FIELD                              103
67 #  define SM2_R_INVALID_FORM                               104
68 #  define SM2_R_INVALID_GROUP_ORDER                        122
69 #  define SM2_R_INVALID_KEY                                116
70 #  define SM2_R_INVALID_OUTPUT_LENGTH                      161
71 #  define SM2_R_INVALID_PEER_KEY                           133
72 #  define SM2_R_INVALID_PENTANOMIAL_BASIS                  132
73 #  define SM2_R_INVALID_PRIVATE_KEY                        123
74 #  define SM2_R_INVALID_TRINOMIAL_BASIS                    137
75 #  define SM2_R_KDF_PARAMETER_ERROR                        148
76 #  define SM2_R_KEYS_NOT_SET                               140
77 #  define SM2_R_MISSING_PARAMETERS                         124
78 #  define SM2_R_MISSING_PRIVATE_KEY                        125
79 #  define SM2_R_NEED_NEW_SETUP_VALUES                      157
80 #  define SM2_R_NOT_A_NIST_PRIME                           135
81 #  define SM2_R_NOT_IMPLEMENTED                            126
82 #  define SM2_R_NOT_INITIALIZED                            111
83 #  define SM2_R_NO_PARAMETERS_SET                          139
84 #  define SM2_R_NO_PRIVATE_VALUE                           154
85 #  define SM2_R_OPERATION_NOT_SUPPORTED                    152
86 #  define SM2_R_PASSED_NULL_PARAMETER                      134
87 #  define SM2_R_PEER_KEY_ERROR                             149
88 #  define SM2_R_PKPARAMETERS2GROUP_FAILURE                 127
89 #  define SM2_R_POINT_ARITHMETIC_FAILURE                   155
90 #  define SM2_R_POINT_AT_INFINITY                          106
91 #  define SM2_R_POINT_IS_NOT_ON_CURVE                      107
92 #  define SM2_R_RANDOM_NUMBER_GENERATION_FAILED            158
93 #  define SM2_R_SHARED_INFO_ERROR                          150
94 #  define SM2_R_SLOT_FULL                                  108
95 #  define SM2_R_UNDEFINED_GENERATOR                        113
96 #  define SM2_R_UNDEFINED_ORDER                            128
97 #  define SM2_R_UNKNOWN_GROUP                              129
98 #  define SM2_R_UNKNOWN_ORDER                              114
99 #  define SM2_R_UNSUPPORTED_FIELD                          131
100 #  define SM2_R_WRONG_CURVE_PARAMETERS                     145
101 #  define SM2_R_WRONG_ORDER                                130
102
103 # endif
104 #endif