Don't send a for ServerKeyExchange for kDHr and kDHd
authorKurt Roeckx <kurt@roeckx.be>
Sat, 14 Mar 2015 22:23:26 +0000 (23:23 +0100)
committerKurt Roeckx <kurt@roeckx.be>
Tue, 24 Mar 2015 21:42:30 +0000 (22:42 +0100)
The certificate already contains the DH parameters in that case.
ssl3_send_server_key_exchange() would fail in that case anyway.

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 93f1c13619c5b41f2dcfdbf6ae666f867922a87a)

ssl/d1_srvr.c

index eafa0127b7c7582083936fe90ea2918b3bb4ef63..a184150e5653d1f175bd92245fb05ec239e6550c 100644 (file)
@@ -486,7 +486,7 @@ int dtls1_accept(SSL *s)
 #ifndef OPENSSL_NO_PSK
                 || ((alg_k & SSL_kPSK) && s->ctx->psk_identity_hint)
 #endif
-                || (alg_k & (SSL_kEDH | SSL_kDHr | SSL_kDHd))
+                || (alg_k & SSL_kDHE)
                 || (alg_k & SSL_kEECDH)
                 || ((alg_k & SSL_kRSA)
                     && (s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL