mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 18:15:37 +01:00
Fix bug in X.509 CRT verification code
This commit is contained in:
parent
fa973e022a
commit
2e7fee09da
@ -1968,7 +1968,7 @@ static int x509_crt_verify_top(
|
|||||||
*/
|
*/
|
||||||
if( child->subject_raw.len == trust_ca->subject_raw.len &&
|
if( child->subject_raw.len == trust_ca->subject_raw.len &&
|
||||||
memcmp( child->subject_raw.p, trust_ca->subject_raw.p,
|
memcmp( child->subject_raw.p, trust_ca->subject_raw.p,
|
||||||
child->issuer_raw.len ) == 0 )
|
child->subject_raw.len ) == 0 )
|
||||||
{
|
{
|
||||||
check_path_cnt--;
|
check_path_cnt--;
|
||||||
}
|
}
|
||||||
@ -2018,7 +2018,7 @@ static int x509_crt_verify_top(
|
|||||||
if( trust_ca != NULL &&
|
if( trust_ca != NULL &&
|
||||||
( child->subject_raw.len != trust_ca->subject_raw.len ||
|
( child->subject_raw.len != trust_ca->subject_raw.len ||
|
||||||
memcmp( child->subject_raw.p, trust_ca->subject_raw.p,
|
memcmp( child->subject_raw.p, trust_ca->subject_raw.p,
|
||||||
child->issuer_raw.len ) != 0 ) )
|
child->subject_raw.len ) != 0 ) )
|
||||||
{
|
{
|
||||||
#if defined(MBEDTLS_X509_CRL_PARSE_C)
|
#if defined(MBEDTLS_X509_CRL_PARSE_C)
|
||||||
/* Check trusted CA's CRL for the chain's top crt */
|
/* Check trusted CA's CRL for the chain's top crt */
|
||||||
|
Loading…
Reference in New Issue
Block a user