mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-24 20:01:02 +00:00
Fix issue if salt = NULL and salt_len !=0 in mbedtls_hkdf_extract()
This commit is contained in:
parent
a61d123e0e
commit
ca2ea4e217
|
@ -62,6 +62,11 @@ int mbedtls_hkdf_extract( const mbedtls_md_info_t *md,
|
||||||
{
|
{
|
||||||
size_t hash_len;
|
size_t hash_len;
|
||||||
|
|
||||||
|
if( salt_len != 0 )
|
||||||
|
{
|
||||||
|
return MBEDTLS_ERR_HKDF_BAD_INPUT_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
hash_len = mbedtls_md_get_size( md );
|
hash_len = mbedtls_md_get_size( md );
|
||||||
|
|
||||||
if( hash_len == 0 )
|
if( hash_len == 0 )
|
||||||
|
|
Loading…
Reference in a new issue