mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 00:55:39 +01:00
Clean up unneeded things
This commit is contained in:
parent
4063ceb281
commit
a77edade0c
@ -83,11 +83,6 @@ typedef struct {
|
||||
void *hmac_ctx;
|
||||
} md_context_t;
|
||||
|
||||
#define MD_CONTEXT_T_INIT { \
|
||||
NULL, /* md_info */ \
|
||||
NULL, /* md_ctx */ \
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Returns the list of digests supported by the generic digest module.
|
||||
*
|
||||
@ -134,10 +129,6 @@ void md_free( md_context_t *ctx );
|
||||
* \brief Initialises and fills the message digest context structure
|
||||
* with the appropriate values.
|
||||
*
|
||||
* \note Currently also clears structure. In future versions you
|
||||
* will be required to call md_init() on the structure
|
||||
* first.
|
||||
*
|
||||
* \param ctx context to initialise. May not be NULL. The
|
||||
* digest-specific context (ctx->md_ctx) must be NULL. It will
|
||||
* be allocated, and must be freed using md_free() later.
|
||||
|
@ -204,8 +204,6 @@ int md_init_ctx( 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 );
|
||||
|
||||
memset( ctx, 0, sizeof( md_context_t ) );
|
||||
|
||||
if( ( ctx->md_ctx = md_info->ctx_alloc_func() ) == NULL )
|
||||
return( POLARSSL_ERR_MD_ALLOC_FAILED );
|
||||
|
||||
@ -221,8 +219,6 @@ int md_init_ctx( md_context_t *ctx, const md_info_t *md_info, int hmac )
|
||||
|
||||
ctx->md_info = md_info;
|
||||
|
||||
md_info->starts_func( ctx->md_ctx );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user