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 b03cc1cee47..52b624d3376 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -263,14 +263,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")); |