Commit graph

42 commits

Author SHA1 Message Date
Oleksandr Byelkin
3a38a7a4ac New wolfssl v5.7.2-stable 2024-07-15 19:11:39 +02:00
Julius Goryavsky
b88c20ce1b Merge branch 10.4 into 10.5 2024-05-06 13:55:42 +02:00
Oleksandr Byelkin
45846bacb3 v5.7.0-stable 2024-04-26 13:02:47 +02:00
Vladislav Vaintroub
d510f80549 MDEV-33482: Optimize WolfSSL for improved performance
- Use "new" math library WOLFSSL_SP_MATH_ALL, which is now  promoted by
  WolfSSL for faster performance. "fastmath" we  used previously is going
  to be deprecated, it was not really always fast.
- Optimize common RSA math operations with WOLFSSL_HAVE_SP_RSA
- Incorporate assembly optimizations, currently for Intel x64 only

This patch significantly reduces execution time for SSL tests like
main.ssl-big and main.ssl_connect, which now run 2 to 3 times faster.

Notably, when this patch is applied to 11.4, server startup in with
ephemeral certificates becomes approximately 10x faster due to optimized
wolfSSL_EVP_PKEY_keygen().

Additionally, refactored WolfSSL by removing old workarounds and
consolidating wolfssl and wolfcrypt into a single library wolfssl, just
like it was done in WolfSSL's own CMake.
2024-02-18 01:10:41 +01:00
Oleksandr Byelkin
a0f2ff8832 Return back wolfssl v5.6.6 and new CC changed by 6b2cd78695 2024-02-12 12:43:08 +01:00
Dmitry Shulga
6b2cd78695 MDEV-15703: Crash in EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)' USING DEFAULT, UBSAN runtime error: member call on null pointer of type 'struct TABLE_LIST' in Item_param::save_in_field
This is the prerequisite patch to refactor the method
  Item_default_value::fix_fields.
The former implementation of this method was extracted and placed
into the standalone function make_default_field() and the method
Item_default_value::tie_field(). The motivation for this modification
is upcoming changes for core implementation of the task MDEV-15703
since these functions will be used from several places within
the source code.
2024-02-08 09:21:42 +01:00
Oleksandr Byelkin
8e337e016f new WolfSSL v5.6.6-stable 2024-01-17 10:45:05 +01:00
Sergei Golubchik
28f7725731 wolfssl: enable chacha cyphers and secure negotiation
compaitibility with:
* chacha - mobile devices
* secure negotiation - openssl 3
2023-09-06 22:38:41 +02:00
Oleksandr Byelkin
2a46b358a7 new WolfSSL v5.6.3-stable 2023-07-25 21:08:02 +02:00
Vladislav Vaintroub
493f2bca76 Add more workaround atop existing WolfSSL 5.5.4 workaround to compile ASAN on buildbot
The -D flag was not passed to asm compiler, despite SET_PROPERTY(COMPILE_OPTIONS)
The exact reason for that remains unknown.  It was not seen with gcc, as
nor was be reproduced on newer CMake.
2023-02-08 11:32:06 +01:00
Oleksandr Byelkin
9924466b3b v5.5.4-stable 2023-01-17 22:46:25 +01:00
Oleksandr Byelkin
0cddb1ac99 v5.5.1-stable 2022-10-14 08:33:15 +02:00
Oleksandr Byelkin
f0107c90a0 wolfssl v5.4.0-stable 2022-07-27 16:21:28 +02:00
Vladislav Vaintroub
4329720b79 Fixes for WolfSSL 5.4.0 2022-07-27 16:18:18 +02:00
Marko Mäkelä
aec856073d WolfSSL v5.2.0-stable 2022-04-21 12:02:36 +03:00
Vladislav Vaintroub
be1d965384 MDEV-27373 wolfSSL 5.1.1
- compile wolfcrypt with kdf.c, to avoid undefined symbols in tls13.c
- define WOLFSSL_HAVE_ERROR_QUEUE to avoid endless loop SSL_get_error
- Do not use SSL_CTX_set_tmp_dh/get_dh2048, this would require additional
  compilation options in WolfSSL. Disable it for WolfSSL build, it works
  without it anyway.
- fix "macro already defined" Windows warning.
2022-01-25 11:19:00 +01:00
Oleksandr Byelkin
8db47403ff WolfSSL v5.1.1 2022-01-25 11:19:00 +01:00
Oleksandr Byelkin
e10838268e wolfssl v4.8.1-stable 2021-10-28 14:23:22 +02:00
Vladislav Vaintroub
77992bc710 MDEV-26092 Remove things we do not use in wolfssl
Add a couple of NO_XXX prprocessor constants to wolfssl build.
Looked into cmake defaults, those are set there too. Some of
these are (supposedly) weak ciphers, and some just fallen out from wide
use.
2021-07-28 22:21:44 +02:00
Vladislav Vaintroub
2173f382ca MDEV-26236 ssl_8k_key test fails on x86
Workaround WolfSSL bug https://github.com/wolfSSL/wolfssl/issues/4242
(heap overflow) by using fastmath library everywhere, except Windows clang

Before the patch, default math library was used on all 32bit platforms.
2021-07-27 13:00:42 +02:00
Vladislav Vaintroub
7ffa801cf2 MDEV-22221 Compile WolfSSL with TLSv1.3 support 2021-07-21 22:19:52 +02:00
Vladislav Vaintroub
6a3e0009a6 WolfSSL 4.8.0 2021-07-21 09:16:28 +02:00
Vladislav Vaintroub
b81803f065 MDEV-22221: MariaDB with WolfSSL doesn't support AES-GCM cipher for SSL
Enable AES-GCM for SSL (only).

AES-GCM for encryption plugins remains disabled (aes-t fails, on some bug
in GCM or CTR padding)
2021-06-09 15:44:55 +02:00
Vladislav Vaintroub
dbe3161b6d Remove WolfSSL workaround for old version.
We're already on 4.4.6
2021-06-09 15:44:55 +02:00
Marko Mäkelä
734c587f68 MDEV-20386: Allow RDRAND, RDSEED WITH_MSAN
Let us use Intel intrinsic functions in WolfSSL whenever possible.
This allows such code to be compiled WITH_MSAN.
2021-01-02 11:56:41 +02:00
Marko Mäkelä
c1a7a82bca WolfSSL v4.6.0-stable 2021-01-02 11:56:41 +02:00
Marko Mäkelä
d7c82610c1 Fix the WolfSSL build on FreeBSD
Port some CMake tweaks of commit 4adc1269cc
from 10.5.
2020-09-23 09:29:05 +03:00
Vladislav Vaintroub
bfe612b738 MDEV-23663 - Add HAVE_INTEL_RDRAND flag for building WolfSSL, where appropiate 2020-09-17 18:05:53 +02:00
Sergei Golubchik
5b0df7433d WolfSSL fixes
remove Timeval workaround (not needed anymore).
add template workaround.
comments.
2020-05-08 12:49:53 +02:00
Vladislav Vaintroub
403dc759d0 Update WolfSSL
Fix WolfSSL build:

- Do not build with TLSv1.0,it stopped working,at least with SChannel client
- Disable a test that depends on TLSv1.0
- define FP_MAX_BITS always, to fix 32bit builds.
- Increase MAX_AES_CTX_SIZE, to fix build on Linux
2020-05-08 11:51:03 +02:00
Vladislav Vaintroub
98fc6b923f MDEV-20388 : disable inline assembly in WolfSSL if MSAN is on
A desperate attempt to workaround MemorySanitizer deficiencies.
2020-03-25 19:45:37 +01:00
Vladislav Vaintroub
7c0e4748ac silence a warning in WolfSSL.
There is a warning about inconsistency between function definition
and prototype.

See https://github.com/wolfSSL/wolfssl/issues/2752

Disable specific MSVC warning for now.
2020-01-21 09:20:59 +01:00
Oleksandr Byelkin
3155a643df new wolfssl v4.3.0-stable 2020-01-20 16:31:50 +01:00
Oleksandr Byelkin
903f5fea30 Revert "wolfssl 4.2.0" (it is not ready jet)
This reverts commit dacd1794e4.
2019-11-02 18:54:01 +01:00
Oleksandr Byelkin
dacd1794e4 wolfssl 4.2.0 2019-11-02 12:11:39 +01:00
Vladislav Vaintroub
1c27eb7ebd Do not compile socket IO code in WolfSSL
We use own IO callbacks from server code anyway.
2019-07-28 13:45:34 +02:00
Vladislav Vaintroub
f61a980686 Update WolfSSL, remove older workarounds. 2019-07-28 13:45:15 +02:00
Sergei Golubchik
e46b87aaed enable TLSv1.0 in WolfSSL 2019-07-02 14:27:31 +02:00
Vladislav Vaintroub
1e3dc15d62 Use generated user_settings.h for WolfSSL, as recommended by WolfSSL
documentation


Apparently, WolfSSL wants to have *exactly* the same defines for
the user of the library as the was when building library itself.

A lot of #defines have an impact on ABI (structure sizes, alignment etc)
2019-06-14 15:50:12 +02:00
Vladislav Vaintroub
4ec302ebf8 WolfSSL : Fix crosscompiling i386 on x86_64, on Linux 2019-06-14 15:49:38 +02:00
Vladislav Vaintroub
c5beac6847 MDEV-19684 enable intel assembly (AESNI etc) and fastmath when compiling WolfSSL
Using different recommended speedup options for WolfSSL.

- Enable  x64 assembly code on Intel.
- in my_crypt.cc, align EVP_CIPHER_CTX buffer, since some members need
alignment of 16 (for AESNI instructions), when assembler is enabled.
- Adjust MY_AES_CTX_SIZE
- Enable fastmath in wolfssl (large integer math).
2019-06-04 10:07:39 +02:00
Vladislav Vaintroub
5e4b657dd4 MDEV-18531 : Use WolfSSL instead of YaSSL as "bundled" SSL/encryption library
- Add new submodule for WolfSSL
- Build and use wolfssl and wolfcrypt instead of yassl/taocrypt
- Use HAVE_WOLFSSL instead of HAVE_YASSL
- Increase MY_AES_CTX_SIZE, to avoid compile time asserts in my_crypt.cc
(sizeof(EVP_CIPHER_CTX) is larger on WolfSSL)
2019-05-22 13:48:25 +02:00