commit:     c5bf7666c3bb6f495079ebf43eb9cfaa2198f1bc
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 17 00:33:06 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Oct 17 00:33:06 2018 +0000
URL:        https://gitweb.gentoo.org/proj/mysql-extras.git/commit/?id=c5bf7666

Update 20018_all_mysql-5.7.23-fix-libressl-support.patch

Closes: https://bugs.gentoo.org/668832
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 20018_all_mysql-5.7.23-fix-libressl-support.patch | 36 +++++++++++++++++++++++
 1 file changed, 36 insertions(+)

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);
+ }

Reply via email to