Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 May 2020 09:45:40 +0000 (UTC)
From:      Jochen Neumeister <joneum@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r533910 - in branches/2020Q2/databases: mysql57-client/files mysql57-server mysql57-server/files
Message-ID:  <202005040945.0449jeHJ052935@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: joneum
Date: Mon May  4 09:45:40 2020
New Revision: 533910
URL: https://svnweb.freebsd.org/changeset/ports/533910

Log:
  MFH: r533909
  
  In file included from /usr/obj/usr/ports/databases/mysql57-client/work/mysql-5.7.30/vio/viosslfactories.c:29:
  /usr/obj/usr/ports/databases/mysql57-client/work/mysql-5.7.30/include/my_openssl.h:55:30: error: use of undeclared identifier 'OPENSSL_INIT_NO_ATEXIT'
    return OPENSSL_init_crypto(OPENSSL_INIT_NO_ATEXIT, NULL);
  
  This fix a problem with libressl
  
  PR:		246070
  Sponsored by:	Netzkommune GmbH
  
  Approved by:	ports-secteam (joneum)

Added:
  branches/2020Q2/databases/mysql57-client/files/patch-include_my_openssl.h
     - copied unchanged from r533909, head/databases/mysql57-client/files/patch-include_my_openssl.h
  branches/2020Q2/databases/mysql57-client/files/patch-sql_auth_sha2_password_common.cc
     - copied unchanged from r533909, head/databases/mysql57-client/files/patch-sql_auth_sha2_password_common.cc
  branches/2020Q2/databases/mysql57-client/files/patch-vio_viosslfactories.c
     - copied unchanged from r533909, head/databases/mysql57-client/files/patch-vio_viosslfactories.c
  branches/2020Q2/databases/mysql57-server/files/patch-include_my_openssl.h
     - copied unchanged from r533909, head/databases/mysql57-server/files/patch-include_my_openssl.h
  branches/2020Q2/databases/mysql57-server/files/patch-rapid_plugin_group_replication_libmysqlgcs_src_bindings_xcom_xcom_xcom_ssl_transport.c
     - copied unchanged from r533909, head/databases/mysql57-server/files/patch-rapid_plugin_group_replication_libmysqlgcs_src_bindings_xcom_xcom_xcom_ssl_transport.c
  branches/2020Q2/databases/mysql57-server/files/patch-sql_auth_sha2_password_common.cc
     - copied unchanged from r533909, head/databases/mysql57-server/files/patch-sql_auth_sha2_password_common.cc
  branches/2020Q2/databases/mysql57-server/files/patch-vio_viosslfactories.c
     - copied unchanged from r533909, head/databases/mysql57-server/files/patch-vio_viosslfactories.c
Modified:
  branches/2020Q2/databases/mysql57-server/Makefile
Directory Properties:
  branches/2020Q2/   (props changed)

Copied: branches/2020Q2/databases/mysql57-client/files/patch-include_my_openssl.h (from r533909, head/databases/mysql57-client/files/patch-include_my_openssl.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2020Q2/databases/mysql57-client/files/patch-include_my_openssl.h	Mon May  4 09:45:40 2020	(r533910, copy of r533909, head/databases/mysql57-client/files/patch-include_my_openssl.h)
@@ -0,0 +1,11 @@
+--- include/my_openssl.h.orig	2020-03-23 17:35:17 UTC
++++ include/my_openssl.h
+@@ -51,7 +51,7 @@ extern "C" {
+  */
+ static inline int mysql_OPENSSL_init()
+ {
+-#if defined(HAVE_STATIC_OPENSSL)
++#if defined(HAVE_STATIC_OPENSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+   return OPENSSL_init_crypto(OPENSSL_INIT_NO_ATEXIT, NULL);
+ #else
+   return SSL_library_init();

Copied: branches/2020Q2/databases/mysql57-client/files/patch-sql_auth_sha2_password_common.cc (from r533909, head/databases/mysql57-client/files/patch-sql_auth_sha2_password_common.cc)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2020Q2/databases/mysql57-client/files/patch-sql_auth_sha2_password_common.cc	Mon May  4 09:45:40 2020	(r533910, copy of r533909, head/databases/mysql57-client/files/patch-sql_auth_sha2_password_common.cc)
@@ -0,0 +1,12 @@
+--- sql/auth/sha2_password_common.cc
++++ sql/auth/sha2_password_common.cc
+@@ -116,7 +116,8 @@ bool SHA256_digest::retrieve_digest(unsigned char *digest,
+     DBUG_RETURN(true);
+   }
+   m_ok= EVP_DigestFinal_ex(md_context, m_digest, NULL);
+-#if defined(HAVE_WOLFSSL) || OPENSSL_VERSION_NUMBER < 0x10100000L
++#if defined(HAVE_WOLFSSL) || OPENSSL_VERSION_NUMBER < 0x10100000L || \
++    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x02090000fL)
+   EVP_MD_CTX_cleanup(md_context);
+ #else  /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+   EVP_MD_CTX_reset(md_context);

Copied: branches/2020Q2/databases/mysql57-client/files/patch-vio_viosslfactories.c (from r533909, head/databases/mysql57-client/files/patch-vio_viosslfactories.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2020Q2/databases/mysql57-client/files/patch-vio_viosslfactories.c	Mon May  4 09:45:40 2020	(r533910, copy of r533909, head/databases/mysql57-client/files/patch-vio_viosslfactories.c)
@@ -0,0 +1,35 @@
+--- vio/viosslfactories.c
++++ vio/viosslfactories.c
+@@ -123,21 +123,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);
+ }

Modified: branches/2020Q2/databases/mysql57-server/Makefile
==============================================================================
--- branches/2020Q2/databases/mysql57-server/Makefile	Mon May  4 09:44:07 2020	(r533909)
+++ branches/2020Q2/databases/mysql57-server/Makefile	Mon May  4 09:45:40 2020	(r533910)
@@ -3,7 +3,7 @@
 
 PORTNAME?=	mysql
 PORTVERSION=	5.7.30
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	databases
 MASTER_SITES=	MYSQL/MySQL-5.7
 PKGNAMESUFFIX?=	57-server

Copied: branches/2020Q2/databases/mysql57-server/files/patch-include_my_openssl.h (from r533909, head/databases/mysql57-server/files/patch-include_my_openssl.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2020Q2/databases/mysql57-server/files/patch-include_my_openssl.h	Mon May  4 09:45:40 2020	(r533910, copy of r533909, head/databases/mysql57-server/files/patch-include_my_openssl.h)
@@ -0,0 +1,11 @@
+--- include/my_openssl.h.orig	2020-03-23 17:35:17 UTC
++++ include/my_openssl.h
+@@ -51,7 +51,7 @@ extern "C" {
+  */
+ static inline int mysql_OPENSSL_init()
+ {
+-#if defined(HAVE_STATIC_OPENSSL)
++#if defined(HAVE_STATIC_OPENSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+   return OPENSSL_init_crypto(OPENSSL_INIT_NO_ATEXIT, NULL);
+ #else
+   return SSL_library_init();

Copied: branches/2020Q2/databases/mysql57-server/files/patch-rapid_plugin_group_replication_libmysqlgcs_src_bindings_xcom_xcom_xcom_ssl_transport.c (from r533909, head/databases/mysql57-server/files/patch-rapid_plugin_group_replication_libmysqlgcs_src_bindings_xcom_xcom_xcom_ssl_transport.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2020Q2/databases/mysql57-server/files/patch-rapid_plugin_group_replication_libmysqlgcs_src_bindings_xcom_xcom_xcom_ssl_transport.c	Mon May  4 09:45:40 2020	(r533910, copy of r533909, head/databases/mysql57-server/files/patch-rapid_plugin_group_replication_libmysqlgcs_src_bindings_xcom_xcom_xcom_ssl_transport.c)
@@ -0,0 +1,11 @@
+--- rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c.orig	2020-03-23 17:35:17 UTC
++++ rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c
+@@ -529,7 +529,7 @@ int xcom_init_ssl(const char *server_key_file, const c
+     break e.g. ODBC clients (if the client also uses SSL).
+   */
+ 
+-#if defined(HAVE_STATIC_OPENSSL)
++#if defined(HAVE_STATIC_OPENSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+   OPENSSL_init_crypto(OPENSSL_INIT_NO_ATEXIT, NULL);
+ #else
+   SSL_library_init();

Copied: branches/2020Q2/databases/mysql57-server/files/patch-sql_auth_sha2_password_common.cc (from r533909, head/databases/mysql57-server/files/patch-sql_auth_sha2_password_common.cc)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2020Q2/databases/mysql57-server/files/patch-sql_auth_sha2_password_common.cc	Mon May  4 09:45:40 2020	(r533910, copy of r533909, head/databases/mysql57-server/files/patch-sql_auth_sha2_password_common.cc)
@@ -0,0 +1,12 @@
+--- sql/auth/sha2_password_common.cc
++++ sql/auth/sha2_password_common.cc
+@@ -116,7 +116,8 @@ bool SHA256_digest::retrieve_digest(unsigned char *digest,
+     DBUG_RETURN(true);
+   }
+   m_ok= EVP_DigestFinal_ex(md_context, m_digest, NULL);
+-#if defined(HAVE_WOLFSSL) || OPENSSL_VERSION_NUMBER < 0x10100000L
++#if defined(HAVE_WOLFSSL) || OPENSSL_VERSION_NUMBER < 0x10100000L || \
++    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x02090000fL)
+   EVP_MD_CTX_cleanup(md_context);
+ #else  /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+   EVP_MD_CTX_reset(md_context);

Copied: branches/2020Q2/databases/mysql57-server/files/patch-vio_viosslfactories.c (from r533909, head/databases/mysql57-server/files/patch-vio_viosslfactories.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2020Q2/databases/mysql57-server/files/patch-vio_viosslfactories.c	Mon May  4 09:45:40 2020	(r533910, copy of r533909, head/databases/mysql57-server/files/patch-vio_viosslfactories.c)
@@ -0,0 +1,35 @@
+--- vio/viosslfactories.c
++++ vio/viosslfactories.c
+@@ -123,21 +123,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);
+ }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005040945.0449jeHJ052935>