Merge branch 'development' into dtls

* development:
  Adapt tests to new defaults/errors.
  Fix typos/cosmetics in Changelog
  Disable RC4 by default in example programs.
  Add ssl_set_arc4_support()
  Set min version to TLS 1.0 in programs

Conflicts:
	include/polarssl/ssl.h
	library/ssl_cli.c
	library/ssl_srv.c
	tests/compat.sh
This commit is contained in:
Manuel Pégourié-Gonnard 2015-01-21 13:57:33 +00:00
commit 67505bf9e8
14 changed files with 164 additions and 34 deletions

View file

@ -720,6 +720,10 @@ static int ssl_write_client_hello( ssl_context *ssl )
continue;
#endif
if( ssl->arc4_disabled == SSL_ARC4_DISABLED &&
ciphersuite_info->cipher == POLARSSL_CIPHER_ARC4_128 )
continue;
SSL_DEBUG_MSG( 3, ( "client hello, add ciphersuite: %2d",
ciphersuites[i] ) );
@ -1174,6 +1178,7 @@ static int ssl_parse_server_hello( ssl_context *ssl )
int renegotiation_info_seen = 0;
#endif
int handshake_failure = 0;
const ssl_ciphersuite_t *suite_info;
#if defined(POLARSSL_DEBUG_C)
uint32_t t;
#endif
@ -1396,6 +1401,16 @@ static int ssl_parse_server_hello( ssl_context *ssl )
SSL_DEBUG_MSG( 3, ( "server hello, chosen ciphersuite: %d", i ) );
SSL_DEBUG_MSG( 3, ( "server hello, compress alg.: %d", buf[37 + n] ) );
suite_info = ssl_ciphersuite_from_id( ssl->session_negotiate->ciphersuite );
if( suite_info == NULL ||
( ssl->arc4_disabled &&
suite_info->cipher == POLARSSL_CIPHER_ARC4_128 ) )
{
SSL_DEBUG_MSG( 1, ( "bad server hello message" ) );
return( POLARSSL_ERR_SSL_BAD_HS_SERVER_HELLO );
}
i = 0;
while( 1 )
{