From: Bodo Möller Date: Thu, 6 Feb 2003 18:00:20 +0000 (+0000) Subject: EC_GROUP_get_extra_data() should not set an error when it returns NULL. X-Git-Tag: OpenSSL_0_9_7a~20 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=98eab43915245ce273bcb6b42569aae7c720ba4d;p=oweals%2Fopenssl.git EC_GROUP_get_extra_data() should not set an error when it returns NULL. (NB: this is not an API change because this internal function is unused in 0.9.7. 0.9.8-dev will use it, and will contain a similar change). --- diff --git a/crypto/ec/ec.h b/crypto/ec/ec.h index a52d4edf14..6d6a9b7127 100644 --- a/crypto/ec/ec.h +++ b/crypto/ec/ec.h @@ -195,7 +195,6 @@ void ERR_load_EC_strings(void); #define EC_F_EC_GROUP_GET0_GENERATOR 139 #define EC_F_EC_GROUP_GET_COFACTOR 140 #define EC_F_EC_GROUP_GET_CURVE_GFP 130 -#define EC_F_EC_GROUP_GET_EXTRA_DATA 107 #define EC_F_EC_GROUP_GET_ORDER 141 #define EC_F_EC_GROUP_NEW 108 #define EC_F_EC_GROUP_PRECOMPUTE_MULT 142 @@ -232,7 +231,6 @@ void ERR_load_EC_strings(void); #define EC_R_INVALID_FIELD 103 #define EC_R_INVALID_FORM 104 #define EC_R_NOT_INITIALIZED 111 -#define EC_R_NO_SUCH_EXTRA_DATA 105 #define EC_R_POINT_AT_INFINITY 106 #define EC_R_POINT_IS_NOT_ON_CURVE 107 #define EC_R_SLOT_FULL 108 diff --git a/crypto/ec/ec_err.c b/crypto/ec/ec_err.c index 394cdc021f..d37b6aba87 100644 --- a/crypto/ec/ec_err.c +++ b/crypto/ec/ec_err.c @@ -84,7 +84,6 @@ static ERR_STRING_DATA EC_str_functs[]= {ERR_PACK(0,EC_F_EC_GROUP_GET0_GENERATOR,0), "EC_GROUP_get0_generator"}, {ERR_PACK(0,EC_F_EC_GROUP_GET_COFACTOR,0), "EC_GROUP_get_cofactor"}, {ERR_PACK(0,EC_F_EC_GROUP_GET_CURVE_GFP,0), "EC_GROUP_get_curve_GFp"}, -{ERR_PACK(0,EC_F_EC_GROUP_GET_EXTRA_DATA,0), "EC_GROUP_get_extra_data"}, {ERR_PACK(0,EC_F_EC_GROUP_GET_ORDER,0), "EC_GROUP_get_order"}, {ERR_PACK(0,EC_F_EC_GROUP_NEW,0), "EC_GROUP_new"}, {ERR_PACK(0,EC_F_EC_GROUP_PRECOMPUTE_MULT,0), "EC_GROUP_precompute_mult"}, @@ -124,7 +123,6 @@ static ERR_STRING_DATA EC_str_reasons[]= {EC_R_INVALID_FIELD ,"invalid field"}, {EC_R_INVALID_FORM ,"invalid form"}, {EC_R_NOT_INITIALIZED ,"not initialized"}, -{EC_R_NO_SUCH_EXTRA_DATA ,"no such extra data"}, {EC_R_POINT_AT_INFINITY ,"point at infinity"}, {EC_R_POINT_IS_NOT_ON_CURVE ,"point is not on curve"}, {EC_R_SLOT_FULL ,"slot full"}, diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c index 1d2cc71eef..591cb4f12b 100644 --- a/crypto/ec/ec_lib.c +++ b/crypto/ec/ec_lib.c @@ -268,7 +268,9 @@ void *EC_GROUP_get_extra_data(const EC_GROUP *group, void *(*extra_data_dup_func || (group->extra_data_free_func != extra_data_free_func) || (group->extra_data_clear_free_func != extra_data_clear_free_func)) { +#if 0 /* this was an error in 0.9.7, but that does not make a lot of sense */ ECerr(EC_F_EC_GROUP_GET_EXTRA_DATA, EC_R_NO_SUCH_EXTRA_DATA); +#endif return NULL; }