Programs adapted to use polarssl_strerror() instead of error_strerror()
This commit is contained in:
parent
fd3eac5786
commit
03a8a79516
8 changed files with 12 additions and 12 deletions
|
@ -169,7 +169,7 @@ int main( int argc, char *argv[] )
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
{
|
{
|
||||||
#ifdef POLARSSL_ERROR_C
|
#ifdef POLARSSL_ERROR_C
|
||||||
error_strerror( ret, buf, 1024 );
|
polarssl_strerror( ret, buf, 1024 );
|
||||||
#endif
|
#endif
|
||||||
printf( " failed\n ! x509parse_key returned %d - %s\n\n", ret, buf );
|
printf( " failed\n ! x509parse_key returned %d - %s\n\n", ret, buf );
|
||||||
rsa_free( &rsa );
|
rsa_free( &rsa );
|
||||||
|
@ -204,7 +204,7 @@ int main( int argc, char *argv[] )
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
{
|
{
|
||||||
#ifdef POLARSSL_ERROR_C
|
#ifdef POLARSSL_ERROR_C
|
||||||
error_strerror( ret, buf, 1024 );
|
polarssl_strerror( ret, buf, 1024 );
|
||||||
#endif
|
#endif
|
||||||
printf( " failed\n ! x509parse_public_key returned %d - %s\n\n", ret, buf );
|
printf( " failed\n ! x509parse_public_key returned %d - %s\n\n", ret, buf );
|
||||||
rsa_free( &rsa );
|
rsa_free( &rsa );
|
||||||
|
|
|
@ -243,7 +243,7 @@ int main( int argc, char *argv[] )
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
{
|
{
|
||||||
#ifdef POLARSSL_ERROR_C
|
#ifdef POLARSSL_ERROR_C
|
||||||
error_strerror( ret, buf, 1024 );
|
polarssl_strerror( ret, buf, 1024 );
|
||||||
#endif
|
#endif
|
||||||
printf( " failed\n ! x509parse_key returned %d - %s\n\n", ret, buf );
|
printf( " failed\n ! x509parse_key returned %d - %s\n\n", ret, buf );
|
||||||
rsa_free( &rsa );
|
rsa_free( &rsa );
|
||||||
|
@ -279,7 +279,7 @@ int main( int argc, char *argv[] )
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
{
|
{
|
||||||
#ifdef POLARSSL_ERROR_C
|
#ifdef POLARSSL_ERROR_C
|
||||||
error_strerror( ret, buf, 1024 );
|
polarssl_strerror( ret, buf, 1024 );
|
||||||
#endif
|
#endif
|
||||||
printf( " failed\n ! x509parse_public_key returned %d - %s\n\n", ret, buf );
|
printf( " failed\n ! x509parse_public_key returned %d - %s\n\n", ret, buf );
|
||||||
rsa_free( &rsa );
|
rsa_free( &rsa );
|
||||||
|
|
|
@ -272,7 +272,7 @@ exit:
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
{
|
{
|
||||||
char error_buf[100];
|
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 );
|
printf("Last error was: %d - %s\n\n", ret, error_buf );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -737,7 +737,7 @@ exit:
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
{
|
{
|
||||||
char error_buf[100];
|
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 );
|
printf("Last error was: -0x%X - %s\n\n", -ret, error_buf );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -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( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE )
|
||||||
{
|
{
|
||||||
#if defined(POLARSSL_ERROR_C)
|
#if defined(POLARSSL_ERROR_C)
|
||||||
error_strerror( ret, (char *) buf, 1024 );
|
polarssl_strerror( ret, (char *) buf, 1024 );
|
||||||
#endif
|
#endif
|
||||||
printf( " failed\n ! ssl_handshake returned %d: %s\n\n", ret, buf );
|
printf( " failed\n ! ssl_handshake returned %d: %s\n\n", ret, buf );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
|
@ -210,7 +210,7 @@ reset:
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
{
|
{
|
||||||
char error_buf[100];
|
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 );
|
printf("Last error was: %d - %s\n\n", ret, error_buf );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -357,7 +357,7 @@ exit:
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
{
|
{
|
||||||
char error_buf[100];
|
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 );
|
printf("Last error was: %d - %s\n\n", ret, error_buf );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -596,7 +596,7 @@ reset:
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
{
|
{
|
||||||
char error_buf[100];
|
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 );
|
printf("Last error was: %d - %s\n\n", ret, error_buf );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -780,7 +780,7 @@ exit:
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
{
|
{
|
||||||
char error_buf[100];
|
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 );
|
printf("Last error was: -0x%X - %s\n\n", -ret, error_buf );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -65,7 +65,7 @@ int main( int argc, char *argv[] )
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
{
|
{
|
||||||
char error_buf[200];
|
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 );
|
printf("Last error was: %d - %s\n\n", ret, error_buf );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue