Skip to content

Commit f7f3ba9

Browse files
committed
check hashsigalgo matches ssl suites on client side.
1 parent 7dfef18 commit f7f3ba9

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/internal.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31104,6 +31104,15 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
3110431104
ERROR_OUT(BUFFER_ERROR, exit_dske);
3110531105
}
3110631106

31107+
/* Check if hashSigAlgo in Server Key Exchange is supported
31108+
* in our ssl->suites or ssl->ctx->suites. */
31109+
if (!SupportedHashSigAlgo(ssl, &input[args->idx])) {
31110+
#ifdef WOLFSSL_EXTRA_ALERTS
31111+
SendAlert(ssl, alert_fatal, handshake_failure);
31112+
#endif
31113+
ERROR_OUT(MATCH_SUITE_ERROR, exit_dske);
31114+
}
31115+
3110731116
DecodeSigAlg(&input[args->idx], &ssl->options.peerHashAlgo,
3110831117
&sigAlgo);
3110931118
#ifndef NO_RSA

0 commit comments

Comments
 (0)