Introduce getter functions for MD info fields

This commit continues the introduction of the MD digest implementation
abstraction layer given by `mbedtls_md_handle_t` by adding getter
functions returning the various properties of an implementation
(e.g. name, digest type, digest size). For the existing implementation,
these are just structure field accesses; however, in configurations
hardcoding the choice of a fixed digest algorithm, we'll be able to
implement them as inline functions returning compile-time constants.
This commit is contained in:
Hanno Becker 2019-07-17 14:10:26 +01:00
parent a5cedbcd3f
commit 530387eaa3
3 changed files with 185 additions and 54 deletions

View file

@ -114,7 +114,7 @@ exit:
}
/* END_CASE */
/* BEGIN_CASE */
/* BEGIN_CASE depends_on:!MBEDTLS_MD_SINGLE_HASH */
void test_hkdf_extract_ret( int hash_len, int ret )
{
int output_ret;
@ -141,7 +141,7 @@ exit:
}
/* END_CASE */
/* BEGIN_CASE */
/* BEGIN_CASE depends_on:!MBEDTLS_MD_SINGLE_HASH */
void test_hkdf_expand_ret( int hash_len, int prk_len, int okm_len, int ret )
{
int output_ret;