Update ctr_drbg_init() usage in programs
diff --git a/programs/pkey/rsa_sign_pss.c b/programs/pkey/rsa_sign_pss.c
index 2bbba8c..c8b38f7 100644
--- a/programs/pkey/rsa_sign_pss.c
+++ b/programs/pkey/rsa_sign_pss.c
@@ -82,6 +82,7 @@
mbedtls_entropy_init( &entropy );
mbedtls_pk_init( &pk );
+ mbedtls_ctr_drbg_init( &ctr_drbg );
if( argc != 3 )
{
@@ -97,11 +98,11 @@
mbedtls_printf( "\n . Seeding the random number generator..." );
fflush( stdout );
- if( ( ret = mbedtls_ctr_drbg_init( &ctr_drbg, mbedtls_entropy_func, &entropy,
+ if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy,
(const unsigned char *) pers,
strlen( pers ) ) ) != 0 )
{
- mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_init returned %d\n", ret );
+ mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret );
goto exit;
}