mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
In DoServerKeyExchange(), when reading the DH key from the server, the
client was checking it too strictly. The pubkey value should be checked as strictly as the generator, for too large. The public key value is checked mathematically elsewhere.
This commit is contained in:
@@ -21330,17 +21330,6 @@ static int GetDhPublicKey(WOLFSSL* ssl, const byte* input, word32 size,
|
||||
ERROR_OUT(BUFFER_ERROR, exit_gdpk);
|
||||
}
|
||||
|
||||
if (length < ssl->options.minDhKeySz) {
|
||||
WOLFSSL_MSG("Server using a public DH key that is too small");
|
||||
SendAlert(ssl, alert_fatal, handshake_failure);
|
||||
XFREE(ssl->buffers.serverDH_P.buffer, ssl->heap,
|
||||
DYNAMIC_TYPE_PUBLIC_KEY);
|
||||
ssl->buffers.serverDH_P.buffer = NULL;
|
||||
XFREE(ssl->buffers.serverDH_G.buffer, ssl->heap,
|
||||
DYNAMIC_TYPE_PUBLIC_KEY);
|
||||
ssl->buffers.serverDH_G.buffer = NULL;
|
||||
ERROR_OUT(DH_KEY_SIZE_E, exit_gdpk);
|
||||
}
|
||||
if (length > ssl->options.maxDhKeySz) {
|
||||
WOLFSSL_MSG("Server using a public DH key that is too big");
|
||||
SendAlert(ssl, alert_fatal, handshake_failure);
|
||||
|
Reference in New Issue
Block a user