mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 14:05:28 +00:00
- Updated ssl_cert_test to properly parse return values from
x509parse_verify().
This commit is contained in:
parent
fdca45fded
commit
860d36b9d8
|
@ -146,8 +146,18 @@ int main( void )
|
||||||
{
|
{
|
||||||
if( ret == POLARSSL_ERR_X509_CERT_VERIFY_FAILED )
|
if( ret == POLARSSL_ERR_X509_CERT_VERIFY_FAILED )
|
||||||
{
|
{
|
||||||
if( flags == BADCERT_REVOKED )
|
if( flags & BADCERT_CN_MISMATCH )
|
||||||
|
printf( " CN_MISMATCH " );
|
||||||
|
if( flags & BADCERT_EXPIRED )
|
||||||
|
printf( " EXPIRED " );
|
||||||
|
if( flags & BADCERT_REVOKED )
|
||||||
printf( " REVOKED " );
|
printf( " REVOKED " );
|
||||||
|
if( flags & BADCERT_NOT_TRUSTED )
|
||||||
|
printf( " NOT_TRUSTED " );
|
||||||
|
if( flags & BADCRL_NOT_TRUSTED )
|
||||||
|
printf( " CRL_NOT_TRUSTED " );
|
||||||
|
if( flags & BADCRL_EXPIRED )
|
||||||
|
printf( " CRL_EXPIRED " );
|
||||||
} else {
|
} else {
|
||||||
printf( " failed\n ! x509parse_verify returned %d\n\n", ret );
|
printf( " failed\n ! x509parse_verify returned %d\n\n", ret );
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
Loading…
Reference in a new issue