Change minimum DH size from 768 to 1024
authorKurt Roeckx <kurt@roeckx.be>
Sun, 10 Jan 2016 12:55:08 +0000 (13:55 +0100)
committerKurt Roeckx <kurt@roeckx.be>
Sun, 10 Jan 2016 23:13:54 +0000 (00:13 +0100)
Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org>
CHANGES
ssl/s3_clnt.c

diff --git a/CHANGES b/CHANGES
index 915b1f6030d2c026e4064c7d9241474ebe56a333..23ca912fa6e40b6c0403513a5fc73c6c6cbebbe6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,7 +4,8 @@
 
  Changes between 1.0.1q and 1.0.1r [xx XXX xxxx]
 
-  *)
+  *) Reject DH handshakes with parameters shorter than 1024 bits.
+     [Kurt Roeckx]
 
  Changes between 1.0.1p and 1.0.1q [3 Dec 2015]
 
index af7f8fa8564c42e8803461c65c771f0db909699e..cfa5080e6b77e76cf3a2c9a74716dd39269a5959 100644 (file)
@@ -3417,7 +3417,7 @@ int ssl3_check_cert_and_algorithm(SSL *s)
     /* Check DHE only: static DH not implemented. */
     if (alg_k & SSL_kEDH) {
         int dh_size = BN_num_bits(dh->p);
-        if ((!SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && dh_size < 768)
+        if ((!SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && dh_size < 1024)
             || (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && dh_size < 512)) {
             SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM, SSL_R_DH_KEY_TOO_SMALL);
             goto f_err;