List Info

Thread: OpenSSL: openssl/crypto/dsa/ dsa_gen.c




OpenSSL: openssl/crypto/dsa/ dsa_gen.c
country flaguser name
Germany
2007-10-05 11:53:32
  OpenSSL CVS Repository
  http://cvs.openssl.org/
 
____________________________________________________________
________________

  Server: cvs.openssl.org                  Name:   Dr.
Stephen Henson
  Root:   /v/openssl/cvs                   Email:  steveopenssl.org
  Module: openssl                          Date:  
05-Oct-2007 18:53:32
  Branch: HEAD                             Handle:
2007100517533100

  Modified files:
    openssl/crypto/dsa      dsa_gen.c

  Log:
    Fix from fips branch.

  Summary:
    Revision    Changes     Path
    1.29        +9  -2      openssl/crypto/dsa/dsa_gen.c
 
____________________________________________________________
________________

  patch -p0 <<' .'
  Index: openssl/crypto/dsa/dsa_gen.c
 
============================================================
================
  $ cvs diff -u -r1.28 -r1.29 dsa_gen.c
  --- openssl/crypto/dsa/dsa_gen.c	16 Mar 2007 22:20:54
-0000	1.28
  +++ openssl/crypto/dsa/dsa_gen.c	5 Oct 2007 16:53:31
-0000	1.29
   -140,13 +140,20 
   
   	bits = (bits+63)/64*64;
   
  -	if (seed_len < (size_t)qsize)
  +	/* NB: seed_len == 0 is special case: copy generated
seed to
  + 	 * seed_in if it is not NULL.
  + 	 */
  +	if (seed_len && (seed_len < (size_t)qsize))
   		seed_in = NULL;		/* seed buffer too small -- ignore */
   	if (seed_len > (size_t)qsize) 
   		seed_len = qsize;	/* App. 2.2 of FIPS PUB 186 allows
larger SEED,
   					 * but our internal buffers are restricted to 160
bits*/
   	if (seed_in != NULL)
  +		{
   		memcpy(seed, seed_in, seed_len);
  +		/* set seed_in to NULL to avoid it being copied back
*/
  +		seed_in = NULL;
  +		}
   
   	if ((ctx=BN_CTX_new()) == NULL)
   		goto err;
   -328,7 +335,7 
   			ok=0;
   			goto err;
   			}
  -		if ((m > 1) && (seed_in != NULL))
memcpy(seed_in,seed, qsize);
  +		if (seed_in != NULL) memcpy(seed_in,seed, qsize);
   		if (counter_ret != NULL) *counter_ret=counter;
   		if (h_ret != NULL) *h_ret=h;
   		}
   .
____________________________________________________________
__________
OpenSSL Project                                 http://www.openssl.org
CVS Repository Commit List                    
openssl-cvsopenssl.org
Automated List Manager                          
majordomoopenssl.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )