mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-29 22:20:30 +00:00
Improving readability
Signed-off-by: pespacek <peter.spacek@silabs.com>
This commit is contained in:
parent
b9f07a79a7
commit
a7a646986f
@ -2384,6 +2384,11 @@ static int x509_crt_verifycrl( mbedtls_x509_crt *crt, mbedtls_x509_crt *ca,
|
|||||||
hash,
|
hash,
|
||||||
sizeof( hash ),
|
sizeof( hash ),
|
||||||
&hash_length ) != PSA_SUCCESS )
|
&hash_length ) != PSA_SUCCESS )
|
||||||
|
{
|
||||||
|
/* Note: this can't happen except after an internal error */
|
||||||
|
flags |= MBEDTLS_X509_BADCRL_NOT_TRUSTED;
|
||||||
|
break;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
md_info = mbedtls_md_info_from_type( crl_list->sig_md );
|
md_info = mbedtls_md_info_from_type( crl_list->sig_md );
|
||||||
hash_length = mbedtls_md_get_size( md_info );
|
hash_length = mbedtls_md_get_size( md_info );
|
||||||
@ -2391,12 +2396,13 @@ static int x509_crt_verifycrl( mbedtls_x509_crt *crt, mbedtls_x509_crt *ca,
|
|||||||
crl_list->tbs.p,
|
crl_list->tbs.p,
|
||||||
crl_list->tbs.len,
|
crl_list->tbs.len,
|
||||||
hash ) != 0 )
|
hash ) != 0 )
|
||||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
|
||||||
{
|
{
|
||||||
/* Note: this can't happen except after an internal error */
|
/* Note: this can't happen except after an internal error */
|
||||||
flags |= MBEDTLS_X509_BADCRL_NOT_TRUSTED;
|
flags |= MBEDTLS_X509_BADCRL_NOT_TRUSTED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
|
||||||
|
|
||||||
if( x509_profile_check_key( profile, &ca->pk ) != 0 )
|
if( x509_profile_check_key( profile, &ca->pk ) != 0 )
|
||||||
flags |= MBEDTLS_X509_BADCERT_BAD_KEY;
|
flags |= MBEDTLS_X509_BADCERT_BAD_KEY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user