Change error message to "bignum too long"
This commit is contained in:
parent
4c4f1ee4de
commit
79370621ea
@ -498,6 +498,7 @@ BN_ULONG bn_sub_words(BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int num);
|
|||||||
/* Reason codes. */
|
/* Reason codes. */
|
||||||
#define BN_R_ARG2_LT_ARG3 100
|
#define BN_R_ARG2_LT_ARG3 100
|
||||||
#define BN_R_BAD_RECIPROCAL 101
|
#define BN_R_BAD_RECIPROCAL 101
|
||||||
|
#define BN_R_BIGNUM_TOO_LONG 114
|
||||||
#define BN_R_CALLED_WITH_EVEN_MODULUS 102
|
#define BN_R_CALLED_WITH_EVEN_MODULUS 102
|
||||||
#define BN_R_DIV_BY_ZERO 103
|
#define BN_R_DIV_BY_ZERO 103
|
||||||
#define BN_R_ENCODING_ERROR 104
|
#define BN_R_ENCODING_ERROR 104
|
||||||
@ -505,7 +506,6 @@ BN_ULONG bn_sub_words(BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int num);
|
|||||||
#define BN_R_INVALID_LENGTH 106
|
#define BN_R_INVALID_LENGTH 106
|
||||||
#define BN_R_NOT_INITIALIZED 107
|
#define BN_R_NOT_INITIALIZED 107
|
||||||
#define BN_R_NO_INVERSE 108
|
#define BN_R_NO_INVERSE 108
|
||||||
#define BN_R_TOO_LARGE 114
|
|
||||||
#define BN_R_TOO_MANY_TEMPORARY_VARIABLES 109
|
#define BN_R_TOO_MANY_TEMPORARY_VARIABLES 109
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -92,6 +92,7 @@ static ERR_STRING_DATA BN_str_reasons[]=
|
|||||||
{
|
{
|
||||||
{BN_R_ARG2_LT_ARG3 ,"arg2 lt arg3"},
|
{BN_R_ARG2_LT_ARG3 ,"arg2 lt arg3"},
|
||||||
{BN_R_BAD_RECIPROCAL ,"bad reciprocal"},
|
{BN_R_BAD_RECIPROCAL ,"bad reciprocal"},
|
||||||
|
{BN_R_BIGNUM_TOO_LONG ,"bignum too long"},
|
||||||
{BN_R_CALLED_WITH_EVEN_MODULUS ,"called with even modulus"},
|
{BN_R_CALLED_WITH_EVEN_MODULUS ,"called with even modulus"},
|
||||||
{BN_R_DIV_BY_ZERO ,"div by zero"},
|
{BN_R_DIV_BY_ZERO ,"div by zero"},
|
||||||
{BN_R_ENCODING_ERROR ,"encoding error"},
|
{BN_R_ENCODING_ERROR ,"encoding error"},
|
||||||
@ -99,7 +100,6 @@ static ERR_STRING_DATA BN_str_reasons[]=
|
|||||||
{BN_R_INVALID_LENGTH ,"invalid length"},
|
{BN_R_INVALID_LENGTH ,"invalid length"},
|
||||||
{BN_R_NOT_INITIALIZED ,"not initialized"},
|
{BN_R_NOT_INITIALIZED ,"not initialized"},
|
||||||
{BN_R_NO_INVERSE ,"no inverse"},
|
{BN_R_NO_INVERSE ,"no inverse"},
|
||||||
{BN_R_TOO_LARGE ,"too large"},
|
|
||||||
{BN_R_TOO_MANY_TEMPORARY_VARIABLES ,"too many temporary variables"},
|
{BN_R_TOO_MANY_TEMPORARY_VARIABLES ,"too many temporary variables"},
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
@ -322,7 +322,7 @@ BIGNUM *bn_expand2(BIGNUM *b, int words)
|
|||||||
{
|
{
|
||||||
if (words > (INT_MAX/(4*BN_BITS2)))
|
if (words > (INT_MAX/(4*BN_BITS2)))
|
||||||
{
|
{
|
||||||
BNerr(BN_F_BN_EXPAND2,BN_R_TOO_LARGE);
|
BNerr(BN_F_BN_EXPAND2,BN_R_BIGNUM_TOO_LONG);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user