Fix DH private key check.
authorShane Lontis <shane.lontis@oracle.com>
Tue, 15 Jun 2021 09:56:36 +0000 (19:56 +1000)
committerMatt Caswell <matt@openssl.org>
Wed, 16 Jun 2021 10:25:24 +0000 (11:25 +0100)
commit99325852207e3f8ae970799235de169b40eded75
treeb208b0ea72603cd2131e46292e0341219b8216fa
parentd66ff761d209f1ab1ec931f74c15a69743e612da
Fix DH private key check.

A recent addition removed setting the dh private key length when
a safe prime group is used. The private key validation check was relying on this
being set for safe primes. Setting the upper bound no longer checks the
length if the value is zero.

This caused a failure in the daily build of acvp_tests.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15760)
crypto/dh/dh_check.c
crypto/dh/dh_lib.c