Loading CHANGES +3 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,9 @@ Changes between 0.9.5a and 0.9.6 [xx XXX 2000] *) Changes needed for Tandem NSK. [Scott Uroff scott@xpro.com] *) Fix SSL 2.0 rollback checking: Due to an off-by-one error in RSA_padding_check_SSLv23(), special padding was never detected and thus the SSL 3.0/TLS 1.0 countermeasure against protocol Loading crypto/asn1/asn1_par.c +2 −2 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset, if (BIO_write(bp,"\n",1) <= 0) goto end; } if (BIO_dump_indent(bp,opp, if (BIO_dump_indent(bp,(char *)opp, ((dump == -1 || dump > os->length)?os->length:dump), dump_indent) <= 0) goto end; Loading Loading @@ -373,7 +373,7 @@ static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset, if (BIO_write(bp,"\n",1) <= 0) goto end; } if (BIO_dump_indent(bp,p, if (BIO_dump_indent(bp,(char *)p, ((dump == -1 || dump > len)?len:dump), dump_indent) <= 0) goto end; Loading crypto/bn/bn.h +3 −3 Original line number Diff line number Diff line Loading @@ -233,7 +233,7 @@ typedef struct bignum_st BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ int top; /* Index of last used d +1. */ /* The next are internal book keeping for bn_expand. */ int max; /* Size of the d array. */ int dmax; /* Size of the d array. */ int neg; /* one if the number is negative */ int flags; } BIGNUM; Loading Loading @@ -435,9 +435,9 @@ int BN_div_recp(BIGNUM *dv, BIGNUM *rem, BIGNUM *m, /* library internal functions */ #define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->max)?\ #define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\ (a):bn_expand2((a),(bits)/BN_BITS2+1)) #define bn_wexpand(a,words) (((words) <= (a)->max)?(a):bn_expand2((a),(words))) #define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words))) BIGNUM *bn_expand2(BIGNUM *a, int words); #define bn_fix_top(a) \ Loading crypto/bn/bn_div.c +1 −1 Original line number Diff line number Diff line Loading @@ -205,7 +205,7 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor, BN_init(&wnum); wnum.d= &(snum->d[loop]); wnum.top= div_n; wnum.max= snum->max+1; /* a bit of a lie */ wnum.dmax= snum->dmax+1; /* a bit of a lie */ /* Get the top 2 words of sdiv */ /* i=sdiv->top; */ Loading crypto/bn/bn_lib.c +7 −7 Original line number Diff line number Diff line Loading @@ -262,7 +262,7 @@ void BN_clear_free(BIGNUM *a) if (a == NULL) return; if (a->d != NULL) { memset(a->d,0,a->max*sizeof(a->d[0])); memset(a->d,0,a->dmax*sizeof(a->d[0])); if (!(BN_get_flags(a,BN_FLG_STATIC_DATA))) OPENSSL_free(a->d); } Loading Loading @@ -299,7 +299,7 @@ BIGNUM *BN_new(void) ret->flags=BN_FLG_MALLOCED; ret->top=0; ret->neg=0; ret->max=0; ret->dmax=0; ret->d=NULL; return(ret); } Loading @@ -317,7 +317,7 @@ BIGNUM *bn_expand2(BIGNUM *b, int words) bn_check_top(b); if (words > b->max) if (words > b->dmax) { bn_check_top(b); if (BN_get_flags(b,BN_FLG_STATIC_DATA)) Loading Loading @@ -427,17 +427,17 @@ BIGNUM *bn_expand2(BIGNUM *b, int words) } b->d=a; b->max=words; b->dmax=words; /* Now need to zero any data between b->top and b->max */ A= &(b->d[b->top]); for (i=(b->max - b->top)>>3; i>0; i--,A+=8) for (i=(b->dmax - b->top)>>3; i>0; i--,A+=8) { A[0]=0; A[1]=0; A[2]=0; A[3]=0; A[4]=0; A[5]=0; A[6]=0; A[7]=0; } for (i=(b->max - b->top)&7; i>0; i--,A++) for (i=(b->dmax - b->top)&7; i>0; i--,A++) A[0]=0; #else memset(A,0,sizeof(BN_ULONG)*(words+1)); Loading Loading @@ -508,7 +508,7 @@ BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b) void BN_clear(BIGNUM *a) { if (a->d != NULL) memset(a->d,0,a->max*sizeof(a->d[0])); memset(a->d,0,a->dmax*sizeof(a->d[0])); a->top=0; a->neg=0; } Loading Loading
CHANGES +3 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,9 @@ Changes between 0.9.5a and 0.9.6 [xx XXX 2000] *) Changes needed for Tandem NSK. [Scott Uroff scott@xpro.com] *) Fix SSL 2.0 rollback checking: Due to an off-by-one error in RSA_padding_check_SSLv23(), special padding was never detected and thus the SSL 3.0/TLS 1.0 countermeasure against protocol Loading
crypto/asn1/asn1_par.c +2 −2 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset, if (BIO_write(bp,"\n",1) <= 0) goto end; } if (BIO_dump_indent(bp,opp, if (BIO_dump_indent(bp,(char *)opp, ((dump == -1 || dump > os->length)?os->length:dump), dump_indent) <= 0) goto end; Loading Loading @@ -373,7 +373,7 @@ static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset, if (BIO_write(bp,"\n",1) <= 0) goto end; } if (BIO_dump_indent(bp,p, if (BIO_dump_indent(bp,(char *)p, ((dump == -1 || dump > len)?len:dump), dump_indent) <= 0) goto end; Loading
crypto/bn/bn.h +3 −3 Original line number Diff line number Diff line Loading @@ -233,7 +233,7 @@ typedef struct bignum_st BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ int top; /* Index of last used d +1. */ /* The next are internal book keeping for bn_expand. */ int max; /* Size of the d array. */ int dmax; /* Size of the d array. */ int neg; /* one if the number is negative */ int flags; } BIGNUM; Loading Loading @@ -435,9 +435,9 @@ int BN_div_recp(BIGNUM *dv, BIGNUM *rem, BIGNUM *m, /* library internal functions */ #define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->max)?\ #define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\ (a):bn_expand2((a),(bits)/BN_BITS2+1)) #define bn_wexpand(a,words) (((words) <= (a)->max)?(a):bn_expand2((a),(words))) #define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words))) BIGNUM *bn_expand2(BIGNUM *a, int words); #define bn_fix_top(a) \ Loading
crypto/bn/bn_div.c +1 −1 Original line number Diff line number Diff line Loading @@ -205,7 +205,7 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor, BN_init(&wnum); wnum.d= &(snum->d[loop]); wnum.top= div_n; wnum.max= snum->max+1; /* a bit of a lie */ wnum.dmax= snum->dmax+1; /* a bit of a lie */ /* Get the top 2 words of sdiv */ /* i=sdiv->top; */ Loading
crypto/bn/bn_lib.c +7 −7 Original line number Diff line number Diff line Loading @@ -262,7 +262,7 @@ void BN_clear_free(BIGNUM *a) if (a == NULL) return; if (a->d != NULL) { memset(a->d,0,a->max*sizeof(a->d[0])); memset(a->d,0,a->dmax*sizeof(a->d[0])); if (!(BN_get_flags(a,BN_FLG_STATIC_DATA))) OPENSSL_free(a->d); } Loading Loading @@ -299,7 +299,7 @@ BIGNUM *BN_new(void) ret->flags=BN_FLG_MALLOCED; ret->top=0; ret->neg=0; ret->max=0; ret->dmax=0; ret->d=NULL; return(ret); } Loading @@ -317,7 +317,7 @@ BIGNUM *bn_expand2(BIGNUM *b, int words) bn_check_top(b); if (words > b->max) if (words > b->dmax) { bn_check_top(b); if (BN_get_flags(b,BN_FLG_STATIC_DATA)) Loading Loading @@ -427,17 +427,17 @@ BIGNUM *bn_expand2(BIGNUM *b, int words) } b->d=a; b->max=words; b->dmax=words; /* Now need to zero any data between b->top and b->max */ A= &(b->d[b->top]); for (i=(b->max - b->top)>>3; i>0; i--,A+=8) for (i=(b->dmax - b->top)>>3; i>0; i--,A+=8) { A[0]=0; A[1]=0; A[2]=0; A[3]=0; A[4]=0; A[5]=0; A[6]=0; A[7]=0; } for (i=(b->max - b->top)&7; i>0; i--,A++) for (i=(b->dmax - b->top)&7; i>0; i--,A++) A[0]=0; #else memset(A,0,sizeof(BN_ULONG)*(words+1)); Loading Loading @@ -508,7 +508,7 @@ BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b) void BN_clear(BIGNUM *a) { if (a->d != NULL) memset(a->d,0,a->max*sizeof(a->d[0])); memset(a->d,0,a->dmax*sizeof(a->d[0])); a->top=0; a->neg=0; } Loading