1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

- Lots of minimal changes to better support WINCE as a build target

This commit is contained in:
Paul Bakker
2011-11-18 14:26:47 +00:00
parent 33008eef64
commit cce9d77745
41 changed files with 392 additions and 161 deletions

View File

@@ -1,7 +1,7 @@
/*
* Benchmark demonstration program
*
* Copyright (C) 2006-2010, Brainspark B.V.
* Copyright (C) 2006-2011, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@@ -58,13 +58,16 @@ static int myrand( void *rng_state )
unsigned char buf[BUFSIZE];
#if !defined(POLARSSL_TIMING_C)
int main( void )
int main( int argc, char *argv[] )
{
((void) argc);
((void) argv);
printf("POLARSSL_TIMING_C not defined.\n");
return( 0 );
}
#else
int main( void )
int main( int argc, char *argv[] )
{
int keysize;
unsigned long i, j, tsc;
@@ -87,6 +90,9 @@ int main( void )
rsa_context rsa;
#endif
((void) argc);
((void) argv);
memset( buf, 0xAA, sizeof( buf ) );
printf( "\n" );
@@ -363,7 +369,7 @@ int main( void )
printf( "\n" );
#ifdef WIN32
#if defined(_WIN32)
printf( " Press Enter to exit this program.\n" );
fflush( stdout ); getchar();
#endif

View File

@@ -1,7 +1,7 @@
/*
* Self-test demonstration program
*
* Copyright (C) 2006-2010, Brainspark B.V.
* Copyright (C) 2006-2011, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@@ -144,7 +144,7 @@ int main( int argc, char *argv[] )
if( v != 0 )
{
printf( " [ All tests passed ]\n\n" );
#ifdef WIN32
#if defined(_WIN32)
printf( " Press Enter to exit this program.\n" );
fflush( stdout ); getchar();
#endif

View File

@@ -1,7 +1,7 @@
/*
* SSL certificate functionality tests
*
* Copyright (C) 2006-2010, Brainspark B.V.
* Copyright (C) 2006-2011, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@@ -67,20 +67,26 @@ char *client_private_keys[MAX_CLIENT_CERTS] =
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_RSA_C) || \
!defined(POLARSSL_X509_PARSE_C) || !defined(POLARSSL_FS_IO)
int main( void )
int main( int argc, char *argv[] )
{
((void) argc);
((void) argv);
printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or "
"POLARSSL_X509_PARSE_C and/or POLARSSL_FS_IO not defined.\n");
return( 0 );
}
#else
int main( void )
int main( int argc, char *argv[] )
{
int ret, i;
x509_cert cacert;
x509_crl crl;
char buf[10240];
((void) argc);
((void) argv);
memset( &cacert, 0, sizeof( x509_cert ) );
memset( &crl, 0, sizeof( x509_crl ) );
@@ -236,7 +242,7 @@ exit:
x509_free( &cacert );
x509_crl_free( &crl );
#ifdef WIN32
#if defined(_WIN32)
printf( " + Press Enter to exit this program.\n" );
fflush( stdout ); getchar();
#endif

View File

@@ -1,7 +1,7 @@
/*
* SSL/TLS stress testing program
*
* Copyright (C) 2006-2010, Brainspark B.V.
* Copyright (C) 2006-2011, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@@ -127,8 +127,11 @@ void my_debug( void *ctx, int level, const char *str )
!defined(POLARSSL_SSL_TLS_C) || !defined(POLARSSL_SSL_SRV_C) || \
!defined(POLARSSL_SSL_CLI_C) || !defined(POLARSSL_NET_C) || \
!defined(POLARSSL_RSA_C)
int main( void )
int main( int argc, char *argv[] )
{
((void) argc);
((void) argv);
printf("POLARSSL_BIGNUM_C and/or POLARSSL_HAVEGE_C and/or "
"POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_SRV_C and/or "
"POLARSSL_SSL_CLI_C and/or POLARSSL_NET_C and/or "
@@ -584,7 +587,7 @@ int main( int argc, char *argv[] )
exit:
#ifdef WIN32
#if defined(_WIN32)
printf( " Press Enter to exit this program.\n" );
fflush( stdout ); getchar();
#endif