Merge branch 'development' into dtls

* development: (100 commits)
  Update Changelog for the mem-measure branch
  Fix issues introduced when rebasing
  Fix compile error in memory_buffer_alloc_selftest
  Code cosmetics
  Add curve25519 to ecc-heap.sh
  Add curve25519 to the benchmark program
  Fix compile issue when buffer_alloc not available
  New script ecc-heap.sh
  Fix unused variable issue in some configs
  Rm usunused member in private struct
  Add heap usage for PK in benchmark
  Use memory_buffer_alloc() in benchmark if available
  Only define mode_func if mode is enabled (CBC etc)
  PKCS8 encrypted key depend on PKCS5 or PKCS12
  Disable SRV_C for client measurement
  Output stack+heap usage with massif
  Enable NIST_OPTIM by default for config-suite-b
  Refactor memory.sh
  Adapt memory.sh to config-suite-b
  Adapt mini-client for config-suite-b.h
  ...

Conflicts:
	ChangeLog
	include/polarssl/net.h
	library/Makefile
	library/error.c
	library/ssl_tls.c
	programs/Makefile
	programs/ssl/ssl_client2.c
	programs/ssl/ssl_server2.c
	tests/Makefile
This commit is contained in:
Manuel Pégourié-Gonnard 2015-02-16 18:37:53 +00:00
commit d901d17817
212 changed files with 3927 additions and 2497 deletions

View file

@ -29,13 +29,15 @@
#if defined(POLARSSL_PLATFORM_C)
#include "polarssl/platform.h"
#else
#define polarssl_printf printf
#include <stdio.h>
#define polarssl_fprintf fprintf
#define polarssl_printf printf
#endif
#include <string.h>
#include <stdio.h>
#if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_ENTROPY_C) && \
defined(POLARSSL_SSL_TLS_C) && defined(POLARSSL_SSL_CLI_C) && \
defined(POLARSSL_NET_C) && defined(POLARSSL_RSA_C) && \
defined(POLARSSL_CTR_DRBG_C) && defined(POLARSSL_X509_CRT_PARSE_C)
#include "polarssl/net.h"
#include "polarssl/debug.h"
#include "polarssl/ssl.h"
@ -44,15 +46,22 @@
#include "polarssl/error.h"
#include "polarssl/certs.h"
#include <stdio.h>
#include <string.h>
#endif
#define SERVER_PORT 4433
#define SERVER_NAME "localhost"
#define GET_REQUEST "GET / HTTP/1.0\r\n\r\n"
#define DEBUG_LEVEL 1
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_ENTROPY_C) || \
!defined(POLARSSL_SSL_TLS_C) || !defined(POLARSSL_SSL_CLI_C) || \
!defined(POLARSSL_NET_C) || !defined(POLARSSL_RSA_C) || \
!defined(POLARSSL_CTR_DRBG_C) || !defined(POLARSSL_X509_CRT_PARSE_C)
int main( int argc, char *argv[] )
int main( void )
{
((void) argc);
((void) argv);
polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or "
"POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_CLI_C and/or "
"POLARSSL_NET_C and/or POLARSSL_RSA_C and/or "
@ -61,13 +70,6 @@ int main( int argc, char *argv[] )
return( 0 );
}
#else
#define SERVER_PORT 4433
#define SERVER_NAME "localhost"
#define GET_REQUEST "GET / HTTP/1.0\r\n\r\n"
#define DEBUG_LEVEL 1
static void my_debug( void *ctx, int level, const char *str )
{
((void) level);
@ -76,7 +78,7 @@ static void my_debug( void *ctx, int level, const char *str )
fflush( (FILE *) ctx );
}
int main( int argc, char *argv[] )
int main( void )
{
int ret, len, server_fd = -1;
unsigned char buf[1024];
@ -87,9 +89,6 @@ int main( int argc, char *argv[] )
ssl_context ssl;
x509_crt cacert;
((void) argc);
((void) argv);
#if defined(POLARSSL_DEBUG_C)
debug_set_threshold( DEBUG_LEVEL );
#endif