Skip to content

Commit 3a608ec

Browse files
committed
WL#13290: remove wolfssl build support
RB#22348
1 parent 3afb974 commit 3a608ec

File tree

100 files changed

+92
-4633
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+92
-4633
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ TAGS_sorted_by_file
99
# googletest files
1010
source_downloads
1111

12-
# added so we can build with wolfSSL
13-
extra/wolfssl-*
14-
1512
# Vim swap files
1613
[._]*.s[a-v][a-z]
1714
[._]*.sw[a-p]

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ MYSQL_CHECK_ZLIB_WITH_COMPRESS()
11161116
IF(BUILD_BUNDLED_ZLIB)
11171117
INCLUDE_DIRECTORIES(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/extra/zlib ${CMAKE_CURRENT_BINARY_DIR}/extra/zlib)
11181118
ENDIF()
1119-
# Add bundled wolfssl/wolfcrypt or system openssl.
1119+
# Add system openssl.
11201120
MYSQL_CHECK_SSL()
11211121
MYSQL_CHECK_SSL_DLLS()
11221122

Docs/README.build

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
1+
Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
22

33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License, version 2.0,
@@ -67,10 +67,6 @@ For Mac users, please see
6767
You may also build OpenSSL yourself, and do
6868
cmake -DWITH_SSL=</path/to/custom/openssl>
6969
in order to build MySQL.
70-
71-
Finally, there is an option to use wolfSSL,
72-
see extra/README-wolfssl.txt on how to set this up.
73-
7470
===
7571

7672
It is possible to compile with Clang on Windows, which compiles faster

cmake/libutils.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,7 @@ MACRO(MERGE_CONVENIENCE_LIBRARIES)
353353

354354
# On Windows, ssleay32.lib/libeay32.lib or libssl.lib/libcrypto.lib
355355
# must be merged into mysqlclient.lib
356-
IF(WIN32 AND ${TARGET} STREQUAL "mysqlclient"
357-
AND NOT WITH_SSL STREQUAL "wolfssl")
356+
IF(WIN32 AND ${TARGET} STREQUAL "mysqlclient")
358357
SET(LINKER_EXTRA_FLAGS "")
359358
FOREACH(LIB ${SSL_LIBRARIES})
360359
STRING_APPEND(LINKER_EXTRA_FLAGS " ${LIB}")

cmake/ssl.cmake

Lines changed: 2 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
# - cmake -DCMAKE_PREFIX_PATH=</path/to/custom/openssl> -DWITH_SSL="system"
2727
# or
2828
# - cmake -DWITH_SSL=</path/to/custom/openssl>
29-
# - "wolfssl" uses wolfssl source code in <source dir>/extra/wolfssl-<version>
3029
#
3130
# The default value for WITH_SSL is "system"
3231
# set in cmake/build_configurations/feature_set.cmake
@@ -51,8 +50,6 @@ SET(WITH_SSL_DOC
5150
"${WITH_SSL_DOC}, \nyes (synonym for system)")
5251
SET(WITH_SSL_DOC
5352
"${WITH_SSL_DOC}, \n</path/to/custom/openssl/installation>")
54-
SET(WITH_SSL_DOC
55-
"${WITH_SSL_DOC}, \nwolfssl (use wolfSSL. See extra/README-wolfssl.txt on how to set this up)")
5653

5754
STRING(REPLACE "\n" "| " WITH_SSL_DOC_STRING "${WITH_SSL_DOC}")
5855
MACRO (CHANGE_SSL_SETTINGS string)
@@ -78,58 +75,6 @@ MACRO(FATAL_SSL_NOT_FOUND_ERROR string)
7875
ENDIF()
7976
ENDMACRO()
8077

81-
MACRO (MYSQL_USE_WOLFSSL)
82-
SET(WOLFSSL_VERSION "3.14.0")
83-
SET(WOLFSSL_SOURCE_DIR "${CMAKE_SOURCE_DIR}/extra/wolfssl-${WOLFSSL_VERSION}")
84-
MESSAGE(STATUS "WOLFSSL_SOURCE_DIR = ${WOLFSSL_SOURCE_DIR}")
85-
86-
SET(INC_DIRS
87-
${CMAKE_SOURCE_DIR}/include
88-
${WOLFSSL_SOURCE_DIR}
89-
${WOLFSSL_SOURCE_DIR}/wolfssl
90-
${WOLFSSL_SOURCE_DIR}/wolfssl/wolfcrypt
91-
)
92-
SET(SSL_LIBRARIES wolfssl wolfcrypt)
93-
IF(SOLARIS)
94-
SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBSOCKET})
95-
ENDIF()
96-
INCLUDE_DIRECTORIES(BEFORE SYSTEM ${INC_DIRS})
97-
SET(SSL_INTERNAL_INCLUDE_DIRS ${WOLFSSL_SOURCE_DIR})
98-
ADD_DEFINITIONS(
99-
-DBUILDING_WOLFSSL
100-
-DHAVE_ECC
101-
-DHAVE_HASHDRBG
102-
-DHAVE_WOLFSSL
103-
-DKEEP_OUR_CERT
104-
-DMULTI_THREADED
105-
-DOPENSSL_EXTRA
106-
-DSESSION_CERT
107-
-DWC_NO_HARDEN
108-
-DWOLFSSL_AES_COUNTER
109-
-DWOLFSSL_AES_DIRECT
110-
-DWOLFSSL_ALLOW_TLSV10
111-
-DWOLFSSL_CERT_EXT
112-
-DWOLFSSL_MYSQL_COMPATIBLE
113-
-DWOLFSSL_SHA224
114-
-DWOLFSSL_SHA384
115-
-DWOLFSSL_SHA512
116-
-DWOLFSSL_STATIC_RSA
117-
-DWOLFSSL_CERT_GEN
118-
)
119-
CHANGE_SSL_SETTINGS("wolfssl")
120-
ADD_SUBDIRECTORY(${WOLFSSL_SOURCE_DIR})
121-
ADD_SUBDIRECTORY(${WOLFSSL_SOURCE_DIR}/wolfcrypt)
122-
GET_TARGET_PROPERTY(src wolfssl SOURCES)
123-
FOREACH(file ${src})
124-
SET(SSL_SOURCES ${SSL_SOURCES} ${WOLFSSL_SOURCE_DIR}/${file})
125-
ENDFOREACH()
126-
GET_TARGET_PROPERTY(src wolfcrypt SOURCES)
127-
FOREACH(file ${src})
128-
SET(SSL_SOURCES ${SSL_SOURCES}
129-
${WOLFSSL_SOURCE_DIR}/wolfcrypt/${file})
130-
ENDFOREACH()
131-
ENDMACRO()
132-
13378
MACRO(RESET_SSL_VARIABLES)
13479
UNSET(WITH_SSL_PATH)
13580
UNSET(WITH_SSL_PATH CACHE)
@@ -150,21 +95,13 @@ ENDMACRO()
15095
# MYSQL_CHECK_SSL
15196
#
15297
# Provides the following configure options:
153-
# WITH_SSL=[yes|wolfssl|system|<path/to/custom/installation>]
98+
# WITH_SSL=[yes|system|<path/to/custom/installation>]
15499
MACRO (MYSQL_CHECK_SSL)
155100

156101
IF(NOT WITH_SSL)
157102
CHANGE_SSL_SETTINGS("system")
158103
ENDIF()
159104

160-
IF(WITH_SSL STREQUAL "bundled")
161-
MESSAGE(WARNING
162-
"bundled SSL (YaSSL) is no longer supported, changed to system"
163-
)
164-
RESET_SSL_VARIABLES()
165-
CHANGE_SSL_SETTINGS("system")
166-
ENDIF()
167-
168105
# See if WITH_SSL is of the form </path/to/custom/installation>
169106
FILE(GLOB WITH_SSL_HEADER ${WITH_SSL}/include/openssl/ssl.h)
170107
IF (WITH_SSL_HEADER)
@@ -173,34 +110,7 @@ MACRO (MYSQL_CHECK_SSL)
173110
SET(WITH_SSL_PATH ${WITH_SSL})
174111
ENDIF()
175112

176-
IF(WITH_SSL STREQUAL "wolfssl")
177-
MYSQL_USE_WOLFSSL()
178-
# Reset some variables, in case we switch from /path/to/ssl to "wolfssl".
179-
IF (WITH_SSL_PATH)
180-
UNSET(WITH_SSL_PATH)
181-
UNSET(WITH_SSL_PATH CACHE)
182-
ENDIF()
183-
IF (OPENSSL_ROOT_DIR)
184-
UNSET(OPENSSL_ROOT_DIR)
185-
UNSET(OPENSSL_ROOT_DIR CACHE)
186-
ENDIF()
187-
IF (OPENSSL_INCLUDE_DIR)
188-
UNSET(OPENSSL_INCLUDE_DIR)
189-
UNSET(OPENSSL_INCLUDE_DIR CACHE)
190-
ENDIF()
191-
IF (WIN32 AND OPENSSL_APPLINK_C)
192-
UNSET(OPENSSL_APPLINK_C)
193-
UNSET(OPENSSL_APPLINK_C CACHE)
194-
ENDIF()
195-
IF (OPENSSL_LIBRARY)
196-
UNSET(OPENSSL_LIBRARY)
197-
UNSET(OPENSSL_LIBRARY CACHE)
198-
ENDIF()
199-
IF (CRYPTO_LIBRARY)
200-
UNSET(CRYPTO_LIBRARY)
201-
UNSET(CRYPTO_LIBRARY CACHE)
202-
ENDIF()
203-
ELSEIF(WITH_SSL STREQUAL "system" OR
113+
IF(WITH_SSL STREQUAL "system" OR
204114
WITH_SSL STREQUAL "yes" OR
205115
WITH_SSL_PATH
206116
)

extra/README-wolfssl.txt

Lines changed: 0 additions & 35 deletions
This file was deleted.

extra/libevent/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,6 @@ option(EVENT__DISABLE_THREAD_SUPPORT
128128
option(EVENT__DISABLE_OPENSSL
129129
"Define if libevent should build without support for OpenSSL encrpytion" OFF)
130130

131-
IF(WITH_SSL STREQUAL "wolfssl")
132-
MESSAGE(STATUS "This version of libevent does not support the wolfssl SSL library")
133-
SET(EVENT__DISABLE_OPENSSL ON CACHE INTERNAL "" FORCE)
134-
SET(EVENT__DISABLE_OPENSSL 1)
135-
ENDIF()
136-
137131
option(EVENT__DISABLE_BENCHMARK
138132
"Defines if libevent should build without the benchmark exectuables" ON)
139133

include/my_aes.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef MY_AES_INCLUDED
22
#define MY_AES_INCLUDED
33

4-
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
4+
/* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
55
66
This program is free software; you can redistribute it and/or modify
77
it under the terms of the GNU General Public License, version 2.0,
@@ -44,9 +44,7 @@ enum my_aes_opmode {
4444
my_aes_256_ecb,
4545
my_aes_128_cbc,
4646
my_aes_192_cbc,
47-
my_aes_256_cbc
48-
#ifndef HAVE_WOLFSSL
49-
,
47+
my_aes_256_cbc,
5048
my_aes_128_cfb1,
5149
my_aes_192_cfb1,
5250
my_aes_256_cfb1,
@@ -59,15 +57,10 @@ enum my_aes_opmode {
5957
my_aes_128_ofb,
6058
my_aes_192_ofb,
6159
my_aes_256_ofb
62-
#endif
6360
};
6461

6562
#define MY_AES_BEGIN my_aes_128_ecb
66-
#ifdef HAVE_WOLFSSL
67-
#define MY_AES_END my_aes_256_cbc
68-
#else
6963
#define MY_AES_END my_aes_256_ofb
70-
#endif
7164

7265
/* If bad data discovered during decoding */
7366
#define MY_AES_BAD_DATA -1

include/my_rnd.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define MY_RANDOM_INCLUDED
33

44
/*
5-
Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
5+
Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
66
77
This program is free software; you can redistribute it and/or modify
88
it under the terms of the GNU General Public License, version 2.0,
@@ -26,7 +26,7 @@
2626

2727
/**
2828
@file include/my_rnd.h
29-
A wrapper to use OpenSSL/wolfSSL PRNGs.
29+
A wrapper to use OpenSSL PRNGs.
3030
*/
3131

3232
#include <stddef.h>

include/mysql/service_ssl_wrapper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
#include "my_compiler.h"
2727
#include "violite.h"
2828

29-
namespace ssl_wrappe_service {
29+
namespace ssl_wrapper_service {
3030

3131
int MY_ATTRIBUTE((visibility("default")))
3232
dummy_function_to_ensure_we_are_linked_into_the_server();
3333

34-
} // namespace ssl_wrappe_service
34+
} // namespace ssl_wrapper_service
3535

3636
/**
3737
Return version of SSL used in currect connection

0 commit comments

Comments
 (0)