Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mysql-extras:master commit in: /
Date: Tue, 04 Jun 2019 11:30:25
Message-Id: 1559646549.d39d694e00c32933328ae2cf091c7ddb98a669f2.whissi@gentoo
1 commit: d39d694e00c32933328ae2cf091c7ddb98a669f2
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 4 11:09:09 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 4 11:09:09 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/mysql-extras.git/commit/?id=d39d694e
7
8 Add LibreSSL patches for MySQL 5.6
9
10 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
11
12 20018_all_mysql-5.6.44-fix-libressl-support.patch | 47 +++++++++++++++++++++++
13 1 file changed, 47 insertions(+)
14
15 diff --git a/20018_all_mysql-5.6.44-fix-libressl-support.patch b/20018_all_mysql-5.6.44-fix-libressl-support.patch
16 new file mode 100644
17 index 0000000..b180677
18 --- /dev/null
19 +++ b/20018_all_mysql-5.6.44-fix-libressl-support.patch
20 @@ -0,0 +1,47 @@
21 +--- a/sql/mysqld.cc
22 ++++ b/sql/mysqld.cc
23 +@@ -4358,7 +4358,10 @@ static int init_ssl()
24 + {
25 + #ifdef HAVE_OPENSSL
26 + #ifndef HAVE_YASSL
27 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
28 + CRYPTO_malloc_init();
29 ++#else /* OPENSSL_VERSION_NUMBER < 0x10100000L */
30 ++ OPENSSL_malloc_init();
31 + #endif
32 + ssl_start();
33 + #ifndef EMBEDDED_LIBRARY
34 +@@ -4372,7 +4375,9 @@ static int init_ssl()
35 + opt_ssl_cipher, &error,
36 + opt_ssl_crl, opt_ssl_crlpath);
37 + DBUG_PRINT("info",("ssl_acceptor_fd: 0x%lx", (long) ssl_acceptor_fd));
38 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
39 + ERR_remove_state(0);
40 ++#endif
41 + if (!ssl_acceptor_fd)
42 + {
43 + sql_print_warning("Failed to setup SSL");
44 +--- a/vio/viosslfactories.c
45 ++++ b/vio/viosslfactories.c
46 +@@ -68,12 +68,18 @@ static DH *get_dh2048(void)
47 + DH *dh;
48 + if ((dh=DH_new()))
49 + {
50 +- dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
51 +- dh->g=BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL);
52 ++ BIGNUM* p= BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
53 ++ BIGNUM* g= BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL);
54 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
55 ++ dh->p= p;
56 ++ dh->g= g;
57 + if (! dh->p || ! dh->g)
58 ++#else
59 ++ if (!DH_set0_pqg(dh, p, NULL, g))
60 ++#endif
61 + {
62 + DH_free(dh);
63 +- dh=0;
64 ++ dh= NULL;
65 + }
66 + }
67 + return(dh);