mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Remove internal function md_process()
It was already marked as internal use only, and no longer used internally. Also, it won't work when we dispatch to PSA. Remove it before the MD_LIGHT split to avoid a corner case: it's technically a hashing function, no HMAC or extra metadata, but we still don't want it in MD_LIGHT really. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
40
library/md.c
40
library/md.c
@ -774,46 +774,6 @@ cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int mbedtls_md_process(mbedtls_md_context_t *ctx, const unsigned char *data)
|
||||
{
|
||||
if (ctx == NULL || ctx->md_info == NULL) {
|
||||
return MBEDTLS_ERR_MD_BAD_INPUT_DATA;
|
||||
}
|
||||
|
||||
switch (ctx->md_info->type) {
|
||||
#if defined(MBEDTLS_MD5_C)
|
||||
case MBEDTLS_MD_MD5:
|
||||
return mbedtls_internal_md5_process(ctx->md_ctx, data);
|
||||
#endif
|
||||
#if defined(MBEDTLS_RIPEMD160_C)
|
||||
case MBEDTLS_MD_RIPEMD160:
|
||||
return mbedtls_internal_ripemd160_process(ctx->md_ctx, data);
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA1_C)
|
||||
case MBEDTLS_MD_SHA1:
|
||||
return mbedtls_internal_sha1_process(ctx->md_ctx, data);
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA224_C)
|
||||
case MBEDTLS_MD_SHA224:
|
||||
return mbedtls_internal_sha256_process(ctx->md_ctx, data);
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA256_C)
|
||||
case MBEDTLS_MD_SHA256:
|
||||
return mbedtls_internal_sha256_process(ctx->md_ctx, data);
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA384_C)
|
||||
case MBEDTLS_MD_SHA384:
|
||||
return mbedtls_internal_sha512_process(ctx->md_ctx, data);
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA512_C)
|
||||
case MBEDTLS_MD_SHA512:
|
||||
return mbedtls_internal_sha512_process(ctx->md_ctx, data);
|
||||
#endif
|
||||
default:
|
||||
return MBEDTLS_ERR_MD_BAD_INPUT_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned char mbedtls_md_get_size(const mbedtls_md_info_t *md_info)
|
||||
{
|
||||
if (md_info == NULL) {
|
||||
|
Reference in New Issue
Block a user