Merge branch 'OpenSSL_1_0_2-stable' of /home/steve/src/git/openssl into OpenSSL_1_0_2-stable

This commit is contained in:
Dr. Stephen Henson 2013-02-04 15:14:11 +00:00
commit 115f7fa562
3 changed files with 12 additions and 19 deletions

View File

@ -40,7 +40,8 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or ( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
die "can't locate x86_64-xlate.pl"; die "can't locate x86_64-xlate.pl";
open STDOUT,"| \"$^X\" $xlate $flavour $output"; open OUT,"| \"$^X\" $xlate $flavour $output";
*STDOUT=*OUT;
# int bn_mul_mont( # int bn_mul_mont(
$rp="%rdi"; # BN_ULONG *rp, $rp="%rdi"; # BN_ULONG *rp,

View File

@ -28,7 +28,8 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or ( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
die "can't locate x86_64-xlate.pl"; die "can't locate x86_64-xlate.pl";
open STDOUT,"| \"$^X\" $xlate $flavour $output"; open OUT,"| \"$^X\" $xlate $flavour $output";
*STDOUT=*OUT;
# int bn_mul_mont_gather5( # int bn_mul_mont_gather5(
$rp="%rdi"; # BN_ULONG *rp, $rp="%rdi"; # BN_ULONG *rp,

View File

@ -144,26 +144,17 @@ int BN_add_word(BIGNUM *a, BN_ULONG w)
a->neg=!(a->neg); a->neg=!(a->neg);
return(i); return(i);
} }
/* Only expand (and risk failing) if it's possibly necessary */ for (i=0;w!=0 && i<a->top;i++)
if (((BN_ULONG)(a->d[a->top - 1] + 1) == 0) &&
(bn_wexpand(a,a->top+1) == NULL))
return(0);
i=0;
for (;;)
{ {
if (i >= a->top) a->d[i] = l = (a->d[i]+w)&BN_MASK2;
l=w; w = (w>l)?1:0;
else
l=(a->d[i]+w)&BN_MASK2;
a->d[i]=l;
if (w > l)
w=1;
else
break;
i++;
} }
if (i >= a->top) if (w && i==a->top)
{
if (bn_wexpand(a,a->top+1) == NULL) return 0;
a->top++; a->top++;
a->d[i]=w;
}
bn_check_top(a); bn_check_top(a);
return(1); return(1);
} }