Commit a0a54079 authored by Mark J. Cox's avatar Mark J. Cox
Browse files

Fixes to BN code. Previously the default was to define BN_RECURSION

but the BN code had some problems that would cause failures when
doing certificate verification and some other functions.

Submitted by: Eric A Young from a C2Net version of SSLeay
Reviewed by: Mark J Cox
PR:
parent 8938272b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -5,6 +5,11 @@

 Changes between 0.9.1c and 0.9.2

  *) Fixes to BN code.  Previously the default was to define BN_RECURSION
     but the BN code had some problems that would cause failures when
     doing certificate verification and some other functions.
     [Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)]

  *) Add ASN1 and PEM code to support netscape certificate sequences.
     [Steve Henson]

+12 −14
Original line number Diff line number Diff line
@@ -566,20 +566,18 @@ int BN_div_recp();
#define BN_F_BN_BLINDING_INVERT				 101
#define BN_F_BN_BLINDING_NEW				 102
#define BN_F_BN_BLINDING_UPDATE				 103
#define BN_F_BN_BL_CTX_INIT				 104
#define BN_F_BN_BL_CTX_NEW				 105
#define BN_F_BN_BN2DEC					 106
#define BN_F_BN_BN2HEX					 107
#define BN_F_BN_CTX_NEW					 108
#define BN_F_BN_DIV					 109
#define BN_F_BN_EXPAND2					 110
#define BN_F_BN_MOD_EXP_MONT				 111
#define BN_F_BN_MOD_INVERSE				 112
#define BN_F_BN_MOD_MUL_RECIPROCAL			 113
#define BN_F_BN_MPI2BN					 114
#define BN_F_BN_NEW					 115
#define BN_F_BN_RAND					 116
#define BN_F_BN_USUB					 117
#define BN_F_BN_BN2DEC					 104
#define BN_F_BN_BN2HEX					 105
#define BN_F_BN_CTX_NEW					 106
#define BN_F_BN_DIV					 107
#define BN_F_BN_EXPAND2					 108
#define BN_F_BN_MOD_EXP_MONT				 109
#define BN_F_BN_MOD_INVERSE				 110
#define BN_F_BN_MOD_MUL_RECIPROCAL			 111
#define BN_F_BN_MPI2BN					 112
#define BN_F_BN_NEW					 113
#define BN_F_BN_RAND					 114
#define BN_F_BN_USUB					 115

/* Reason codes. */
#define BN_R_ARG2_LT_ARG3				 100
+0 −3
Original line number Diff line number Diff line
@@ -176,9 +176,6 @@ BIGNUM *a;
BIGNUM *b;
	{
	int max,min;
#if 0
	int ret=1;
#endif
	register BN_ULONG t1,t2,*ap,*bp,*rp;
	int i,carry;
#if defined(IRIX_CC_BUG) && !defined(LINT)
+3 −1
Original line number Diff line number Diff line
@@ -447,7 +447,7 @@ int n;
	return(c);
	}

#ifdef BN_COMBA
#ifdef BN_MUL_COMBA

#undef bn_mul_comba8
#undef bn_mul_comba4
@@ -790,6 +790,7 @@ BN_ULONG *r,*a;
#else

/* hmm... is it faster just to do a multiply? */
#undef bn_sqr_comba4
void bn_sqr_comba4(r,a)
BN_ULONG *r,*a;
	{
@@ -797,6 +798,7 @@ BN_ULONG *r,*a;
	bn_sqr_normal(r,a,4,t);
	}

#undef bn_sqr_comba8
void bn_sqr_comba8(r,a)
BN_ULONG *r,*a;
	{
+0 −2
Original line number Diff line number Diff line
@@ -67,8 +67,6 @@ static ERR_STRING_DATA BN_str_functs[]=
{ERR_PACK(0,BN_F_BN_BLINDING_INVERT,0),	"BN_BLINDING_invert"},
{ERR_PACK(0,BN_F_BN_BLINDING_NEW,0),	"BN_BLINDING_new"},
{ERR_PACK(0,BN_F_BN_BLINDING_UPDATE,0),	"BN_BLINDING_update"},
{ERR_PACK(0,BN_F_BN_BL_CTX_INIT,0),	"BN_BL_CTX_INIT"},
{ERR_PACK(0,BN_F_BN_BL_CTX_NEW,0),	"BN_BL_CTX_NEW"},
{ERR_PACK(0,BN_F_BN_BN2DEC,0),	"BN_bn2dec"},
{ERR_PACK(0,BN_F_BN_BN2HEX,0),	"BN_bn2hex"},
{ERR_PACK(0,BN_F_BN_CTX_NEW,0),	"BN_CTX_new"},
Loading