diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2016-05-22 14:49:14 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2016-05-22 14:49:14 +0200 |
commit | f8bc587c1ac19c614f813479b89945bea8f10c73 (patch) | |
tree | e5af37f8091f5bee276edd96895ceb08566a5bae /vio/viosslfactories.c | |
parent | 77dd5ece06904aa10c3fe05b9493cf3231edcd85 (diff) | |
parent | 9c9747fed3e1c1a7838e45c71983a3c4bbd3160d (diff) | |
download | mariadb-git-f8bc587c1ac19c614f813479b89945bea8f10c73.tar.gz |
Merge branch '10.1' of https://github.com/MariaDB/server into ob-10.1
Diffstat (limited to 'vio/viosslfactories.c')
-rw-r--r-- | vio/viosslfactories.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 96275b95f68..3117cdf82ae 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -17,6 +17,10 @@ #include "vio_priv.h" #ifdef HAVE_OPENSSL +#ifndef HAVE_YASSL +#include <openssl/dh.h> +#include <openssl/bn.h> +#endif static my_bool ssl_algorithms_added = FALSE; static my_bool ssl_error_strings_loaded= FALSE; @@ -259,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")); |