From 4248823f436f07a2f6bf903e21ee2f085393fb1f Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Wed, 16 May 2012 08:21:05 +0000 Subject: [PATCH] - Updated to handle x509parse_crtfile() positive return values --- programs/ssl/ssl_client2.c | 4 ++-- programs/ssl/ssl_mail_client.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 46edb2cfd..f82abe6be 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -258,13 +258,13 @@ int main( int argc, char *argv[] ) printf("POLARSSL_CERTS_C not defined."); } #endif - if( ret != 0 ) + if( ret < 0 ) { printf( " failed\n ! x509parse_crt returned -0x%x\n\n", -ret ); goto exit; } - printf( " ok\n" ); + printf( " ok (%d skipped)\n", ret ); /* * 1.2. Load own certificate and private key diff --git a/programs/ssl/ssl_mail_client.c b/programs/ssl/ssl_mail_client.c index 2f442c994..6bf64af63 100644 --- a/programs/ssl/ssl_mail_client.c +++ b/programs/ssl/ssl_mail_client.c @@ -505,13 +505,13 @@ int main( int argc, char *argv[] ) printf("POLARSSL_CERTS_C not defined."); } #endif - if( ret != 0 ) + if( ret < 0 ) { printf( " failed\n ! x509parse_crt returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + printf( " ok (%d skipped)\n", ret ); /* * 1.2. Load own certificate and private key