1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Simplify usage of DHM blinding

This commit is contained in:
Manuel Pégourié-Gonnard
2013-09-17 11:34:11 +02:00
committed by Paul Bakker
parent c83e418149
commit 15d5de1969
8 changed files with 62 additions and 57 deletions

View File

@ -558,7 +558,7 @@ int main( int argc, char *argv[] )
{
olen = sizeof( buf );
ret |= dhm_make_public( &dhm, dhm.len, buf, dhm.len, myrand, NULL );
ret |= dhm_calc_secret( &dhm, buf, &olen, NULL, NULL );
ret |= dhm_calc_secret( &dhm, buf, &olen, myrand, NULL );
}
if( ret != 0 )
@ -617,7 +617,7 @@ int main( int argc, char *argv[] )
for( i = 1; ! alarmed && ! ret ; i++ )
{
olen = sizeof( buf );
ret |= dhm_calc_secret( &dhm, buf, &olen, NULL, NULL );
ret |= dhm_calc_secret( &dhm, buf, &olen, myrand, NULL );
}
if( ret != 0 )
@ -643,7 +643,7 @@ int main( int argc, char *argv[] )
{
olen = sizeof( buf );
ret |= dhm_make_public( &dhm, dhm.len, buf, dhm.len, myrand, NULL );
ret |= dhm_calc_secret( &dhm, buf, &olen, NULL, NULL );
ret |= dhm_calc_secret( &dhm, buf, &olen, myrand, NULL );
}
if( ret != 0 )