mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-09 10:14:11 +00:00
Remove guarantee about converting NONE
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
1f6d2e352d
commit
44176b00ad
@ -773,9 +773,6 @@ mbedtls_md_type_t mbedtls_md_get_type(const mbedtls_md_info_t *md_info)
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_C)
|
||||
psa_algorithm_t mbedtls_md_psa_alg_from_type(mbedtls_md_type_t md_type)
|
||||
{
|
||||
if (md_type == MBEDTLS_MD_NONE) {
|
||||
return PSA_ALG_NONE;
|
||||
}
|
||||
return PSA_ALG_CATEGORY_HASH | (psa_algorithm_t) md_type;
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,10 @@
|
||||
* \brief This function returns the PSA algorithm identifier
|
||||
* associated with the given digest type.
|
||||
*
|
||||
* \param md_type The type of digest to search for.
|
||||
* \param md_type The type of digest to search for. Must not be NONE.
|
||||
*
|
||||
* \warning If \p md_type is \c MBEDTLS_MD_NONE, this function will
|
||||
* not return \c PSA_ALG_NONE, but an invalid algorithm.
|
||||
*
|
||||
* \warning This function does not check if the algorithm is
|
||||
* supported, it always returns the corresponding identifier.
|
||||
|
Loading…
x
Reference in New Issue
Block a user