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

Adapt gen_key example program to new RSA interface

This commit is contained in:
Hanno Becker
2017-08-23 06:45:10 +01:00
parent c95fad3566
commit 83aad1fa86
2 changed files with 31 additions and 11 deletions

View File

@ -894,6 +894,9 @@ int mbedtls_rsa_gen_key( mbedtls_rsa_context *ctx,
ctx->len = ( mbedtls_mpi_bitlen( &ctx->N ) + 7 ) >> 3;
/* Double-check */
MBEDTLS_MPI_CHK( mbedtls_rsa_check_privkey( ctx ) );
cleanup:
mbedtls_mpi_free( &P1 ); mbedtls_mpi_free( &Q1 ); mbedtls_mpi_free( &H ); mbedtls_mpi_free( &G );