-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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)
- Loading branch information
Showing
33 changed files
with
263 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
SET(WOLFSSL_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/src) | ||
ADD_DEFINITIONS(${SSL_DEFINES}) | ||
ADD_DEFINITIONS( | ||
-DHAVE_CRL | ||
-DWOLFSSL_MYSQL_COMPATIBLE | ||
-DHAVE_ECC | ||
-DECC_TIMING_RESISTANT | ||
-DBUILDING_WOLFSSL | ||
-DHAVE_HASHDRBG | ||
-DWOLFSSL_AES_DIRECT | ||
-DWOLFSSL_SHA384 | ||
-DWOLFSSL_SHA512 | ||
-DWOLFSSL_SHA224 | ||
-DSESSION_CERT | ||
-DKEEP_OUR_CERT | ||
-DWOLFSSL_STATIC_RSA | ||
-DWC_RSA_BLINDING | ||
-DHAVE_TLS_EXTENSIONS | ||
-DHAVE_AES_ECB | ||
-DWOLFSSL_AES_COUNTER | ||
-DNO_WOLFSSL_STUB) | ||
|
||
SET(WOLFSSL_SOURCES | ||
${WOLFSSL_SRCDIR}/crl.c | ||
${WOLFSSL_SRCDIR}/internal.c | ||
${WOLFSSL_SRCDIR}/keys.c | ||
${WOLFSSL_SRCDIR}/tls.c | ||
${WOLFSSL_SRCDIR}/wolfio.c | ||
${WOLFSSL_SRCDIR}/ocsp.c | ||
${WOLFSSL_SRCDIR}/ssl.c) | ||
ADD_DEFINITIONS(-DWOLFSSL_LIB) | ||
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl) | ||
IF(MSVC) | ||
# size_t to long truncation warning | ||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd4267") | ||
IF(CMAKE_C_COMPILER_ID MATCHES Clang) | ||
# Workaround a bug with clang-cl, see https://github.com/wolfSSL/wolfssl/pull/2090 | ||
ADD_DEFINITIONS(-DMP_16BIT) | ||
ENDIF() | ||
ENDIF() | ||
|
||
ADD_CONVENIENCE_LIBRARY(wolfssl ${WOLFSSL_SOURCES}) | ||
|
||
# Workaround linker crash with older Ubuntu binutils | ||
# e.g aborting at ../../bfd/merge.c line 873 in _bfd_merged_section_offset | ||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux") | ||
STRING(REPLACE "-g " "-g1 " CMAKE_C_FLAGS_RELWITHDEBINFO | ||
${CMAKE_C_FLAGS_RELWITHDEBINFO}) | ||
STRING(REPLACE "-g " "-g1 " CMAKE_C_FLAGS_DEBUG | ||
${CMAKE_C_FLAGS_DEBUG}) | ||
STRING(REPLACE "-ggdb3 " " " CMAKE_C_FLAGS_RELWITHDEBINFO | ||
${CMAKE_C_FLAGS_RELWITHDEBINFO}) | ||
STRING(REPLACE "-ggdb3 " " " CMAKE_C_FLAGS_DEBUG | ||
${CMAKE_C_FLAGS_DEBUG}) | ||
ENDIF() | ||
|
||
SET(WOLFCRYPT_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/wolfcrypt/src) | ||
SET(WOLFCRYPT_SOURCES | ||
${WOLFCRYPT_SRCDIR}/aes.c | ||
${WOLFCRYPT_SRCDIR}/arc4.c | ||
${WOLFCRYPT_SRCDIR}/asn.c | ||
${WOLFCRYPT_SRCDIR}/coding.c | ||
${WOLFCRYPT_SRCDIR}/des3.c | ||
${WOLFCRYPT_SRCDIR}/dh.c | ||
${WOLFCRYPT_SRCDIR}/dsa.c | ||
${WOLFCRYPT_SRCDIR}/ecc.c | ||
${WOLFCRYPT_SRCDIR}/error.c | ||
${WOLFCRYPT_SRCDIR}/hmac.c | ||
${WOLFCRYPT_SRCDIR}/integer.c | ||
${WOLFCRYPT_SRCDIR}/logging.c | ||
${WOLFCRYPT_SRCDIR}/md4.c | ||
${WOLFCRYPT_SRCDIR}/md5.c | ||
${WOLFCRYPT_SRCDIR}/memory.c | ||
${WOLFCRYPT_SRCDIR}/pkcs12.c | ||
${WOLFCRYPT_SRCDIR}/pwdbased.c | ||
${WOLFCRYPT_SRCDIR}/rabbit.c | ||
${WOLFCRYPT_SRCDIR}/random.c | ||
${WOLFCRYPT_SRCDIR}/rsa.c | ||
${WOLFCRYPT_SRCDIR}/sha.c | ||
${WOLFCRYPT_SRCDIR}/sha256.c | ||
${WOLFCRYPT_SRCDIR}/sha512.c | ||
${WOLFCRYPT_SRCDIR}/wc_port.c | ||
${WOLFCRYPT_SRCDIR}/wc_encrypt.c | ||
${WOLFCRYPT_SRCDIR}/hash.c | ||
${WOLFCRYPT_SRCDIR}/wolfmath.c | ||
) | ||
|
||
ADD_CONVENIENCE_LIBRARY(wolfcrypt ${WOLFCRYPT_SOURCES}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.