summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-06-04 13:09:09 +0200
committerThomas Deutschmann <whissi@gentoo.org>2019-06-04 13:09:09 +0200
commitd39d694e00c32933328ae2cf091c7ddb98a669f2 (patch)
tree98a41ae6ed5391f9aadb2068237e188b69da2527
parentRespin LibreSSL patches (diff)
downloadmysql-extras-d39d694e00c32933328ae2cf091c7ddb98a669f2.tar.gz
mysql-extras-d39d694e00c32933328ae2cf091c7ddb98a669f2.tar.bz2
mysql-extras-d39d694e00c32933328ae2cf091c7ddb98a669f2.zip
Add LibreSSL patches for MySQL 5.6mysql-extras-20190604-1109Z
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rw-r--r--20018_all_mysql-5.6.44-fix-libressl-support.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/20018_all_mysql-5.6.44-fix-libressl-support.patch b/20018_all_mysql-5.6.44-fix-libressl-support.patch
new file mode 100644
index 0000000..b180677
--- /dev/null
+++ b/20018_all_mysql-5.6.44-fix-libressl-support.patch
@@ -0,0 +1,47 @@
+--- a/sql/mysqld.cc
++++ b/sql/mysqld.cc
+@@ -4358,7 +4358,10 @@ static int init_ssl()
+ {
+ #ifdef HAVE_OPENSSL
+ #ifndef HAVE_YASSL
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ CRYPTO_malloc_init();
++#else /* OPENSSL_VERSION_NUMBER < 0x10100000L */
++ OPENSSL_malloc_init();
+ #endif
+ ssl_start();
+ #ifndef EMBEDDED_LIBRARY
+@@ -4372,7 +4375,9 @@ static int init_ssl()
+ opt_ssl_cipher, &error,
+ opt_ssl_crl, opt_ssl_crlpath);
+ DBUG_PRINT("info",("ssl_acceptor_fd: 0x%lx", (long) ssl_acceptor_fd));
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ ERR_remove_state(0);
++#endif
+ if (!ssl_acceptor_fd)
+ {
+ sql_print_warning("Failed to setup SSL");
+--- a/vio/viosslfactories.c
++++ b/vio/viosslfactories.c
+@@ -68,12 +68,18 @@ static DH *get_dh2048(void)
+ DH *dh;
+ if ((dh=DH_new()))
+ {
+- dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
+- dh->g=BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL);
++ BIGNUM* p= BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
++ BIGNUM* g= BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++ dh->p= p;
++ dh->g= g;
+ if (! dh->p || ! dh->g)
++#else
++ if (!DH_set0_pqg(dh, p, NULL, g))
++#endif
+ {
+ DH_free(dh);
+- dh=0;
++ dh= NULL;
+ }
+ }
+ return(dh);