Parse Signature Algorithm ext when renegotiating

Signature algorithm extension was skipped when renegotiation was in
progress, causing the signature algorithm not to be known when
renegotiating, and failing the handshake. Fix removes the renegotiation
step check before parsing the extension.
This commit is contained in:
Ron Eldor 2017-10-03 15:58:26 +03:00 committed by Simon Butcher
parent 10345fbe2a
commit 4491a791be
2 changed files with 3 additions and 4 deletions

View file

@ -8,6 +8,9 @@ Bugfix
* Fix usage help in ssl_server2 example. Found and fixed by Bei Lin.
* Fix Visual Studio implicit cast compilation warnings in the net.c and
x509.c modules and some sample applications.
* Parse signature algorithm extension when renegotiating. Previously,
renegotiated handshakes would only accept signatures using SHA-1
regardless of the peer's preferences, or fail if SHA-1 was disabled.
= mbed TLS 1.3.21 branch released 2017-08-10

View file

@ -1675,10 +1675,6 @@ static int ssl_parse_client_hello( ssl_context *ssl )
defined(POLARSSL_KEY_EXCHANGE__WITH_CERT__ENABLED)
case TLS_EXT_SIG_ALG:
SSL_DEBUG_MSG( 3, ( "found signature_algorithms extension" ) );
#if defined(POLARSSL_SSL_RENEGOTIATION)
if( ssl->renegotiation == SSL_RENEGOTIATION )
break;
#endif
ret = ssl_parse_signature_algorithms_ext( ssl, ext + 4, ext_size );
if( ret != 0 )