Programs adapted to use polarssl_strerror() instead of error_strerror()

This commit is contained in:
Paul Bakker 2013-06-30 12:18:08 +02:00
parent fd3eac5786
commit 03a8a79516
8 changed files with 12 additions and 12 deletions

View file

@ -169,7 +169,7 @@ int main( int argc, char *argv[] )
if( ret != 0 )
{
#ifdef POLARSSL_ERROR_C
error_strerror( ret, buf, 1024 );
polarssl_strerror( ret, buf, 1024 );
#endif
printf( " failed\n ! x509parse_key returned %d - %s\n\n", ret, buf );
rsa_free( &rsa );
@ -204,7 +204,7 @@ int main( int argc, char *argv[] )
if( ret != 0 )
{
#ifdef POLARSSL_ERROR_C
error_strerror( ret, buf, 1024 );
polarssl_strerror( ret, buf, 1024 );
#endif
printf( " failed\n ! x509parse_public_key returned %d - %s\n\n", ret, buf );
rsa_free( &rsa );

View file

@ -243,7 +243,7 @@ int main( int argc, char *argv[] )
if( ret != 0 )
{
#ifdef POLARSSL_ERROR_C
error_strerror( ret, buf, 1024 );
polarssl_strerror( ret, buf, 1024 );
#endif
printf( " failed\n ! x509parse_key returned %d - %s\n\n", ret, buf );
rsa_free( &rsa );
@ -279,7 +279,7 @@ int main( int argc, char *argv[] )
if( ret != 0 )
{
#ifdef POLARSSL_ERROR_C
error_strerror( ret, buf, 1024 );
polarssl_strerror( ret, buf, 1024 );
#endif
printf( " failed\n ! x509parse_public_key returned %d - %s\n\n", ret, buf );
rsa_free( &rsa );

View file

@ -272,7 +272,7 @@ exit:
if( ret != 0 )
{
char error_buf[100];
error_strerror( ret, error_buf, 100 );
polarssl_strerror( ret, error_buf, 100 );
printf("Last error was: %d - %s\n\n", ret, error_buf );
}
#endif

View file

@ -737,7 +737,7 @@ exit:
if( ret != 0 )
{
char error_buf[100];
error_strerror( ret, error_buf, 100 );
polarssl_strerror( ret, error_buf, 100 );
printf("Last error was: -0x%X - %s\n\n", -ret, error_buf );
}
#endif

View file

@ -135,7 +135,7 @@ static int do_handshake( ssl_context *ssl, struct options *opt )
if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE )
{
#if defined(POLARSSL_ERROR_C)
error_strerror( ret, (char *) buf, 1024 );
polarssl_strerror( ret, (char *) buf, 1024 );
#endif
printf( " failed\n ! ssl_handshake returned %d: %s\n\n", ret, buf );
return( -1 );

View file

@ -210,7 +210,7 @@ reset:
if( ret != 0 )
{
char error_buf[100];
error_strerror( ret, error_buf, 100 );
polarssl_strerror( ret, error_buf, 100 );
printf("Last error was: %d - %s\n\n", ret, error_buf );
}
#endif
@ -357,7 +357,7 @@ exit:
if( ret != 0 )
{
char error_buf[100];
error_strerror( ret, error_buf, 100 );
polarssl_strerror( ret, error_buf, 100 );
printf("Last error was: %d - %s\n\n", ret, error_buf );
}
#endif

View file

@ -596,7 +596,7 @@ reset:
if( ret != 0 )
{
char error_buf[100];
error_strerror( ret, error_buf, 100 );
polarssl_strerror( ret, error_buf, 100 );
printf("Last error was: %d - %s\n\n", ret, error_buf );
}
#endif
@ -780,7 +780,7 @@ exit:
if( ret != 0 )
{
char error_buf[100];
error_strerror( ret, error_buf, 100 );
polarssl_strerror( ret, error_buf, 100 );
printf("Last error was: -0x%X - %s\n\n", -ret, error_buf );
}
#endif

View file

@ -65,7 +65,7 @@ int main( int argc, char *argv[] )
if( ret != 0 )
{
char error_buf[200];
error_strerror( ret, error_buf, 200 );
polarssl_strerror( ret, error_buf, 200 );
printf("Last error was: %d - %s\n\n", ret, error_buf );
}