- Changed the used random function pointer to more flexible format. Renamed havege_rand() to havege_random() to prevent mistakes. Lots of changes as a consequence in library code and programs
This commit is contained in:
parent
880ac7eb95
commit
a3d195c41f
31 changed files with 232 additions and 119 deletions
|
@ -81,8 +81,10 @@ static int ssl_write_client_hello( ssl_context *ssl )
|
|||
|
||||
SSL_DEBUG_MSG( 3, ( "client hello, current time: %lu", t ) );
|
||||
|
||||
for( i = 28; i > 0; i-- )
|
||||
*p++ = (unsigned char) ssl->f_rng( ssl->p_rng );
|
||||
if( ( ret = ssl->f_rng( ssl->p_rng, p, 28 ) ) != 0 )
|
||||
return( ret );
|
||||
|
||||
p += 28;
|
||||
|
||||
memcpy( ssl->randbytes, buf + 6, 32 );
|
||||
|
||||
|
@ -583,8 +585,9 @@ static int ssl_write_client_key_exchange( ssl_context *ssl )
|
|||
ssl->premaster[1] = (unsigned char) ssl->max_minor_ver;
|
||||
ssl->pmslen = 48;
|
||||
|
||||
for( i = 2; i < ssl->pmslen; i++ )
|
||||
ssl->premaster[i] = (unsigned char) ssl->f_rng( ssl->p_rng );
|
||||
ret = ssl->f_rng( ssl->p_rng, ssl->premaster + 2, ssl->pmslen - 2 );
|
||||
if( ret != 0 )
|
||||
return( ret );
|
||||
|
||||
i = 4;
|
||||
n = ssl->peer_cert->rsa.len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue