diff options
Diffstat (limited to 'vio')
-rw-r--r-- | vio/viosslfactories.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 96275b95f68..ca4669f81ba 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -259,14 +259,17 @@ new_VioSSLFd(const char *key_file, const char *cert_file, } /* DH stuff */ - dh=get_dh2048(); - if (!SSL_CTX_set_tmp_dh(ssl_fd->ssl_context, dh)) + if (!is_client_method) { - *error= SSL_INITERR_DH; - goto err3; - } + dh=get_dh2048(); + if (!SSL_CTX_set_tmp_dh(ssl_fd->ssl_context, dh)) + { + *error= SSL_INITERR_DH; + goto err3; + } - DH_free(dh); + DH_free(dh); + } DBUG_PRINT("exit", ("OK 1")); |