Reintroduce md_init_ctx compatibility wrapper

This commit is contained in:
Manuel Pégourié-Gonnard 2015-03-25 16:43:14 +01:00
parent abb674467b
commit 147fa097e2
3 changed files with 35 additions and 2 deletions

View file

@ -199,7 +199,14 @@ void md_free( md_context_t *ctx )
polarssl_zeroize( ctx, sizeof( md_context_t ) );
}
int md_setup( md_context_t *ctx, const md_info_t *md_info, int hmac )
#if ! defined(POLARSSL_DEPRECATED_REMOVED)
int md_init_ctx( md_context_t *ctx, const md_info_t *md_info )
{
return md_setup( ctx, md_info, 1 );
}
#endif
int md_setup( md_context_t *ctx, const md_info_t *md_info, int hmac )
{
if( md_info == NULL || ctx == NULL )
return( POLARSSL_ERR_MD_BAD_INPUT_DATA );