summaryrefslogtreecommitdiffstats
path: root/crypto/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2018-05-31 16:30:33 +0100
committerMatt Caswell <matt@openssl.org>2018-06-04 11:59:56 +0100
commit722add716bce487f5818cc57cb594fd526454b70 (patch)
tree279b09705029607fa7494130139ac49f43e978f4 /crypto/include
parent2167239abaec5fa44072fa1194505af0b3fced89 (diff)
Rebuild error codes
There were a large number of error codes that were unused (probably a copy&paste from somewhere else). Since these have never been made public we should remove then and rebuild the error codes. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6386)
Diffstat (limited to 'crypto/include')
-rw-r--r--crypto/include/internal/sm2err.h91
1 files changed, 16 insertions, 75 deletions
diff --git a/crypto/include/internal/sm2err.h b/crypto/include/internal/sm2err.h
index 0842666a31..f2d60e1744 100644
--- a/crypto/include/internal/sm2err.h
+++ b/crypto/include/internal/sm2err.h
@@ -23,85 +23,26 @@ int ERR_load_SM2_strings(void);
/*
* SM2 function codes.
*/
-# define SM2_F_PKEY_SM2_CTRL 274
-# define SM2_F_PKEY_SM2_CTRL_STR 275
-# define SM2_F_PKEY_SM2_KEYGEN 276
-# define SM2_F_PKEY_SM2_PARAMGEN 277
-# define SM2_F_PKEY_SM2_SIGN 278
-# define SM2_F_SM2_COMPUTE_MSG_HASH 284
-# define SM2_F_SM2_COMPUTE_USERID_DIGEST 286
-# define SM2_F_SM2_DECRYPT 279
-# define SM2_F_SM2_ENCRYPT 280
-# define SM2_F_SM2_PLAINTEXT_SIZE 287
-# define SM2_F_SM2_SIGN 281
-# define SM2_F_SM2_SIG_GEN 285
-# define SM2_F_SM2_SIG_VERIFY 282
-# define SM2_F_SM2_VERIFY 283
+# define SM2_F_SM2_COMPUTE_MSG_HASH 100
+# define SM2_F_SM2_COMPUTE_USERID_DIGEST 101
+# define SM2_F_SM2_DECRYPT 102
+# define SM2_F_SM2_ENCRYPT 103
+# define SM2_F_SM2_PLAINTEXT_SIZE 104
+# define SM2_F_SM2_SIGN 105
+# define SM2_F_SM2_SIG_GEN 106
+# define SM2_F_SM2_SIG_VERIFY 107
+# define SM2_F_SM2_VERIFY 108
/*
* SM2 reason codes.
*/
-# define SM2_R_ASN1_ERROR 115
-# define SM2_R_ASN5_ERROR 1150
-# define SM2_R_BAD_SIGNATURE 156
-# define SM2_R_BIGNUM_OUT_OF_RANGE 144
-# define SM2_R_BUFFER_TOO_SMALL 100
-# define SM2_R_COORDINATES_OUT_OF_RANGE 146
-# define SM2_R_CURVE_DOES_NOT_SUPPORT_ECDH 160
-# define SM2_R_CURVE_DOES_NOT_SUPPORT_SIGNING 159
-# define SM2_R_D2I_ECPKPARAMETERS_FAILURE 117
-# define SM2_R_DECODE_ERROR 142
-# define SM2_R_DISCRIMINANT_IS_ZERO 118
-# define SM2_R_EC_GROUP_NEW_BY_NAME_FAILURE 119
-# define SM2_R_FIELD_TOO_LARGE 143
-# define SM2_R_GF2M_NOT_SUPPORTED 147
-# define SM2_R_GROUP2PKPARAMETERS_FAILURE 120
-# define SM2_R_I2D_ECPKPARAMETERS_FAILURE 121
-# define SM2_R_INCOMPATIBLE_OBJECTS 101
-# define SM2_R_INVALID_ARGUMENT 112
-# define SM2_R_INVALID_COMPRESSED_POINT 110
-# define SM2_R_INVALID_COMPRESSION_BIT 109
-# define SM2_R_INVALID_CURVE 141
-# define SM2_R_INVALID_DIGEST 151
-# define SM2_R_INVALID_DIGEST_TYPE 138
-# define SM2_R_INVALID_ENCODING 102
-# define SM2_R_INVALID_FIELD 103
-# define SM2_R_INVALID_FORM 104
-# define SM2_R_INVALID_GROUP_ORDER 122
-# define SM2_R_INVALID_KEY 116
-# define SM2_R_INVALID_OUTPUT_LENGTH 161
-# define SM2_R_INVALID_PEER_KEY 133
-# define SM2_R_INVALID_PENTANOMIAL_BASIS 132
-# define SM2_R_INVALID_PRIVATE_KEY 123
-# define SM2_R_INVALID_TRINOMIAL_BASIS 137
-# define SM2_R_KDF_PARAMETER_ERROR 148
-# define SM2_R_KEYS_NOT_SET 140
-# define SM2_R_MISSING_PARAMETERS 124
-# define SM2_R_MISSING_PRIVATE_KEY 125
-# define SM2_R_NEED_NEW_SETUP_VALUES 157
-# define SM2_R_NOT_A_NIST_PRIME 135
-# define SM2_R_NOT_IMPLEMENTED 126
-# define SM2_R_NOT_INITIALIZED 111
-# define SM2_R_NO_PARAMETERS_SET 139
-# define SM2_R_NO_PRIVATE_VALUE 154
-# define SM2_R_OPERATION_NOT_SUPPORTED 152
-# define SM2_R_PASSED_NULL_PARAMETER 134
-# define SM2_R_PEER_KEY_ERROR 149
-# define SM2_R_PKPARAMETERS2GROUP_FAILURE 127
-# define SM2_R_POINT_ARITHMETIC_FAILURE 155
-# define SM2_R_POINT_AT_INFINITY 106
-# define SM2_R_POINT_IS_NOT_ON_CURVE 107
-# define SM2_R_RANDOM_NUMBER_GENERATION_FAILED 158
-# define SM2_R_SHARED_INFO_ERROR 150
-# define SM2_R_SLOT_FULL 108
-# define SM2_R_UNDEFINED_GENERATOR 113
-# define SM2_R_UNDEFINED_ORDER 128
-# define SM2_R_UNKNOWN_GROUP 129
-# define SM2_R_UNKNOWN_ORDER 114
-# define SM2_R_UNSUPPORTED_FIELD 131
-# define SM2_R_USER_ID_TOO_LARGE 136
-# define SM2_R_WRONG_CURVE_PARAMETERS 145
-# define SM2_R_WRONG_ORDER 130
+# define SM2_R_ASN1_ERROR 100
+# define SM2_R_BAD_SIGNATURE 101
+# define SM2_R_INVALID_DIGEST 102
+# define SM2_R_INVALID_DIGEST_TYPE 103
+# define SM2_R_INVALID_ENCODING 104
+# define SM2_R_INVALID_FIELD 105
+# define SM2_R_USER_ID_TOO_LARGE 106
# endif
#endif