use safe primes in ssl_get_auto_dh()
authorHubert Kario <hkario@redhat.com>
Fri, 5 Jun 2020 18:21:55 +0000 (20:21 +0200)
committerTomas Mraz <tmraz@fedoraproject.org>
Tue, 9 Jun 2020 10:15:48 +0000 (12:15 +0200)
commit7646610b6a2c53ae50ed453c88291c23630e7850
treef7654090fa435eddd3bbc9bf06d772cc621cab29
parent78215852066d214ded6695a27c997eb0d651c31f
use safe primes in ssl_get_auto_dh()

DH_get_1024_160() and DH_get_2048_224() return parameters from
RFC5114. Those parameters include primes with known small subgroups,
making them unsafe. Change the code to use parameters from
RFC 2409 and RFC 3526 instead (group 2 and 14 respectively).

This patch also adds automatic selection of 4096 bit params for 4096 bit
RSA keys

Signed-off-by: Hubert Kario <hkario@redhat.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12061)
ssl/t1_lib.c