1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Fix RSASSA-PSS example programs

This commit is contained in:
Manuel Pégourié-Gonnard
2014-03-10 21:55:35 +01:00
parent 83cdffc437
commit 844a4c0aef
5 changed files with 34 additions and 4 deletions

View File

@ -58,14 +58,22 @@ void rsa_init( rsa_context *ctx,
{
memset( ctx, 0, sizeof( rsa_context ) );
ctx->padding = padding;
ctx->hash_id = hash_id;
rsa_set_padding( ctx, padding, hash_id );
#if defined(POLARSSL_THREADING_C)
polarssl_mutex_init( &ctx->mutex );
#endif
}
/*
* Set padding for an existing RSA context
*/
void rsa_set_padding( rsa_context *ctx, int padding, int hash_id )
{
ctx->padding = padding;
ctx->hash_id = hash_id;
}
#if defined(POLARSSL_GENPRIME)
/*