mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
See ChangeLog: Tue Apr 6 19:58:12 CEST 1999 Werner Koch
This commit is contained in:
parent
88d44edc56
commit
1b9a820c19
12 changed files with 145 additions and 53 deletions
|
@ -1,3 +1,10 @@
|
|||
Tue Apr 6 19:58:12 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* random.c (get_random_bits): Can now handle requests > POOLSIZE
|
||||
|
||||
* cipher.c (cipher_open): Now uses standard CFB for automode if
|
||||
the blocksize is gt 8 (according to rfc2440).
|
||||
|
||||
Sat Mar 20 11:44:21 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* rndlinux.c (tty_printf) [IS_MODULE]: Removed.
|
||||
|
|
|
@ -340,7 +340,8 @@ cipher_open( int algo, int mode, int secure )
|
|||
if( algo == CIPHER_ALGO_DUMMY )
|
||||
hd->mode = CIPHER_MODE_DUMMY;
|
||||
else if( mode == CIPHER_MODE_AUTO_CFB ) {
|
||||
if( algo == CIPHER_ALGO_BLOWFISH160 || algo >= 100 )
|
||||
if( hd->blocksize > 8
|
||||
|| algo == CIPHER_ALGO_BLOWFISH160 || algo >= 100 )
|
||||
hd->mode = CIPHER_MODE_CFB;
|
||||
else
|
||||
hd->mode = CIPHER_MODE_PHILS_CFB;
|
||||
|
|
|
@ -169,14 +169,19 @@ random_is_faked()
|
|||
byte *
|
||||
get_random_bits( size_t nbits, int level, int secure )
|
||||
{
|
||||
byte *buf;
|
||||
byte *buf, *p;
|
||||
size_t nbytes = (nbits+7)/8;
|
||||
|
||||
if( quick_test && level > 1 )
|
||||
level = 1;
|
||||
MASK_LEVEL(level);
|
||||
buf = secure && secure_alloc ? m_alloc_secure( nbytes ) : m_alloc( nbytes );
|
||||
read_pool( buf, nbytes, level );
|
||||
for( p = buf; nbytes > 0; ) {
|
||||
size_t n = nbytes > POOLSIZE? POOLSIZE : nbytes;
|
||||
read_pool( p, n, level );
|
||||
nbytes -= n;
|
||||
p += n;
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue