mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-29 23:04:28 +01:00
Propogate error when parsing SubjectAltNames
The previous behaviour of mbedtls_x509_parse_subject_alternative_name() was to silently ignore errors coming from x509_get_other_name(). The current commit fixes it and returns with an error.
This commit is contained in:
parent
2f0ec1e3bf
commit
6c379b4b80
@ -1823,8 +1823,9 @@ int mbedtls_x509_parse_subject_alternative_name( const mbedtls_x509_crt *crt,
|
|||||||
* In case MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE is returned,
|
* In case MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE is returned,
|
||||||
* then the "otherName" is of an unsupported type. Ignore.
|
* then the "otherName" is of an unsupported type. Ignore.
|
||||||
*/
|
*/
|
||||||
if( ret == MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE )
|
if( ret != MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE )
|
||||||
ret = 0;
|
return MBEDTLS_ERR_X509_INVALID_FORMAT;
|
||||||
|
|
||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user