mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-08 10:25:37 +00:00
x509: fix remaining unchecked call to mbedtls_md()
The other two calls have been fixed already, fix that one too for consistency.
This commit is contained in:
parent
19d77b6aa6
commit
ac54cea7f9
|
@ -2088,17 +2088,13 @@ static int x509_crt_verify_child(
|
|||
*flags |= MBEDTLS_X509_BADCERT_BAD_PK;
|
||||
|
||||
md_info = mbedtls_md_info_from_type( child->sig_md );
|
||||
if( md_info == NULL )
|
||||
if( mbedtls_md( md_info, child->tbs.p, child->tbs.len, hash ) != 0 )
|
||||
{
|
||||
/*
|
||||
* Cannot check 'unknown' hash
|
||||
*/
|
||||
/* Note: this can't happen except after an internal error */
|
||||
*flags |= MBEDTLS_X509_BADCERT_NOT_TRUSTED;
|
||||
}
|
||||
else
|
||||
{
|
||||
mbedtls_md( md_info, child->tbs.p, child->tbs.len, hash );
|
||||
|
||||
if( x509_profile_check_key( profile, child->sig_pk, &parent->pk ) != 0 )
|
||||
*flags |= MBEDTLS_X509_BADCERT_BAD_KEY;
|
||||
|
||||
|
|
Loading…
Reference in a new issue