mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-03-11 23:36:32 +00:00
- Updated to new rsa_init, rsa_gen_key prototypes
This commit is contained in:
@@ -81,7 +81,7 @@ int main( void )
|
||||
goto exit;
|
||||
}
|
||||
|
||||
rsa_init( &rsa, RSA_PKCS_V15, 0, NULL, NULL );
|
||||
rsa_init( &rsa, RSA_PKCS_V15, 0 );
|
||||
|
||||
if( ( ret = mpi_read_file( &rsa.N, 16, f ) ) != 0 ||
|
||||
( ret = mpi_read_file( &rsa.E, 16, f ) ) != 0 )
|
||||
|
||||
@@ -82,7 +82,7 @@ int main( void )
|
||||
goto exit;
|
||||
}
|
||||
|
||||
rsa_init( &rsa, RSA_PKCS_V15, 0, NULL, NULL );
|
||||
rsa_init( &rsa, RSA_PKCS_V15, 0 );
|
||||
|
||||
if( ( ret = mpi_read_file( &rsa.N , 16, f ) ) != 0 ||
|
||||
( ret = mpi_read_file( &rsa.E , 16, f ) ) != 0 ||
|
||||
|
||||
@@ -53,9 +53,9 @@ int main( void )
|
||||
printf( " ok\n . Generating the RSA key [ %d-bit ]...", KEY_SIZE );
|
||||
fflush( stdout );
|
||||
|
||||
rsa_init( &rsa, RSA_PKCS_V15, 0, havege_rand, &hs );
|
||||
rsa_init( &rsa, RSA_PKCS_V15, 0 );
|
||||
|
||||
if( ( ret = rsa_gen_key( &rsa, KEY_SIZE, EXPONENT ) ) != 0 )
|
||||
if( ( ret = rsa_gen_key( &rsa, havege_rand, &hs, KEY_SIZE, EXPONENT ) ) != 0 )
|
||||
{
|
||||
printf( " failed\n ! rsa_gen_key returned %d\n\n", ret );
|
||||
goto exit;
|
||||
|
||||
@@ -65,7 +65,7 @@ int main( int argc, char *argv[] )
|
||||
goto exit;
|
||||
}
|
||||
|
||||
rsa_init( &rsa, RSA_PKCS_V15, 0, NULL, NULL );
|
||||
rsa_init( &rsa, RSA_PKCS_V15, 0 );
|
||||
|
||||
if( ( ret = mpi_read_file( &rsa.N , 16, f ) ) != 0 ||
|
||||
( ret = mpi_read_file( &rsa.E , 16, f ) ) != 0 ||
|
||||
|
||||
@@ -63,7 +63,7 @@ int main( int argc, char *argv[] )
|
||||
goto exit;
|
||||
}
|
||||
|
||||
rsa_init( &rsa, RSA_PKCS_V15, 0, NULL, NULL );
|
||||
rsa_init( &rsa, RSA_PKCS_V15, 0 );
|
||||
|
||||
if( ( ret = mpi_read_file( &rsa.N, 16, f ) ) != 0 ||
|
||||
( ret = mpi_read_file( &rsa.E, 16, f ) ) != 0 )
|
||||
|
||||
Reference in New Issue
Block a user