summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Richter <georg@mariadb.com>2018-06-18 19:06:55 +0200
committerSergei Golubchik <serg@mariadb.org>2018-06-21 10:15:27 +0200
commitb4db59ba47f7670c5ea90962e36afb9dede0d238 (patch)
treebc664d80c95ad68354d399c67700dbf95d4877ae
parent1db1340c0c5302e16c88528d89f583f4f1b7bc90 (diff)
downloadmariadb-git-b4db59ba47f7670c5ea90962e36afb9dede0d238.tar.gz
MDEV-15596 10.2 doesn't work with openssl 1.1.1
-rw-r--r--include/ssl_compat.h6
-rw-r--r--vio/viosslfactories.c1
2 files changed, 6 insertions, 1 deletions
diff --git a/include/ssl_compat.h b/include/ssl_compat.h
index 54e80af769d..2777ae94527 100644
--- a/include/ssl_compat.h
+++ b/include/ssl_compat.h
@@ -27,7 +27,7 @@
#define HAVE_OPENSSL11 1
#define SSL_LIBRARY OpenSSL_version(OPENSSL_VERSION)
#define ERR_remove_state(X) ERR_clear_error()
-#define EVP_CIPHER_CTX_SIZE 168
+#define EVP_CIPHER_CTX_SIZE 176
#define EVP_MD_CTX_SIZE 48
#undef EVP_MD_CTX_init
#define EVP_MD_CTX_init(X) do { bzero((X), EVP_MD_CTX_SIZE); EVP_MD_CTX_reset(X); } while(0)
@@ -77,6 +77,10 @@
#define X509_get0_notAfter(X) X509_get_notAfter(X)
#endif
+#ifndef TLS1_3_VERSION
+#define SSL_CTX_set_ciphersuites(X,Y) 0
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index 6358b976e16..fa02eb03caa 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -211,6 +211,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file,
none of the provided ciphers could be selected
*/
if (cipher &&
+ SSL_CTX_set_ciphersuites(ssl_fd->ssl_context, cipher) == 0 &&
SSL_CTX_set_cipher_list(ssl_fd->ssl_context, cipher) == 0)
{
*error= SSL_INITERR_CIPHERS;