mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-01-10 08:28:51 +01:00
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:
commit
d901d17817
212 changed files with 3927 additions and 2497 deletions
|
|
@ -29,44 +29,33 @@
|
|||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_printf printf
|
||||
#define polarssl_fprintf fprintf
|
||||
#define polarssl_malloc malloc
|
||||
#include <stdio.h>
|
||||
#define polarssl_free free
|
||||
#define polarssl_malloc malloc
|
||||
#define polarssl_fprintf fprintf
|
||||
#define polarssl_printf printf
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_ENTROPY_C) && \
|
||||
defined(POLARSSL_SSL_TLS_C) && defined(POLARSSL_SSL_SRV_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/ssl.h"
|
||||
#include "polarssl/entropy.h"
|
||||
#include "polarssl/ctr_drbg.h"
|
||||
#include "polarssl/certs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_TIMING_C)
|
||||
#include "polarssl/timing.h"
|
||||
#endif
|
||||
|
||||
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_ENTROPY_C) || \
|
||||
!defined(POLARSSL_SSL_TLS_C) || !defined(POLARSSL_SSL_SRV_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[] )
|
||||
{
|
||||
((void) argc);
|
||||
((void) argv);
|
||||
|
||||
polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_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 "
|
||||
"POLARSSL_RSA_C and/or POLARSSL_CTR_DRBG_C and/or "
|
||||
"POLARSSL_X509_CRT_PARSE_C not defined.\n");
|
||||
return( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
#define OPMODE_NONE 0
|
||||
#define OPMODE_CLIENT 1
|
||||
#define OPMODE_SERVER 2
|
||||
|
|
@ -92,6 +81,21 @@ int main( int argc, char *argv[] )
|
|||
#define DFL_SESSION_LIFETIME 86400
|
||||
#define DFL_FORCE_CIPHER 0
|
||||
|
||||
#if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_ENTROPY_C) || \
|
||||
!defined(POLARSSL_SSL_TLS_C) || !defined(POLARSSL_SSL_SRV_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( void )
|
||||
{
|
||||
polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_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 "
|
||||
"POLARSSL_RSA_C and/or POLARSSL_CTR_DRBG_C and/or "
|
||||
"POLARSSL_X509_CRT_PARSE_C not defined.\n");
|
||||
return( 0 );
|
||||
}
|
||||
#else
|
||||
int server_fd = -1;
|
||||
|
||||
/*
|
||||
|
|
@ -295,8 +299,8 @@ static int ssl_test( struct options *opt )
|
|||
}
|
||||
}
|
||||
|
||||
read_buf = (unsigned char *) polarssl_malloc( opt->buffer_size );
|
||||
write_buf = (unsigned char *) polarssl_malloc( opt->buffer_size );
|
||||
read_buf = polarssl_malloc( opt->buffer_size );
|
||||
write_buf = polarssl_malloc( opt->buffer_size );
|
||||
|
||||
if( read_buf == NULL || write_buf == NULL )
|
||||
{
|
||||
|
|
@ -453,7 +457,7 @@ exit:
|
|||
" session_reuse=on/off default: on (enabled)\n" \
|
||||
" session_lifetime=%%d (s) default: 86400\n" \
|
||||
" force_ciphersuite=<name> default: all enabled\n" \
|
||||
" acceptable ciphersuite names:\n"
|
||||
" acceptable ciphersuite names:\n"
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue