Lines Matching refs:ctx2
379 mbedtls_rsa_context ctx, ctx2; /* Also test mbedtls_rsa_copy() while at it */
382 mbedtls_rsa_init( &ctx2, MBEDTLS_RSA_PKCS_V15, 0 );
404 TEST_ASSERT( mbedtls_rsa_copy( &ctx2, &ctx ) == 0 );
408 TEST_ASSERT( mbedtls_rsa_check_pubkey( &ctx2 ) == 0 );
412 TEST_ASSERT( mbedtls_rsa_public( &ctx2, message_str, output ) == result );
415 hexify( output_str, output, ctx2.len );
422 mbedtls_rsa_free( &ctx2 );
434 mbedtls_rsa_context ctx, ctx2; /* Also test mbedtls_rsa_copy() while at it */
441 mbedtls_rsa_init( &ctx2, MBEDTLS_RSA_PKCS_V15, 0 );
482 TEST_ASSERT( mbedtls_rsa_copy( &ctx2, &ctx ) == 0 );
486 TEST_ASSERT( mbedtls_rsa_check_privkey( &ctx2 ) == 0 );
490 TEST_ASSERT( mbedtls_rsa_private( &ctx2, rnd_pseudo_rand, &rnd_info,
494 hexify( output_str, output, ctx2.len );
502 mbedtls_rsa_free( &ctx ); mbedtls_rsa_free( &ctx2 );