public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/
@ 2018-09-13 16:55 Brian Evans
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Evans @ 2018-09-13 16:55 UTC (permalink / raw
  To: gentoo-commits

commit:     0c5fdeb6d081cae27524f042d0507dd58716bd51
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 13 16:54:47 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Sep 13 16:54:47 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c5fdeb6

dev-db/mysql-connector-c: Further OpenSSL 1.1 compile fix

Fix viossl.c:430:44: error: dereferencing pointer to incomplete type
 ‘SSL_COMP {aka struct ssl_comp_st}’ error

Backported changes from newer MySQL versions

Closes: https://bugs.gentoo.org/658910
Package-Manager: Portage-2.3.49, Repoman-2.3.10

 dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch b/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch
index cbca14de60b..40e23019269 100644
--- a/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch
+++ b/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch
@@ -199,6 +199,19 @@ index 5622cb7..94b0f09 100644
  
    vio_delete(vio);
  }
+@@ -427,7 +427,12 @@
+       for (j = 0; j < n; j++)
+       {
+         SSL_COMP *c = sk_SSL_COMP_value(ssl_comp_methods, j);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+         DBUG_PRINT("info", ("  %d: %s\n", c->id, c->name));
++#else  /* OPENSSL_VERSION_NUMBER < 0x10100000L */
++        DBUG_PRINT("info",
++                   ("  %d: %s\n", SSL_COMP_get_id(c), SSL_COMP_get0_name(c)));
++#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+       }
+   }
+ #endif
 diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
 index da5449a..87b30c3 100644
 --- a/vio/viosslfactories.c


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/
@ 2018-09-18 13:12 Brian Evans
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Evans @ 2018-09-18 13:12 UTC (permalink / raw
  To: gentoo-commits

commit:     f3738737cebd87a225cc00de863a94d821f00a8f
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 18 13:11:56 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Sep 18 13:11:56 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3738737

dev-db/mysql-connector-c: Adjust openssl 1.1 patch to correct parameters

Closes: https://bugs.gentoo.org/666436
Package-Manager: Portage-2.3.49, Repoman-2.3.10

 dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch b/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch
index 40e23019269..3459206e4f7 100644
--- a/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch
+++ b/dev-db/mysql-connector-c/files/6.1.11-openssl-1.1.patch
@@ -243,8 +243,8 @@ index da5449a..87b30c3 100644
 +#else
 +    if (! DH_set0_pqg(dh,
 +              BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL),
-+              BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL),
-+              NULL))
++              NULL,
++              BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL)))
 +    {
 +#endif
        DH_free(dh);


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/
@ 2019-06-14  1:21 Brian Evans
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Evans @ 2019-06-14  1:21 UTC (permalink / raw
  To: gentoo-commits

commit:     db154a655ea2e2ab7bf4f9882846cc2a8370052e
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 14 01:21:39 2019 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 01:21:39 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db154a65

dev-db/mysql-connector-c: Fix libressl building

Thanks to steils <AT> gentoo.org for the update

Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Brian Evans <grknight <AT> gentoo.org>

 .../mysql-connector-c/files/8.0.16-libressl.patch  | 29 +++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/dev-db/mysql-connector-c/files/8.0.16-libressl.patch b/dev-db/mysql-connector-c/files/8.0.16-libressl.patch
index af21a1e6f2f..079211dd86f 100644
--- a/dev-db/mysql-connector-c/files/8.0.16-libressl.patch
+++ b/dev-db/mysql-connector-c/files/8.0.16-libressl.patch
@@ -1,4 +1,4 @@
-From ddaeb4c8ae76473263ebe1f711814eb977b0abbe Mon Sep 17 00:00:00 2001
+From 521750b438d96bef234b338901ff74f239b68061 Mon Sep 17 00:00:00 2001
 From: Stefan Strogin <steils@gentoo.org>
 Date: Sat, 8 Jun 2019 15:52:26 +0300
 Subject: [PATCH] Fix build with LibreSSL
@@ -20,8 +20,9 @@ Subject: [PATCH] Fix build with LibreSSL
  sql-common/client.cc                                      | 3 ++-
  sql/mysqld.cc                                             | 4 ++--
  sql/sys_vars.cc                                           | 8 ++++----
+ vio/viossl.cc                                             | 4 ++--
  vio/viosslfactories.cc                                    | 2 +-
- 12 files changed, 29 insertions(+), 19 deletions(-)
+ 13 files changed, 31 insertions(+), 21 deletions(-)
 
 diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
 index be3411a8916..95ed535f08a 100644
@@ -261,6 +262,28 @@ index b511c453f1e..8952922c1ff 100644
      ON_UPDATE(update_fips_mode),
  #else
      ON_UPDATE(NULL),
+diff --git a/vio/viossl.cc b/vio/viossl.cc
+index 97335eef321..e34b973f59e 100644
+--- a/vio/viossl.cc
++++ b/vio/viossl.cc
+@@ -507,7 +507,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
+ #if !defined(HAVE_WOLFSSL) && !defined(DBUG_OFF)
+     {
+       STACK_OF(SSL_COMP) *ssl_comp_methods = NULL;
+-      ssl_comp_methods = SSL_COMP_get_compression_methods();
++      ssl_comp_methods = (STACK_OF(SSL_COMP) *)SSL_COMP_get_compression_methods();
+       n = sk_SSL_COMP_num(ssl_comp_methods);
+       DBUG_PRINT("info", ("Available compression methods:\n"));
+       if (n == 0)
+@@ -515,7 +515,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
+       else
+         for (j = 0; j < n; j++) {
+           SSL_COMP *c = sk_SSL_COMP_value(ssl_comp_methods, j);
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+           DBUG_PRINT("info", ("  %d: %s\n", c->id, c->name));
+ #else  /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+           DBUG_PRINT("info",
 diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
 index 1a88dc3ed1d..a273c9991e7 100644
 --- a/vio/viosslfactories.cc
@@ -275,5 +298,5 @@ index 1a88dc3ed1d..a273c9991e7 100644
    Set fips mode in openssl library,
    When we set fips mode ON/STRICT, it will perform following operations:
 -- 
-2.21.0
+2.22.0
 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/
@ 2019-11-18 22:17 Aaron Bauman
  0 siblings, 0 replies; 7+ messages in thread
From: Aaron Bauman @ 2019-11-18 22:17 UTC (permalink / raw
  To: gentoo-commits

commit:     d2b51f5453c42fb827887f8c169a59afd2ff7eb8
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Mon Nov 18 10:32:18 2019 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Mon Nov 18 22:15:54 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2b51f54

dev-db/mysql-connector-c: remove unused patch

Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>

 .../mysql-connector-c/files/8.0.16-libressl.patch  | 302 ---------------------
 1 file changed, 302 deletions(-)

diff --git a/dev-db/mysql-connector-c/files/8.0.16-libressl.patch b/dev-db/mysql-connector-c/files/8.0.16-libressl.patch
deleted file mode 100644
index 079211dd86f..00000000000
--- a/dev-db/mysql-connector-c/files/8.0.16-libressl.patch
+++ /dev/null
@@ -1,302 +0,0 @@
-From 521750b438d96bef234b338901ff74f239b68061 Mon Sep 17 00:00:00 2001
-From: Stefan Strogin <steils@gentoo.org>
-Date: Sat, 8 Jun 2019 15:52:26 +0300
-Subject: [PATCH] Fix build with LibreSSL
-
-- Fix version checks as OPENSSL_VERSION_NUMBER in OpenSSL is always
-  0x20000000L.
-- FIPS support is removed from LibreSSL, do not use it.
-- Check for TLS1_3_VERSION define, not OpenSSL/LibreSSL version.
-  Theoretically even OpenSSL >=1.1.1 can be built with TLS 1.3 disabled.
----
- cmake/ssl.cmake                                           | 5 +++--
- extra/libevent/openssl-compat.h                           | 5 ++++-
- mysys_ssl/my_md5.cc                                       | 2 +-
- .../src/bindings/xcom/xcom/xcom_ssl_transport.c           | 4 ++--
- plugin/x/client/xconnection_impl.cc                       | 4 ++--
- router/src/http/src/tls_client_context.cc                 | 2 +-
- router/src/http/src/tls_context.cc                        | 6 +++++-
- router/src/http/src/tls_server_context.cc                 | 3 ++-
- sql-common/client.cc                                      | 3 ++-
- sql/mysqld.cc                                             | 4 ++--
- sql/sys_vars.cc                                           | 8 ++++----
- vio/viossl.cc                                             | 4 ++--
- vio/viosslfactories.cc                                    | 2 +-
- 13 files changed, 31 insertions(+), 21 deletions(-)
-
-diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
-index be3411a8916..95ed535f08a 100644
---- a/cmake/ssl.cmake
-+++ b/cmake/ssl.cmake
-@@ -313,13 +313,14 @@ MACRO (MYSQL_CHECK_SSL)
-         OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
-         )
-     ENDIF()
--    IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0")
-+    CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION)
-+    IF(HAVE_TLS1_3_VERSION)
-        ADD_DEFINITIONS(-DHAVE_TLSv13)
-     ENDIF()
-     IF(OPENSSL_INCLUDE_DIR AND
-        OPENSSL_LIBRARY   AND
-        CRYPTO_LIBRARY      AND
--       OPENSSL_MAJOR_VERSION STREQUAL "1"
-+       OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1"
-       )
-       SET(OPENSSL_FOUND TRUE)
-       FIND_PROGRAM(OPENSSL_EXECUTABLE openssl
-diff --git a/extra/libevent/openssl-compat.h b/extra/libevent/openssl-compat.h
-index 69afc716e25..deb21d6ad77 100644
---- a/extra/libevent/openssl-compat.h
-+++ b/extra/libevent/openssl-compat.h
-@@ -24,7 +24,6 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
- #define BIO_set_init(b, val) (b)->init = (val)
- #define BIO_set_data(b, val) (b)->ptr = (val)
- #define BIO_set_shutdown(b, val) (b)->shutdown = (val)
--#define BIO_get_init(b) (b)->init
- #define BIO_get_data(b) (b)->ptr
- #define BIO_get_shutdown(b) (b)->shutdown
- 
-@@ -32,4 +31,8 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
- 
- #endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
- 
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-+#define BIO_get_init(b) (b)->init
-+#endif
-+
- #endif /* OPENSSL_COMPAT_H */
-diff --git a/mysys_ssl/my_md5.cc b/mysys_ssl/my_md5.cc
-index 095fcb4eafb..0bdc885a96d 100644
---- a/mysys_ssl/my_md5.cc
-+++ b/mysys_ssl/my_md5.cc
-@@ -56,7 +56,7 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf,
- int compute_md5_hash(char *digest, const char *buf, int len) {
-   int retval = 0;
-   int fips_mode = 0;
--#if !defined(HAVE_WOLFSSL)
-+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
-   fips_mode = FIPS_mode();
- #endif /* HAVE_WOLFSSL */
-   /* If fips mode is ON/STRICT restricted method calls will result into abort,
-diff --git a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c
-index 67c151b207b..6a18a717b23 100644
---- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c
-+++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c
-@@ -297,7 +297,7 @@ error:
-   return 1;
- }
- 
--#ifndef HAVE_WOLFSSL
-+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
- #define OPENSSL_ERROR_LENGTH 512
- static int configure_ssl_fips_mode(const uint fips_mode) {
-   int rc = -1;
-@@ -521,7 +521,7 @@ int xcom_init_ssl(const char *server_key_file, const char *server_cert_file,
-   int verify_server = SSL_VERIFY_NONE;
-   int verify_client = SSL_VERIFY_NONE;
- 
--#ifndef HAVE_WOLFSSL
-+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
-   if (configure_ssl_fips_mode(ssl_fips_mode) != 1) {
-     G_ERROR("Error setting the ssl fips mode");
-     goto error;
-diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
-index cab1836c34f..4ba28d8fb5f 100644
---- a/plugin/x/client/xconnection_impl.cc
-+++ b/plugin/x/client/xconnection_impl.cc
-@@ -489,7 +489,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
-   return XError(CR_SSL_CONNECTION_ERROR, buffer);
- }
- 
--#ifndef HAVE_WOLFSSL
-+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
- /**
-   Set fips mode in openssl library,
-   When we set fips mode ON/STRICT, it will perform following operations:
-@@ -539,7 +539,7 @@ XError Connection_impl::activate_tls() {
-   if (!m_context->m_ssl_config.is_configured())
-     return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED};
- 
--#ifndef HAVE_WOLFSSL
-+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
-   char err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-   if (set_fips_mode((int)m_context->m_ssl_config.m_ssl_fips_mode, err_string) !=
-       1) {
-diff --git a/router/src/http/src/tls_client_context.cc b/router/src/http/src/tls_client_context.cc
-index f9dff94d837..ae7413b43e9 100644
---- a/router/src/http/src/tls_client_context.cc
-+++ b/router/src/http/src/tls_client_context.cc
-@@ -54,7 +54,7 @@ void TlsClientContext::verify(TlsVerify verify) {
- 
- void TlsClientContext::cipher_suites(const std::string &ciphers) {
- // TLSv1.3 ciphers are controlled via SSL_CTX_set_ciphersuites()
--#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1)
-+#ifdef TLS1_3_VERSION
-   if (1 != SSL_CTX_set_ciphersuites(ssl_ctx_.get(), ciphers.c_str())) {
-     throw TlsError("set-cipher-suites");
-   }
-diff --git a/router/src/http/src/tls_context.cc b/router/src/http/src/tls_context.cc
-index bae36860fea..2cdc31274b6 100644
---- a/router/src/http/src/tls_context.cc
-+++ b/router/src/http/src/tls_context.cc
-@@ -92,7 +92,7 @@ static constexpr int o11x_version(TlsVersion version) {
-       return TLS1_1_VERSION;
-     case TlsVersion::TLS_1_2:
-       return TLS1_2_VERSION;
--#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1)
-+#ifdef TLS1_3_VERSION
-     case TlsVersion::TLS_1_3:
-       return TLS1_3_VERSION;
- #endif
-@@ -122,9 +122,11 @@ void TlsContext::version_range(TlsVersion min_version, TlsVersion max_version) {
-     default:
-       // unknown, leave all disabled
-       // fallthrough
-+#ifdef TLS1_3_VERSION
-     case TlsVersion::TLS_1_3:
-       opts |= SSL_OP_NO_TLSv1_2;
-       // fallthrough
-+#endif
-     case TlsVersion::TLS_1_2:
-       opts |= SSL_OP_NO_TLSv1_1;
-       // fallthrough
-@@ -171,8 +173,10 @@ TlsVersion TlsContext::min_version() const {
-       return TlsVersion::TLS_1_1;
-     case TLS1_2_VERSION:
-       return TlsVersion::TLS_1_2;
-+#ifdef TLS1_3_VERSION
-     case TLS1_3_VERSION:
-       return TlsVersion::TLS_1_3;
-+#endif
-     case 0:
-       return TlsVersion::AUTO;
-     default:
-diff --git a/router/src/http/src/tls_server_context.cc b/router/src/http/src/tls_server_context.cc
-index 4f3fa39cd28..ecc9755979b 100644
---- a/router/src/http/src/tls_server_context.cc
-+++ b/router/src/http/src/tls_server_context.cc
-@@ -162,7 +162,8 @@ void TlsServerContext::init_tmp_dh(const std::string &dh_params) {
-     }
- 
-   } else {
--#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0)
-+#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \
-+    !defined(LIBRESSL_VERSION_NUMBER)
-     dh2048.reset(DH_get_2048_256());
- #else
-     /*
-diff --git a/sql-common/client.cc b/sql-common/client.cc
-index d6d977970b7..af68f04104d 100644
---- a/sql-common/client.cc
-+++ b/sql-common/client.cc
-@@ -7515,7 +7515,8 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
- #endif
-       break;
-     case MYSQL_OPT_SSL_FIPS_MODE: {
--#if defined(HAVE_OPENSSL) && !defined(HAVE_WOLFSSL)
-+#if defined(HAVE_OPENSSL) && \
-+    !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
-       char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-       ENSURE_EXTENSIONS_PRESENT(&mysql->options);
-       mysql->options.extension->ssl_fips_mode = *(uint *)arg;
-diff --git a/sql/mysqld.cc b/sql/mysqld.cc
-index 13479e3c474..904bae80f8f 100644
---- a/sql/mysqld.cc
-+++ b/sql/mysqld.cc
-@@ -4640,7 +4640,7 @@ static int init_thread_environment() {
- 
- static PSI_memory_key key_memory_openssl = PSI_NOT_INSTRUMENTED;
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- #define FILE_LINE_ARGS
- #else
- #define FILE_LINE_ARGS , const char *, int
-@@ -4676,7 +4676,7 @@ static void init_ssl() {
- }
- 
- static int init_ssl_communication() {
--#ifndef HAVE_WOLFSSL
-+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
-   char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-   int ret_fips_mode = set_fips_mode(opt_ssl_fips_mode, ssl_err_string);
-   if (ret_fips_mode != 1) {
-diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
-index b511c453f1e..8952922c1ff 100644
---- a/sql/sys_vars.cc
-+++ b/sql/sys_vars.cc
-@@ -4282,7 +4282,7 @@ static Sys_var_ulong Sys_max_execution_time(
-     HINT_UPDATEABLE SESSION_VAR(max_execution_time), CMD_LINE(REQUIRED_ARG),
-     VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1));
- 
--#ifndef HAVE_WOLFSSL
-+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
- static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
-   char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-   if (set_fips_mode(opt_ssl_fips_mode, ssl_err_string) != 1) {
-@@ -4295,7 +4295,7 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
- }
- #endif
- 
--#ifdef HAVE_WOLFSSL
-+#if defined(HAVE_WOLFSSL) || defined(LIBRESSL_VERSION_NUMBER)
- static const char *ssl_fips_mode_names[] = {"OFF", 0};
- #else
- static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", 0};
-@@ -4303,7 +4303,7 @@ static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", 0};
- static Sys_var_enum Sys_ssl_fips_mode(
-     "ssl_fips_mode",
-     "SSL FIPS mode (applies only for OpenSSL); "
--#ifndef HAVE_WOLFSSL
-+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
-     "permitted values are: OFF, ON, STRICT",
- #else
-     "permitted values are: OFF",
-@@ -4311,7 +4311,7 @@ static Sys_var_enum Sys_ssl_fips_mode(
-     GLOBAL_VAR(opt_ssl_fips_mode), CMD_LINE(REQUIRED_ARG, OPT_SSL_FIPS_MODE),
-     ssl_fips_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG,
-     ON_CHECK(NULL),
--#ifndef HAVE_WOLFSSL
-+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
-     ON_UPDATE(update_fips_mode),
- #else
-     ON_UPDATE(NULL),
-diff --git a/vio/viossl.cc b/vio/viossl.cc
-index 97335eef321..e34b973f59e 100644
---- a/vio/viossl.cc
-+++ b/vio/viossl.cc
-@@ -507,7 +507,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
- #if !defined(HAVE_WOLFSSL) && !defined(DBUG_OFF)
-     {
-       STACK_OF(SSL_COMP) *ssl_comp_methods = NULL;
--      ssl_comp_methods = SSL_COMP_get_compression_methods();
-+      ssl_comp_methods = (STACK_OF(SSL_COMP) *)SSL_COMP_get_compression_methods();
-       n = sk_SSL_COMP_num(ssl_comp_methods);
-       DBUG_PRINT("info", ("Available compression methods:\n"));
-       if (n == 0)
-@@ -515,7 +515,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
-       else
-         for (j = 0; j < n; j++) {
-           SSL_COMP *c = sk_SSL_COMP_value(ssl_comp_methods, j);
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-           DBUG_PRINT("info", ("  %d: %s\n", c->id, c->name));
- #else  /* OPENSSL_VERSION_NUMBER < 0x10100000L */
-           DBUG_PRINT("info",
-diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
-index 1a88dc3ed1d..a273c9991e7 100644
---- a/vio/viosslfactories.cc
-+++ b/vio/viosslfactories.cc
-@@ -429,7 +429,7 @@ void ssl_start() {
-   }
- }
- 
--#ifndef HAVE_WOLFSSL
-+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
- /**
-   Set fips mode in openssl library,
-   When we set fips mode ON/STRICT, it will perform following operations:
--- 
-2.22.0
-


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/
@ 2021-01-25 15:01 Aaron Bauman
  0 siblings, 0 replies; 7+ messages in thread
From: Aaron Bauman @ 2021-01-25 15:01 UTC (permalink / raw
  To: gentoo-commits

commit:     6ab054f39891abbea4bec22e68705bc28645838c
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Thu Jan 21 15:42:05 2021 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Mon Jan 25 15:01:22 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ab054f3

dev-db/mysql-connector-c: remove unused patches

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>

 ...-8.0.18-always-build-decompress-utilities.patch | 34 ----------------------
 ...-c-8.0.21-survive-malformed-charset-files.patch | 18 ------------
 2 files changed, 52 deletions(-)

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.18-always-build-decompress-utilities.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.18-always-build-decompress-utilities.patch
deleted file mode 100644
index af0b31e89a3..00000000000
--- a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.18-always-build-decompress-utilities.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/utilities/CMakeLists.txt
-+++ b/utilities/CMakeLists.txt
-@@ -110,21 +110,16 @@ MYSQL_ADD_EXECUTABLE(perror
-   DEPENDENCIES GenError
-   LINK_LIBRARIES mysys
-   )
--IF(BUILD_BUNDLED_LZ4)
--  MYSQL_ADD_EXECUTABLE(lz4_decompress
--    lz4_decompress.cc
--    COMPONENT Server
--    LINK_LIBRARIES ${LZ4_LIBRARY} mysys
--    )
--ENDIF()
--
--IF(BUILD_BUNDLED_ZLIB OR NOT OPENSSL_EXECUTABLE_HAS_ZLIB)
--  MYSQL_ADD_EXECUTABLE(zlib_decompress
--    zlib_decompress.cc
--    COMPONENT Server
--    LINK_LIBRARIES ${ZLIB_LIBRARY} mysys
--    )
--ENDIF()
-+MYSQL_ADD_EXECUTABLE(lz4_decompress
-+  lz4_decompress.cc
-+  COMPONENT Server
-+  LINK_LIBRARIES ${LZ4_LIBRARY} mysys
-+  )
-+MYSQL_ADD_EXECUTABLE(zlib_decompress
-+  zlib_decompress.cc
-+  COMPONENT Server
-+  LINK_LIBRARIES ${ZLIB_LIBRARY} mysys
-+  )
- 
- # All targets below belong to COMPONENT Server and depend on InnoDB.
- IF(WITHOUT_SERVER)

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.21-survive-malformed-charset-files.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.21-survive-malformed-charset-files.patch
deleted file mode 100644
index 72799f009c8..00000000000
--- a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.21-survive-malformed-charset-files.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: don't crash on malformed charset files
-Origin: https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1877504/comments/19
-Bug: https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1884809
-Bug: https://bugs.gentoo.org/737002
-Forwarded: workaround, not needed
-
---- a/mysys/charset.cc
-+++ b/mysys/charset.cc
-@@ -922,7 +922,7 @@ size_t escape_quotes_for_mysql(CHARSET_I
- 
- void charset_uninit() {
-   for (CHARSET_INFO *cs : all_charsets) {
--    if (cs && cs->coll->uninit) {
-+    if (cs && cs->coll && cs->coll->uninit) {
-       cs->coll->uninit(cs);
-     }
-   }
- 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/
@ 2021-05-03 18:46 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2021-05-03 18:46 UTC (permalink / raw
  To: gentoo-commits

commit:     47f22161eb3177488ecdf04e7e15e979dc5dc25c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May  3 18:27:29 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May  3 18:45:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47f22161

dev-db/mysql-connector-c: drop obsolete LibreSSL patches

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/mysql-connector-c-8.0.21-libressl.patch  | 356 ---------------------
 .../files/mysql-connector-c-8.0.23-libressl.patch  | 356 ---------------------
 2 files changed, 712 deletions(-)

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.21-libressl.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.21-libressl.patch
deleted file mode 100644
index 78f3e78fd6d..00000000000
--- a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.21-libressl.patch
+++ /dev/null
@@ -1,356 +0,0 @@
-From 4aadff7b08f6a69160a44c1742d5a12fb5abc059 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi@gentoo.org>
-Date: Thu, 30 Apr 2020 20:01:48 +0200
-Subject: [PATCH 5/5] Add LibreSSL support
-
-Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
----
- cmake/ssl.cmake                               |  5 +++--
- mysys/my_md5.cc                               |  2 ++
- .../bindings/xcom/xcom/xcom_ssl_transport.cc  |  6 +++++-
- plugin/x/client/xconnection_impl.cc           |  4 ++++
- router/src/http/src/tls_client_context.cc     |  2 +-
- router/src/http/src/tls_context.cc            |  9 ++++++--
- router/src/http/src/tls_server_context.cc     |  3 ++-
- sql-common/client.cc                          |  2 ++
- sql/mysqld.cc                                 |  4 +++-
- sql/sys_vars.cc                               | 21 +++++++++++++++++--
- vio/viossl.cc                                 |  8 +++----
- vio/viosslfactories.cc                        |  2 ++
- 12 files changed, 54 insertions(+), 14 deletions(-)
-
-diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
-index 52feadeaa..3b8332695 100644
---- a/cmake/ssl.cmake
-+++ b/cmake/ssl.cmake
-@@ -222,13 +222,14 @@ MACRO (MYSQL_CHECK_SSL)
-         OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
-         )
-     ENDIF()
--    IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0")
-+    CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION)
-+    IF(HAVE_TLS1_3_VERSION)
-        ADD_DEFINITIONS(-DHAVE_TLSv13)
-     ENDIF()
-     IF(OPENSSL_INCLUDE_DIR AND
-        OPENSSL_LIBRARY   AND
-        CRYPTO_LIBRARY      AND
--       OPENSSL_MAJOR_VERSION STREQUAL "1"
-+       OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1"
-       )
-       SET(OPENSSL_FOUND TRUE)
-       FIND_PROGRAM(OPENSSL_EXECUTABLE openssl
-diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc
-index dea997b25..531696329 100644
---- a/mysys/my_md5.cc
-+++ b/mysys/my_md5.cc
-@@ -56,7 +56,9 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf,
- int compute_md5_hash(char *digest, const char *buf, int len) {
-   int retval = 0;
-   int fips_mode = 0;
-+#ifndef LIBRESSL_VERSION_NUMBER
-   fips_mode = FIPS_mode();
-+#endif
-   /* If fips mode is ON/STRICT restricted method calls will result into abort,
-    * skipping call. */
-   if (fips_mode == 0) {
-diff --git a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
-index 8bf63ce14..02f91b44e 100644
---- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
-+++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
-@@ -325,6 +325,7 @@ error:
-   return 1;
- }
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
- #define OPENSSL_ERROR_LENGTH 512
- static int configure_ssl_fips_mode(const uint fips_mode) {
-   int rc = -1;
-@@ -348,6 +349,7 @@ static int configure_ssl_fips_mode(const uint fips_mode) {
- EXIT:
-   return rc;
- }
-+#endif
- 
- static int configure_ssl_ca(SSL_CTX *ssl_ctx, const char *ca_file,
-                             const char *ca_path) {
-@@ -544,10 +546,12 @@ int xcom_init_ssl(const char *server_key_file, const char *server_cert_file,
-   int verify_server = SSL_VERIFY_NONE;
-   int verify_client = SSL_VERIFY_NONE;
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
-   if (configure_ssl_fips_mode(ssl_fips_mode) != 1) {
-     G_ERROR("Error setting the ssl fips mode");
-     goto error;
-   }
-+#endif
- 
-   SSL_library_init();
-   SSL_load_error_strings();
-@@ -611,7 +615,7 @@ error:
- void xcom_cleanup_ssl() {
-   if (!xcom_use_ssl()) return;
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-   ERR_remove_thread_state(0);
- #endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
- }
-diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
-index 13bc6794e..5223169db 100644
---- a/plugin/x/client/xconnection_impl.cc
-+++ b/plugin/x/client/xconnection_impl.cc
-@@ -498,6 +498,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
-   return XError(CR_SSL_CONNECTION_ERROR, buffer);
- }
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
- /**
-   Set fips mode in openssl library,
-   When we set fips mode ON/STRICT, it will perform following operations:
-@@ -537,6 +538,7 @@ int set_fips_mode(const uint32_t fips_mode,
- EXIT:
-   return rc;
- }
-+#endif
- 
- XError Connection_impl::activate_tls() {
-   if (nullptr == m_vio) return get_socket_error(SOCKET_ECONNRESET);
-@@ -547,12 +549,14 @@ XError Connection_impl::activate_tls() {
-   if (!m_context->m_ssl_config.is_configured())
-     return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED, true};
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
-   char err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-   if (set_fips_mode(
-           static_cast<uint32_t>(m_context->m_ssl_config.m_ssl_fips_mode),
-           err_string) != 1) {
-     return XError{CR_SSL_CONNECTION_ERROR, err_string, true};
-   }
-+#endif
-   auto ssl_ctx_flags = process_tls_version(
-       details::null_when_empty(m_context->m_ssl_config.m_tls_version));
- 
-diff --git a/router/src/http/src/tls_client_context.cc b/router/src/http/src/tls_client_context.cc
-index 297ceee30..7c1157289 100644
---- a/router/src/http/src/tls_client_context.cc
-+++ b/router/src/http/src/tls_client_context.cc
-@@ -54,7 +54,7 @@ void TlsClientContext::verify(TlsVerify verify) {
- 
- void TlsClientContext::cipher_suites(const std::string &ciphers) {
- // TLSv1.3 ciphers are controlled via SSL_CTX_set_ciphersuites()
--#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1)
-+#ifdef TLS1_3_VERSION
-   if (1 != SSL_CTX_set_ciphersuites(ssl_ctx_.get(), ciphers.c_str())) {
-     throw TlsError("set-cipher-suites");
-   }
-diff --git a/router/src/http/src/tls_context.cc b/router/src/http/src/tls_context.cc
-index 60ed7e6ca..388ef8f28 100644
---- a/router/src/http/src/tls_context.cc
-+++ b/router/src/http/src/tls_context.cc
-@@ -91,7 +91,7 @@ static int o11x_version(TlsVersion version) {
-       return TLS1_1_VERSION;
-     case TlsVersion::TLS_1_2:
-       return TLS1_2_VERSION;
--#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1)
-+#ifdef TLS1_3_VERSION
-     case TlsVersion::TLS_1_3:
-       return TLS1_3_VERSION;
- #endif
-@@ -120,9 +120,11 @@ void TlsContext::version_range(TlsVersion min_version, TlsVersion max_version) {
-   switch (min_version) {
-     default:
-       // unknown, leave all disabled
-+#ifdef TLS1_3_VERSION
-       // fallthrough
-     case TlsVersion::TLS_1_3:
-       opts |= SSL_OP_NO_TLSv1_2;
-+#endif
-       // fallthrough
-     case TlsVersion::TLS_1_2:
-       opts |= SSL_OP_NO_TLSv1_1;
-@@ -170,8 +172,10 @@ TlsVersion TlsContext::min_version() const {
-       return TlsVersion::TLS_1_1;
-     case TLS1_2_VERSION:
-       return TlsVersion::TLS_1_2;
-+#ifdef TLS1_3_VERSION
-     case TLS1_3_VERSION:
-       return TlsVersion::TLS_1_3;
-+#endif
-     case 0:
-       return TlsVersion::AUTO;
-     default:
-@@ -230,7 +234,8 @@ TlsContext::InfoCallback TlsContext::info_callback() const {
- }
- 
- int TlsContext::security_level() const {
--#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0)
-+#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \
-+    !defined(LIBRESSL_VERSION_NUMBER)
-   return SSL_CTX_get_security_level(ssl_ctx_.get());
- #else
-   return 0;
-diff --git a/router/src/http/src/tls_server_context.cc b/router/src/http/src/tls_server_context.cc
-index 0f4472419..707d7de86 100644
---- a/router/src/http/src/tls_server_context.cc
-+++ b/router/src/http/src/tls_server_context.cc
-@@ -167,7 +167,8 @@ void TlsServerContext::init_tmp_dh(const std::string &dh_params) {
-     }
- 
-   } else {
--#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0)
-+#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \
-+    !defined(LIBRESSL_VERSION_NUMBER)
-     dh2048.reset(DH_get_2048_256());
- #else
-     /*
-diff --git a/sql-common/client.cc b/sql-common/client.cc
-index ffb136b5b..8a0c7b834 100644
---- a/sql-common/client.cc
-+++ b/sql-common/client.cc
-@@ -7766,6 +7766,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
-         return 1;
-       break;
-     case MYSQL_OPT_SSL_FIPS_MODE: {
-+#if !defined(LIBRESSL_VERSION_NUMBER)
-       char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-       ENSURE_EXTENSIONS_PRESENT(&mysql->options);
-       mysql->options.extension->ssl_fips_mode = *static_cast<const uint *>(arg);
-@@ -7777,6 +7778,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
-             "Set Fips mode ON/STRICT failed, detail: '%s'.", ssl_err_string);
-         return 1;
-       }
-+#endif
-     } break;
-     case MYSQL_OPT_SSL_MODE:
-       ENSURE_EXTENSIONS_PRESENT(&mysql->options);
-diff --git a/sql/mysqld.cc b/sql/mysqld.cc
-index 682e8d5ae..96a922d7a 100644
---- a/sql/mysqld.cc
-+++ b/sql/mysqld.cc
-@@ -5109,7 +5109,7 @@ static int init_thread_environment() {
- 
- static PSI_memory_key key_memory_openssl = PSI_NOT_INSTRUMENTED;
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- #define FILE_LINE_ARGS
- #else
- #define FILE_LINE_ARGS , const char *, int
-@@ -5143,12 +5143,14 @@ static void init_ssl() {
- }
- 
- static int init_ssl_communication() {
-+#ifndef LIBRESSL_VERSION_NUMBER
-   char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-   int ret_fips_mode = set_fips_mode(opt_ssl_fips_mode, ssl_err_string);
-   if (ret_fips_mode != 1) {
-     LogErr(ERROR_LEVEL, ER_SSL_FIPS_MODE_ERROR, ssl_err_string);
-     return 1;
-   }
-+#endif
-   if (TLS_channel::singleton_init(&mysql_main, mysql_main_channel, opt_use_ssl,
-                                   &server_main_callback, opt_initialize))
-     return 1;
-diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
-index 5b1a82d2f..4e2dff865 100644
---- a/sql/sys_vars.cc
-+++ b/sql/sys_vars.cc
-@@ -4474,6 +4474,7 @@ static Sys_var_ulong Sys_max_execution_time(
-     HINT_UPDATEABLE SESSION_VAR(max_execution_time), CMD_LINE(REQUIRED_ARG),
-     VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1));
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
- static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
-   char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-   if (set_fips_mode(opt_ssl_fips_mode, ssl_err_string) != 1) {
-@@ -4484,15 +4485,31 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
-     return false;
-   }
- }
-+#endif
-+
-+#if defined(LIBRESSL_VERSION_NUMBER)
-+static const char *ssl_fips_mode_names[] = {"OFF", 0};
-+#else
-+static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", 0};
-+#endif
- 
--static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", nullptr};
- static Sys_var_enum Sys_ssl_fips_mode(
-     "ssl_fips_mode",
-     "SSL FIPS mode (applies only for OpenSSL); "
-+#ifndef LIBRESSL_VERSION_NUMBER
-     "permitted values are: OFF, ON, STRICT",
-+#else
-+    "permitted values are: OFF",
-+#endif
-     GLOBAL_VAR(opt_ssl_fips_mode), CMD_LINE(REQUIRED_ARG, OPT_SSL_FIPS_MODE),
-     ssl_fips_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG,
--    ON_CHECK(nullptr), ON_UPDATE(update_fips_mode), nullptr);
-+    ON_CHECK(NULL),
-+#ifndef LIBRESSL_VERSION_NUMBER
-+    ON_UPDATE(update_fips_mode),
-+#else
-+    ON_UPDATE(NULL),
-+#endif
-+    NULL);
- 
- static Sys_var_bool Sys_auto_generate_certs(
-     "auto_generate_certs",
-diff --git a/vio/viossl.cc b/vio/viossl.cc
-index 0e9594741..3a589c64b 100644
---- a/vio/viossl.cc
-+++ b/vio/viossl.cc
-@@ -45,7 +45,7 @@
-   BIO_set_callback_ex was added in openSSL 1.1.1
-   For older openSSL, use the deprecated BIO_set_callback.
- */
--#if OPENSSL_VERSION_NUMBER >= 0x10101000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER)
- #define HAVE_BIO_SET_CALLBACK_EX
- #endif
- 
-@@ -634,8 +634,8 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
- 
- #if !defined(DBUG_OFF)
-     {
--      STACK_OF(SSL_COMP) *ssl_comp_methods = nullptr;
--      ssl_comp_methods = SSL_COMP_get_compression_methods();
-+      STACK_OF(SSL_COMP) *ssl_comp_methods = NULL;
-+      ssl_comp_methods = (STACK_OF(SSL_COMP) *)SSL_COMP_get_compression_methods();
-       n = sk_SSL_COMP_num(ssl_comp_methods);
-       DBUG_PRINT("info", ("Available compression methods:\n"));
-       if (n == 0)
-@@ -643,7 +643,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
-       else
-         for (j = 0; j < n; j++) {
-           SSL_COMP *c = sk_SSL_COMP_value(ssl_comp_methods, j);
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-           DBUG_PRINT("info", ("  %d: %s\n", c->id, c->name));
- #else  /* OPENSSL_VERSION_NUMBER < 0x10100000L */
-           DBUG_PRINT("info",
-diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
-index 6c04029cc..f27221463 100644
---- a/vio/viosslfactories.cc
-+++ b/vio/viosslfactories.cc
-@@ -473,6 +473,7 @@ void ssl_start() {
-   }
- }
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
- /**
-   Set fips mode in openssl library,
-   When we set fips mode ON/STRICT, it will perform following operations:
-@@ -526,6 +527,7 @@ EXIT:
-   @returns openssl current fips mode
- */
- uint get_fips_mode() { return FIPS_mode(); }
-+#endif
- 
- long process_tls_version(const char *tls_version) {
-   const char *separator = ",";
--- 
-2.27.0
-

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.23-libressl.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.23-libressl.patch
deleted file mode 100644
index 06681d940dd..00000000000
--- a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.23-libressl.patch
+++ /dev/null
@@ -1,356 +0,0 @@
-From 262f0b8bdc86a755041c19c11b6067afce28dae1 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi@gentoo.org>
-Date: Thu, 30 Apr 2020 20:01:48 +0200
-Subject: [PATCH 5/6] Add LibreSSL support
-
-Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
----
- cmake/ssl.cmake                               |  5 +++--
- mysys/my_md5.cc                               |  2 ++
- .../bindings/xcom/xcom/xcom_ssl_transport.cc  |  6 +++++-
- plugin/x/client/xconnection_impl.cc           |  4 ++++
- router/src/harness/src/tls_client_context.cc  |  2 +-
- router/src/harness/src/tls_context.cc         |  9 ++++++--
- router/src/harness/src/tls_server_context.cc  |  3 ++-
- sql-common/client.cc                          |  2 ++
- sql/mysqld.cc                                 |  4 +++-
- sql/sys_vars.cc                               | 21 +++++++++++++++++--
- vio/viossl.cc                                 |  8 +++----
- vio/viosslfactories.cc                        |  2 ++
- 12 files changed, 54 insertions(+), 14 deletions(-)
-
-diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
-index 52feadeaa..3b8332695 100644
---- a/cmake/ssl.cmake
-+++ b/cmake/ssl.cmake
-@@ -222,13 +222,14 @@ MACRO (MYSQL_CHECK_SSL)
-         OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
-         )
-     ENDIF()
--    IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0")
-+    CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION)
-+    IF(HAVE_TLS1_3_VERSION)
-        ADD_DEFINITIONS(-DHAVE_TLSv13)
-     ENDIF()
-     IF(OPENSSL_INCLUDE_DIR AND
-        OPENSSL_LIBRARY   AND
-        CRYPTO_LIBRARY      AND
--       OPENSSL_MAJOR_VERSION STREQUAL "1"
-+       OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1"
-       )
-       SET(OPENSSL_FOUND TRUE)
-       FIND_PROGRAM(OPENSSL_EXECUTABLE openssl
-diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc
-index dea997b25..531696329 100644
---- a/mysys/my_md5.cc
-+++ b/mysys/my_md5.cc
-@@ -56,7 +56,9 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf,
- int compute_md5_hash(char *digest, const char *buf, int len) {
-   int retval = 0;
-   int fips_mode = 0;
-+#ifndef LIBRESSL_VERSION_NUMBER
-   fips_mode = FIPS_mode();
-+#endif
-   /* If fips mode is ON/STRICT restricted method calls will result into abort,
-    * skipping call. */
-   if (fips_mode == 0) {
-diff --git a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
-index 8bf63ce14..02f91b44e 100644
---- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
-+++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.cc
-@@ -325,6 +325,7 @@ error:
-   return 1;
- }
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
- #define OPENSSL_ERROR_LENGTH 512
- static int configure_ssl_fips_mode(const uint fips_mode) {
-   int rc = -1;
-@@ -348,6 +349,7 @@ static int configure_ssl_fips_mode(const uint fips_mode) {
- EXIT:
-   return rc;
- }
-+#endif
- 
- static int configure_ssl_ca(SSL_CTX *ssl_ctx, const char *ca_file,
-                             const char *ca_path) {
-@@ -544,10 +546,12 @@ int xcom_init_ssl(const char *server_key_file, const char *server_cert_file,
-   int verify_server = SSL_VERIFY_NONE;
-   int verify_client = SSL_VERIFY_NONE;
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
-   if (configure_ssl_fips_mode(ssl_fips_mode) != 1) {
-     G_ERROR("Error setting the ssl fips mode");
-     goto error;
-   }
-+#endif
- 
-   SSL_library_init();
-   SSL_load_error_strings();
-@@ -611,7 +615,7 @@ error:
- void xcom_cleanup_ssl() {
-   if (!xcom_use_ssl()) return;
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-   ERR_remove_thread_state(0);
- #endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
- }
-diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
-index a78371098..9d3a7b436 100644
---- a/plugin/x/client/xconnection_impl.cc
-+++ b/plugin/x/client/xconnection_impl.cc
-@@ -498,6 +498,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
-   return XError(CR_SSL_CONNECTION_ERROR, buffer);
- }
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
- /**
-   Set fips mode in openssl library,
-   When we set fips mode ON/STRICT, it will perform following operations:
-@@ -537,6 +538,7 @@ int set_fips_mode(const uint32_t fips_mode,
- EXIT:
-   return rc;
- }
-+#endif
- 
- XError Connection_impl::activate_tls() {
-   if (nullptr == m_vio) return get_socket_error(SOCKET_ECONNRESET);
-@@ -547,12 +549,14 @@ XError Connection_impl::activate_tls() {
-   if (!m_context->m_ssl_config.is_configured())
-     return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED, true};
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
-   char err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-   if (set_fips_mode(
-           static_cast<uint32_t>(m_context->m_ssl_config.m_ssl_fips_mode),
-           err_string) != 1) {
-     return XError{CR_SSL_CONNECTION_ERROR, err_string, true};
-   }
-+#endif
-   auto ssl_ctx_flags = process_tls_version(
-       details::null_when_empty(m_context->m_ssl_config.m_tls_version));
- 
-diff --git a/router/src/harness/src/tls_client_context.cc b/router/src/harness/src/tls_client_context.cc
-index c14b1cb18..81a9425ca 100644
---- a/router/src/harness/src/tls_client_context.cc
-+++ b/router/src/harness/src/tls_client_context.cc
-@@ -61,7 +61,7 @@ stdx::expected<void, std::error_code> TlsClientContext::verify(
- stdx::expected<void, std::error_code> TlsClientContext::cipher_suites(
-     const std::string &ciphers) {
- // TLSv1.3 ciphers are controlled via SSL_CTX_set_ciphersuites()
--#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1)
-+#ifdef TLS1_3_VERSION
-   if (1 != SSL_CTX_set_ciphersuites(ssl_ctx_.get(), ciphers.c_str())) {
-     return stdx::make_unexpected(make_tls_error());
-   }
-diff --git a/router/src/harness/src/tls_context.cc b/router/src/harness/src/tls_context.cc
-index e0b97bf2d..8b64b1d01 100644
---- a/router/src/harness/src/tls_context.cc
-+++ b/router/src/harness/src/tls_context.cc
-@@ -115,7 +115,7 @@ static int o11x_version(TlsVersion version) {
-       return TLS1_1_VERSION;
-     case TlsVersion::TLS_1_2:
-       return TLS1_2_VERSION;
--#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1)
-+#ifdef TLS1_3_VERSION
-     case TlsVersion::TLS_1_3:
-       return TLS1_3_VERSION;
- #endif
-@@ -145,9 +145,11 @@ stdx::expected<void, std::error_code> TlsContext::version_range(
-   switch (min_version) {
-     default:
-       // unknown, leave all disabled
-+#ifdef TLS1_3_VERSION
-       // fallthrough
-     case TlsVersion::TLS_1_3:
-       opts |= SSL_OP_NO_TLSv1_2;
-+#endif
-       // fallthrough
-     case TlsVersion::TLS_1_2:
-       opts |= SSL_OP_NO_TLSv1_1;
-@@ -197,8 +199,10 @@ TlsVersion TlsContext::min_version() const {
-       return TlsVersion::TLS_1_1;
-     case TLS1_2_VERSION:
-       return TlsVersion::TLS_1_2;
-+#ifdef TLS1_3_VERSION
-     case TLS1_3_VERSION:
-       return TlsVersion::TLS_1_3;
-+#endif
-     case 0:
-       return TlsVersion::AUTO;
-     default:
-@@ -257,7 +261,8 @@ TlsContext::InfoCallback TlsContext::info_callback() const {
- }
- 
- int TlsContext::security_level() const {
--#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0)
-+#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \
-+    !defined(LIBRESSL_VERSION_NUMBER)
-   return SSL_CTX_get_security_level(ssl_ctx_.get());
- #else
-   return 0;
-diff --git a/router/src/harness/src/tls_server_context.cc b/router/src/harness/src/tls_server_context.cc
-index c8fc2b5a0..76775e2a0 100644
---- a/router/src/harness/src/tls_server_context.cc
-+++ b/router/src/harness/src/tls_server_context.cc
-@@ -169,7 +169,8 @@ stdx::expected<void, std::error_code> TlsServerContext::init_tmp_dh(
-     }
- 
-   } else {
--#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0)
-+#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \
-+    !defined(LIBRESSL_VERSION_NUMBER)
-     dh2048.reset(DH_get_2048_256());
- #else
-     /*
-diff --git a/sql-common/client.cc b/sql-common/client.cc
-index 79f301fe6..b5e1d126c 100644
---- a/sql-common/client.cc
-+++ b/sql-common/client.cc
-@@ -7987,6 +7987,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
-         return 1;
-       break;
-     case MYSQL_OPT_SSL_FIPS_MODE: {
-+#if !defined(LIBRESSL_VERSION_NUMBER)
-       char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-       ENSURE_EXTENSIONS_PRESENT(&mysql->options);
-       mysql->options.extension->ssl_fips_mode = *static_cast<const uint *>(arg);
-@@ -7998,6 +7999,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
-             "Set Fips mode ON/STRICT failed, detail: '%s'.", ssl_err_string);
-         return 1;
-       }
-+#endif
-     } break;
-     case MYSQL_OPT_SSL_MODE:
-       ENSURE_EXTENSIONS_PRESENT(&mysql->options);
-diff --git a/sql/mysqld.cc b/sql/mysqld.cc
-index cde636761..266a8c3bb 100644
---- a/sql/mysqld.cc
-+++ b/sql/mysqld.cc
-@@ -5035,7 +5035,7 @@ static int init_thread_environment() {
- 
- static PSI_memory_key key_memory_openssl = PSI_NOT_INSTRUMENTED;
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- #define FILE_LINE_ARGS
- #else
- #define FILE_LINE_ARGS , const char *, int
-@@ -5069,12 +5069,14 @@ static void init_ssl() {
- }
- 
- static int init_ssl_communication() {
-+#ifndef LIBRESSL_VERSION_NUMBER
-   char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-   int ret_fips_mode = set_fips_mode(opt_ssl_fips_mode, ssl_err_string);
-   if (ret_fips_mode != 1) {
-     LogErr(ERROR_LEVEL, ER_SSL_FIPS_MODE_ERROR, ssl_err_string);
-     return 1;
-   }
-+#endif
-   if (TLS_channel::singleton_init(&mysql_main, mysql_main_channel, opt_use_ssl,
-                                   &server_main_callback, opt_initialize))
-     return 1;
-diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
-index 2df3271ff..90942eef0 100644
---- a/sql/sys_vars.cc
-+++ b/sql/sys_vars.cc
-@@ -4614,6 +4614,7 @@ static Sys_var_ulong Sys_max_execution_time(
-     HINT_UPDATEABLE SESSION_VAR(max_execution_time), CMD_LINE(REQUIRED_ARG),
-     VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1));
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
- static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
-   char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
-   if (set_fips_mode(opt_ssl_fips_mode, ssl_err_string) != 1) {
-@@ -4624,15 +4625,31 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
-     return false;
-   }
- }
-+#endif
-+
-+#if defined(LIBRESSL_VERSION_NUMBER)
-+static const char *ssl_fips_mode_names[] = {"OFF", 0};
-+#else
-+static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", 0};
-+#endif
- 
--static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", nullptr};
- static Sys_var_enum Sys_ssl_fips_mode(
-     "ssl_fips_mode",
-     "SSL FIPS mode (applies only for OpenSSL); "
-+#ifndef LIBRESSL_VERSION_NUMBER
-     "permitted values are: OFF, ON, STRICT",
-+#else
-+    "permitted values are: OFF",
-+#endif
-     GLOBAL_VAR(opt_ssl_fips_mode), CMD_LINE(REQUIRED_ARG, OPT_SSL_FIPS_MODE),
-     ssl_fips_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG,
--    ON_CHECK(nullptr), ON_UPDATE(update_fips_mode), nullptr);
-+    ON_CHECK(NULL),
-+#ifndef LIBRESSL_VERSION_NUMBER
-+    ON_UPDATE(update_fips_mode),
-+#else
-+    ON_UPDATE(NULL),
-+#endif
-+    NULL);
- 
- static Sys_var_bool Sys_auto_generate_certs(
-     "auto_generate_certs",
-diff --git a/vio/viossl.cc b/vio/viossl.cc
-index 0e9594741..3a589c64b 100644
---- a/vio/viossl.cc
-+++ b/vio/viossl.cc
-@@ -45,7 +45,7 @@
-   BIO_set_callback_ex was added in openSSL 1.1.1
-   For older openSSL, use the deprecated BIO_set_callback.
- */
--#if OPENSSL_VERSION_NUMBER >= 0x10101000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER)
- #define HAVE_BIO_SET_CALLBACK_EX
- #endif
- 
-@@ -634,8 +634,8 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
- 
- #if !defined(DBUG_OFF)
-     {
--      STACK_OF(SSL_COMP) *ssl_comp_methods = nullptr;
--      ssl_comp_methods = SSL_COMP_get_compression_methods();
-+      STACK_OF(SSL_COMP) *ssl_comp_methods = NULL;
-+      ssl_comp_methods = (STACK_OF(SSL_COMP) *)SSL_COMP_get_compression_methods();
-       n = sk_SSL_COMP_num(ssl_comp_methods);
-       DBUG_PRINT("info", ("Available compression methods:\n"));
-       if (n == 0)
-@@ -643,7 +643,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
-       else
-         for (j = 0; j < n; j++) {
-           SSL_COMP *c = sk_SSL_COMP_value(ssl_comp_methods, j);
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-           DBUG_PRINT("info", ("  %d: %s\n", c->id, c->name));
- #else  /* OPENSSL_VERSION_NUMBER < 0x10100000L */
-           DBUG_PRINT("info",
-diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
-index 21c3510da..70e7d8f8b 100644
---- a/vio/viosslfactories.cc
-+++ b/vio/viosslfactories.cc
-@@ -472,6 +472,7 @@ void ssl_start() {
-   }
- }
- 
-+#ifndef LIBRESSL_VERSION_NUMBER
- /**
-   Set fips mode in openssl library,
-   When we set fips mode ON/STRICT, it will perform following operations:
-@@ -525,6 +526,7 @@ EXIT:
-   @returns openssl current fips mode
- */
- uint get_fips_mode() { return FIPS_mode(); }
-+#endif
- 
- long process_tls_version(const char *tls_version) {
-   const char *separator = ",";
--- 
-2.30.0
-


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/
@ 2021-11-17  1:05 Thomas Deutschmann
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Deutschmann @ 2021-11-17  1:05 UTC (permalink / raw
  To: gentoo-commits

commit:     a0d4c22f9c0b099d27366ea5d9f3503f72f4bbbd
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 17 00:55:16 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Nov 17 01:04:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0d4c22f

dev-db/mysql-connector-c: fix building against openssl-3

Closes: https://bugs.gentoo.org/823754
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 ...nector-c-8.0.27-add-OpenSSL-3.0.0-support.patch | 27 ++++++++++++++++++----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.27-add-OpenSSL-3.0.0-support.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.27-add-OpenSSL-3.0.0-support.patch
index fe702159410a..da1907db4633 100644
--- a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.27-add-OpenSSL-3.0.0-support.patch
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.27-add-OpenSSL-3.0.0-support.patch
@@ -1,4 +1,4 @@
-From 9936c93ee95a4d62a238aa4515be07ef14267932 Mon Sep 17 00:00:00 2001
+From d5bedd07c111676695270cdf35d23f9026a78113 Mon Sep 17 00:00:00 2001
 From: Thomas Deutschmann <whissi@gentoo.org>
 Date: Tue, 22 Jun 2021 23:56:54 +0200
 Subject: [PATCH 6/6] Add OpenSSL 3.0.0 support
@@ -12,8 +12,8 @@ Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
  sql-common/client.cc                          |  2 +
  sql/mysqld.cc                                 |  2 +
  sql/sys_vars.cc                               | 18 +++++-
- vio/viosslfactories.cc                        |  2 +
- 8 files changed, 74 insertions(+), 19 deletions(-)
+ vio/viosslfactories.cc                        |  6 ++
+ 8 files changed, 78 insertions(+), 19 deletions(-)
 
 diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
 index 293281cf1..4732d8bf4 100644
@@ -272,7 +272,7 @@ index 4592e4bbb..320f458fd 100644
  static Sys_var_bool Sys_auto_generate_certs(
      "auto_generate_certs",
 diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
-index 618be1511..b090f6713 100644
+index 618be1511..672fc74ca 100644
 --- a/vio/viosslfactories.cc
 +++ b/vio/viosslfactories.cc
 @@ -472,6 +472,7 @@ void ssl_start() {
@@ -291,6 +291,23 @@ index 618be1511..b090f6713 100644
  
  /**
    Toggle FIPS mode, to see whether it is available with the current SSL library.
+@@ -532,12 +534,16 @@ uint get_fips_mode() { return FIPS_mode(); }
+   @retval non-zero: FIPS is supported.
+ */
+ int test_ssl_fips_mode(char *err_string) {
++#if defined(OPENSSL_FIPS)
+   int ret = FIPS_mode_set(FIPS_mode() == 0 ? 1 : 0);
+   unsigned long err = (ret == 0) ? ERR_get_error() : 0;
+ 
+   if (err != 0) {
+     ERR_error_string_n(err, err_string, OPENSSL_ERROR_LENGTH - 1);
+   }
++#else
++  int ret = 0;
++#endif
+   return ret;
+ }
+ 
 -- 
-2.33.1
+2.34.0
 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-11-17  1:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-18 13:12 [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-connector-c/files/ Brian Evans
  -- strict thread matches above, loose matches on Subject: below --
2021-11-17  1:05 Thomas Deutschmann
2021-05-03 18:46 Sam James
2021-01-25 15:01 Aaron Bauman
2019-11-18 22:17 Aaron Bauman
2019-06-14  1:21 Brian Evans
2018-09-13 16:55 Brian Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox