Merge remote-tracking branch 'origin/development' into development_new
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com> Conflicts: include/mbedtls/check_config.h: nearby edits library/entropy.c: nearby edits programs/random/gen_random_havege.c: modification vs. removal programs/ssl/ssl_test_lib.h: nearby edits programs/test/cpp_dummy_build.cpp: nearby edits visualc/VS2010/mbedTLS.vcxproj: automatically generated file, regenerated with scripts/generate_visualc_files.pl
This commit is contained in:
commit
73e3e2cb1a
217 changed files with 23474 additions and 8202 deletions
|
@ -685,7 +685,7 @@ static int ssl_write_session_ticket_ext( mbedtls_ssl_context *ssl,
|
|||
return( 0 );
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3,
|
||||
( "sending session ticket of length %d", tlen ) );
|
||||
( "sending session ticket of length %" MBEDTLS_PRINTF_SIZET, tlen ) );
|
||||
|
||||
memcpy( p, ssl->session_negotiate->ticket, tlen );
|
||||
|
||||
|
@ -905,7 +905,8 @@ static int ssl_generate_random( mbedtls_ssl_context *ssl )
|
|||
*p++ = (unsigned char)( t >> 8 );
|
||||
*p++ = (unsigned char)( t );
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, current time: %lu", t ) );
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, current time: %" MBEDTLS_PRINTF_LONGLONG,
|
||||
(long long) t ) );
|
||||
#else
|
||||
if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, p, 4 ) ) != 0 )
|
||||
return( ret );
|
||||
|
@ -1114,7 +1115,7 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
|
|||
for( i = 0; i < n; i++ )
|
||||
*p++ = ssl->session_negotiate->id[i];
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, session id len.: %d", n ) );
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, session id len.: %" MBEDTLS_PRINTF_SIZET, n ) );
|
||||
MBEDTLS_SSL_DEBUG_BUF( 3, "client hello, session id", buf + 39, n );
|
||||
|
||||
/*
|
||||
|
@ -1182,7 +1183,7 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
|
|||
continue;
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, add ciphersuite: %#04x (%s)",
|
||||
ciphersuites[i], ciphersuite_info->name ) );
|
||||
(unsigned int)ciphersuites[i], ciphersuite_info->name ) );
|
||||
|
||||
#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \
|
||||
defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
|
||||
|
@ -1197,7 +1198,7 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
|
|||
}
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3,
|
||||
( "client hello, got %d ciphersuites (excluding SCSVs)", n ) );
|
||||
( "client hello, got %" MBEDTLS_PRINTF_SIZET " ciphersuites (excluding SCSVs)", n ) );
|
||||
|
||||
/*
|
||||
* Add TLS_EMPTY_RENEGOTIATION_INFO_SCSV
|
||||
|
@ -1420,7 +1421,7 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
|
|||
/* olen unused if all extensions are disabled */
|
||||
((void) olen);
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, total extension length: %d",
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, total extension length: %" MBEDTLS_PRINTF_SIZET,
|
||||
ext_len ) );
|
||||
|
||||
if( ext_len > 0 )
|
||||
|
@ -2167,10 +2168,10 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
|
|||
}
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, current time: %lu",
|
||||
( (uint32_t) buf[2] << 24 ) |
|
||||
( (uint32_t) buf[3] << 16 ) |
|
||||
( (uint32_t) buf[4] << 8 ) |
|
||||
( (uint32_t) buf[5] ) ) );
|
||||
( (unsigned long) buf[2] << 24 ) |
|
||||
( (unsigned long) buf[3] << 16 ) |
|
||||
( (unsigned long) buf[4] << 8 ) |
|
||||
( (unsigned long) buf[5] ) ) );
|
||||
|
||||
memcpy( ssl->handshake->randbytes + 32, buf + 2, 32 );
|
||||
|
||||
|
@ -2253,7 +2254,7 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
|
|||
if( ssl->handshake->ciphersuite_info == NULL )
|
||||
{
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1,
|
||||
( "ciphersuite info for %04x not found", i ) );
|
||||
( "ciphersuite info for %04x not found", (unsigned int)i ) );
|
||||
mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
|
||||
MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR );
|
||||
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||
|
@ -2261,7 +2262,7 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
|
|||
|
||||
mbedtls_ssl_optimize_checksum( ssl, ssl->handshake->ciphersuite_info );
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, session id len.: %d", n ) );
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, session id len.: %" MBEDTLS_PRINTF_SIZET, n ) );
|
||||
MBEDTLS_SSL_DEBUG_BUF( 3, "server hello, session id", buf + 35, n );
|
||||
|
||||
/*
|
||||
|
@ -2304,7 +2305,7 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
|
|||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "%s session has been resumed",
|
||||
ssl->handshake->resume ? "a" : "no" ) );
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, chosen ciphersuite: %04x", i ) );
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, chosen ciphersuite: %04x", (unsigned) i ) );
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, compress alg.: %d",
|
||||
buf[37 + n] ) );
|
||||
|
||||
|
@ -2373,7 +2374,7 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
|
|||
ext = buf + 40 + n;
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 2,
|
||||
( "server hello, total extension length: %d", ext_len ) );
|
||||
( "server hello, total extension length: %" MBEDTLS_PRINTF_SIZET, ext_len ) );
|
||||
|
||||
while( ext_len )
|
||||
{
|
||||
|
@ -2537,7 +2538,7 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
|
|||
|
||||
default:
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3,
|
||||
( "unknown extension found: %d (ignoring)", ext_id ) );
|
||||
( "unknown extension found: %u (ignoring)", ext_id ) );
|
||||
}
|
||||
|
||||
ext_len -= 4 + ext_size;
|
||||
|
@ -2628,7 +2629,7 @@ static int ssl_parse_server_dh_params( mbedtls_ssl_context *ssl,
|
|||
|
||||
if( ssl->handshake->dhm_ctx.len * 8 < ssl->conf->dhm_min_bitlen )
|
||||
{
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "DHM prime too short: %d < %d",
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "DHM prime too short: %" MBEDTLS_PRINTF_SIZET " < %u",
|
||||
ssl->handshake->dhm_ctx.len * 8,
|
||||
ssl->conf->dhm_min_bitlen ) );
|
||||
return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE );
|
||||
|
@ -4347,7 +4348,7 @@ static int ssl_parse_new_session_ticket( mbedtls_ssl_context *ssl )
|
|||
return( MBEDTLS_ERR_SSL_BAD_HS_NEW_SESSION_TICKET );
|
||||
}
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "ticket length: %d", ticket_len ) );
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "ticket length: %" MBEDTLS_PRINTF_SIZET, ticket_len ) );
|
||||
|
||||
/* We're not waiting for a NewSessionTicket message any more */
|
||||
ssl->handshake->new_session_ticket = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue