Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 May 2020 09:44:07 +0000 (UTC)
From:      Jochen Neumeister <joneum@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r533909 - in head/databases: mysql57-client/files mysql57-server mysql57-server/files
Message-ID:  <202005040944.0449i7mt052573@repo.freebsd.org>

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

Log:
  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
  MFH:		2020Q2
  Sponsored by:	Netzkommune GmbH

Added:
  head/databases/mysql57-client/files/patch-include_my_openssl.h   (contents, props changed)
  head/databases/mysql57-client/files/patch-sql_auth_sha2_password_common.cc   (contents, props changed)
  head/databases/mysql57-client/files/patch-vio_viosslfactories.c   (contents, props changed)
  head/databases/mysql57-server/files/patch-include_my_openssl.h   (contents, props changed)
  head/databases/mysql57-server/files/patch-rapid_plugin_group_replication_libmysqlgcs_src_bindings_xcom_xcom_xcom_ssl_transport.c   (contents, props changed)
  head/databases/mysql57-server/files/patch-sql_auth_sha2_password_common.cc   (contents, props changed)
  head/databases/mysql57-server/files/patch-vio_viosslfactories.c   (contents, props changed)
Modified:
  head/databases/mysql57-server/Makefile

Added: head/databases/mysql57-client/files/patch-include_my_openssl.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-client/files/patch-include_my_openssl.h	Mon May  4 09:44:07 2020	(r533909)
@@ -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();

Added: head/databases/mysql57-client/files/patch-sql_auth_sha2_password_common.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-client/files/patch-sql_auth_sha2_password_common.cc	Mon May  4 09:44:07 2020	(r533909)
@@ -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);

Added: head/databases/mysql57-client/files/patch-vio_viosslfactories.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-client/files/patch-vio_viosslfactories.c	Mon May  4 09:44:07 2020	(r533909)
@@ -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: head/databases/mysql57-server/Makefile
==============================================================================
--- head/databases/mysql57-server/Makefile	Mon May  4 09:32:35 2020	(r533908)
+++ head/databases/mysql57-server/Makefile	Mon May  4 09:44:07 2020	(r533909)
@@ -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

Added: head/databases/mysql57-server/files/patch-include_my_openssl.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-server/files/patch-include_my_openssl.h	Mon May  4 09:44:07 2020	(r533909)
@@ -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();

Added: 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)
+++ head/databases/mysql57-server/files/patch-rapid_plugin_group_replication_libmysqlgcs_src_bindings_xcom_xcom_xcom_ssl_transport.c	Mon May  4 09:44:07 2020	(r533909)
@@ -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();

Added: head/databases/mysql57-server/files/patch-sql_auth_sha2_password_common.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-server/files/patch-sql_auth_sha2_password_common.cc	Mon May  4 09:44:07 2020	(r533909)
@@ -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);

Added: head/databases/mysql57-server/files/patch-vio_viosslfactories.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql57-server/files/patch-vio_viosslfactories.c	Mon May  4 09:44:07 2020	(r533909)
@@ -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?202005040944.0449i7mt052573>