Skip to content

Commit

Permalink
lib-ssl-iostream: Turn on SSL_OP_SINGLE_DH_USE
Browse files Browse the repository at this point in the history
Improves forward secrecy in case a DH cipher is used.
  • Loading branch information
cmouse committed Aug 7, 2018
1 parent b25ab36 commit 4b13e3e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib-ssl-iostream/iostream-openssl-context.c
Expand Up @@ -559,6 +559,11 @@ ssl_proxy_ctx_set_crypto_params(SSL_CTX *ssl_ctx,
EC_KEY_free(ecdh);
}
#endif
#endif
#ifdef SSL_OP_SINGLE_DH_USE
/* Improves forward secrecy with DH parameters, especially if the
parameters used aren't strong primes. See OpenSSL manual. */
SSL_CTX_set_options(ssl_ctx, SSL_OP_SINGLE_DH_USE);
#endif
return 0;
}
Expand Down

0 comments on commit 4b13e3e

Please sign in to comment.