diff options
author | Paul Bakker <p.j.bakker@polarssl.org> | 2009-05-03 17:29:56 +0000 |
---|---|---|
committer | Paul Bakker <p.j.bakker@polarssl.org> | 2009-05-03 17:29:56 +0000 |
commit | ad0c491c326531fc293e5f0e8e0e91d7ac945327 (patch) | |
tree | 792e4d35b08ddf6cbbf7255e1bffce65fa58d307 | |
parent | 87ac047a652728b06bf261abfa4e4b5274ed3a22 (diff) | |
download | mbedtls-ad0c491c326531fc293e5f0e8e0e91d7ac945327.zip mbedtls-ad0c491c326531fc293e5f0e8e0e91d7ac945327.tar.gz mbedtls-ad0c491c326531fc293e5f0e8e0e91d7ac945327.tar.bz2 |
- Updated ssl_cert_test to properly parse return values from
x509parse_verify().
-rw-r--r-- | programs/test/ssl_cert_test.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/programs/test/ssl_cert_test.c b/programs/test/ssl_cert_test.c index 00488ba..eb9baf8 100644 --- a/programs/test/ssl_cert_test.c +++ b/programs/test/ssl_cert_test.c @@ -146,8 +146,18 @@ int main( void ) { 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 " ); + 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 { printf( " failed\n ! x509parse_verify returned %d\n\n", ret ); goto exit; |