summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--20018_all_mysql-5.7.23-fix-libressl-support.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/20018_all_mysql-5.7.23-fix-libressl-support.patch b/20018_all_mysql-5.7.23-fix-libressl-support.patch
index f6beecd..c5ca308 100644
--- a/20018_all_mysql-5.7.23-fix-libressl-support.patch
+++ b/20018_all_mysql-5.7.23-fix-libressl-support.patch
@@ -1,4 +1,5 @@
https://bugs.gentoo.org/662826
+https://bugs.gentoo.org/668832
--- a/sql/auth/sha2_password_common.cc
+++ b/sql/auth/sha2_password_common.cc
@@ -12,3 +13,38 @@ https://bugs.gentoo.org/662826
EVP_MD_CTX_cleanup(md_context);
#else /* OPENSSL_VERSION_NUMBER < 0x10100000L */
EVP_MD_CTX_reset(md_context);
+--- a/vio/viosslfactories.c
++++ b/vio/viosslfactories.c
+@@ -121,21 +121,19 @@ static DH *get_dh2048(void)
+ DH *dh;
+ if ((dh=DH_new()))
+ {
+- BIGNUM *p= BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL);
+- BIGNUM *g= BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL);
+- if (!p || !g
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+- || !DH_set0_pqg(dh, p, NULL, g)
+-#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
+- ) {
+- /* DH_free() will free 'p' and 'g' at once. */
++ 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);
+- return NULL;
++ dh = NULL;
+ }
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+- dh->p= p;
+- dh->g= g;
+-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+ }
+ return(dh);
+ }