Adapt programs / test suites

This commit is contained in:
Paul Bakker 2014-06-18 16:44:11 +02:00
parent 8f870b047c
commit a317a98221
33 changed files with 76 additions and 12 deletions

View file

@ -414,6 +414,7 @@ int main( int argc, char *argv[] )
havege_state hs;
havege_init( &hs );
TIME_AND_TSC( "HAVEGE", havege_random( &hs, buf, BUFSIZE ) );
havege_free( &hs );
}
#endif
@ -434,6 +435,7 @@ int main( int argc, char *argv[] )
TIME_AND_TSC( "CTR_DRBG (PR)",
if( ctr_drbg_random( &ctr_drbg, buf, BUFSIZE ) != 0 )
exit(1) );
ctr_drbg_free( &ctr_drbg );
}
#endif
@ -531,7 +533,7 @@ int main( int argc, char *argv[] )
size_t olen;
for( i = 0; i < DHM_SIZES; i++ )
{
memset( &dhm, 0, sizeof( dhm_context ) );
dhm_init( &dhm );
if( mpi_read_string( &dhm.P, 16, dhm_P[i] ) != 0 ||
mpi_read_string( &dhm.G, 16, dhm_G[i] ) != 0 )

View file

@ -258,6 +258,7 @@ int main( int argc, char *argv[] )
printf( "String value (PolarSSL Private Encrypt, OpenSSL Public Decrypt): '%s'\n", o_priv_decrypted );
exit:
ctr_drbg_free( &ctr_drbg );
entropy_free( &entropy );
#ifdef WIN32

View file

@ -417,6 +417,7 @@ exit:
x509_crt_free( &srvcert );
pk_free( &pkey );
ssl_free( &ssl );
ctr_drbg_free( &ctr_drbg );
entropy_free( &entropy );
if( client_fd != -1 )