mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Fix selection of hash from sig_alg ClientHello ext.
This commit is contained in:
@ -494,11 +494,16 @@ static int ssl_parse_signature_algorithms_ext( ssl_context *ssl,
|
||||
for( p = buf + 2; p < end; p += 2 ) {
|
||||
if( *md_cur == (int) ssl_md_alg_from_hash( p[0] ) ) {
|
||||
ssl->handshake->sig_alg = p[0];
|
||||
break;
|
||||
goto have_sig_alg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Some key echanges do not need signatures at all */
|
||||
SSL_DEBUG_MSG( 3, ( "no signature_algorithm in common" ) );
|
||||
return( 0 );
|
||||
|
||||
have_sig_alg:
|
||||
SSL_DEBUG_MSG( 3, ( "client hello v3, signature_algorithm ext: %d",
|
||||
ssl->handshake->sig_alg ) );
|
||||
|
||||
|
Reference in New Issue
Block a user