Check BN_rand return value.
"make update".
This commit is contained in:
parent
2c51f2d909
commit
19c057da2e
17
TABLE
17
TABLE
@ -1292,6 +1292,23 @@ $rc4_obj = asm/rx86-elf.o
|
|||||||
$rmd160_obj = asm/rm86-elf.o
|
$rmd160_obj = asm/rm86-elf.o
|
||||||
$rc5_obj = asm/r586-elf.o
|
$rc5_obj = asm/r586-elf.o
|
||||||
|
|
||||||
|
*** linux-ia64
|
||||||
|
$cc = gcc
|
||||||
|
$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
|
||||||
|
$unistd =
|
||||||
|
$thread_cflag = (unknown)
|
||||||
|
$lflags =
|
||||||
|
$bn_ops = SIXTY_FOUR_BIT_LONG
|
||||||
|
$bn_obj =
|
||||||
|
$des_obj =
|
||||||
|
$bf_obj =
|
||||||
|
$md5_obj =
|
||||||
|
$sha1_obj =
|
||||||
|
$cast_obj =
|
||||||
|
$rc4_obj =
|
||||||
|
$rmd160_obj =
|
||||||
|
$rc5_obj =
|
||||||
|
|
||||||
*** linux-mips
|
*** linux-mips
|
||||||
$cc = gcc
|
$cc = gcc
|
||||||
$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
|
$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
|
||||||
|
@ -84,7 +84,8 @@ int DSA_generate_key(DSA *dsa)
|
|||||||
i=BN_num_bits(dsa->q);
|
i=BN_num_bits(dsa->q);
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
BN_rand(priv_key,i,1,0);
|
if (!BN_rand(priv_key,i,1,0))
|
||||||
|
goto err;
|
||||||
if (BN_cmp(priv_key,dsa->q) >= 0)
|
if (BN_cmp(priv_key,dsa->q) >= 0)
|
||||||
BN_sub(priv_key,priv_key,dsa->q);
|
BN_sub(priv_key,priv_key,dsa->q);
|
||||||
if (!BN_is_zero(priv_key)) break;
|
if (!BN_is_zero(priv_key)) break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user