Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: presence of sessionCtxSz in structures controlled by different variables -> compilation errors #7134

Open
sanja-byelkin opened this issue Jan 17, 2024 · 1 comment
Assignees
Labels

Comments

@sanja-byelkin
Copy link

Contact Details

sanja@mariadb.com

Version

5.6.6

Description

10.4/extra/wolfssl/wolfssl/src/internal.c:36597:31: error: ‘WOLFSSL’ has no member named ‘sessionCtxSz’
36597 |         it->sessionCtxSz = ssl->sessionCtxSz;
      |                               ^~

above happened because one controlled by OPENSSL_EXTRA only, the other by WOLFSSL_SESSION_ID_CTX only and OPENSSL_EXTRA can be defined without WOLFSSL_SESSION_ID_CTX.

Reproduction steps

take Mariadb version 10.4.32, change wolfssl to 5.6.6 , compile as
cmake ./ -GNinja -DCMAKE_BUILD_TYPE=Debug -DWITH_VALGRIND=OFF -DWITH_ASAN:BOOL=OFF -DWITH_UBSAN:BOOL=OFF -DWITH_MSAN:BOOL=OFF -DWITH_EMBEDDED_SERVER:BOOL=OFF -DPLUGIN_MROONGA=NO -DPLUGIN_ROCKSDB=NO -DPLUGIN_S3=NO -DPLUGIN_COLUMNSTORE=NO -DPLUGIN_SPIDER=YES -DPLUGIN_CONNECT=NO -DPLUGIN_XPAND=NO -DPLUGIN_TOKUDB=YES -DMAX_INDEXES=64 -DSECURITY_HARDENED=OFF -DWITH_PCRE=bundled -DWITH_SSL=bundled -DWITH_PROTECT_STATEMENT_MEMROOT:BOOL=OFF -DWITH_SAFEMALLOC=OFF -DWITH_PROTECT_STATEMENT_MEMROOT:BOOL=OFF && ninja

workaround:

diff --git a/extra/wolfssl/user_settings.h.in b/extra/wolfssl/user_settings.h.in
index 425f6f154b9f..baa64fcdfbe3 100644
--- a/extra/wolfssl/user_settings.h.in
+++ b/extra/wolfssl/user_settings.h.in
@@ -28,6 +28,11 @@
 #define NO_OLD_TIMEVAL_NAME
 #define HAVE_SECURE_RENEGOTIATION
 #define HAVE_EXTENDED_MASTER
+/*
+  Following is workaround about a WolfSSL 5.6.6 bug.
+  The bug is about undefined sessionCtxSz during compilation.
+*/
+#define WOLFSSL_SESSION_ID_CTX
 
 /* TLSv1.3 definitions (all needed to build) */
 #define WOLFSSL_TLS13

Relevant log output

No response

@anhu anhu assigned lealem47 and unassigned anhu Jan 17, 2024
@lealem47
Copy link
Contributor

Hi @sanja-byelkin,

Thanks for the detailed report. WOLFSSL_SESSION_ID_CTX should always be defined internally when OPENSSL_EXTRA is defined (see below)

#define WOLFSSL_SESSION_ID_CTX

One way I could see this happening is if you have both OPENSSL_EXTRA and OPENSSL_COEXIST defined, and this is not something we support. Do you have both of these macros defined?

Thanks,
Lealem @ wolfSSL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants