Skip to content

Commit 78e482e

Browse files
author
Bogdan Degtyariov
committed
WL 13162 Support OpenSSL 1.1
1 parent 19497ed commit 78e482e

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

cdk/cmake/DepFindSSL.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ function(find_openssl)
226226

227227

228228
find_library(OPENSSL_LIBRARY
229-
NAMES ssl ssleay32 ssleay32MD
229+
NAMES ssl ssleay32 ssleay32MD libssl
230230
PATH_SUFFIXES lib
231231
${hints}
232232
)
233233

234234
find_library(CRYPTO_LIBRARY
235-
NAMES crypto libeay32 libeay32MD
235+
NAMES crypto libeay32 libeay32MD libcrypto
236236
PATH_SUFFIXES lib
237237
${hints}
238238
)

cdk/foundation/connection_openssl.cc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,24 @@ POP_SYS_WARNINGS_CDK
5555
#include "connection_tcpip_base.h"
5656

5757

58+
/*
59+
On Windows, external dependencies can be declared using
60+
#pragma comment directive.
61+
*/
62+
63+
#ifdef _WIN32
64+
#pragma comment(lib,"ws2_32")
65+
#if defined(WITH_SSL) && !defined(WITH_SSL_WOLFSSL)
66+
#if OPENSSL_VERSION_NUMBER < 0x10100000L
67+
#pragma comment(lib,"ssleay32")
68+
#pragma comment(lib,"libeay32")
69+
#else
70+
#pragma comment(lib,"libssl")
71+
#pragma comment(lib,"libcrypto")
72+
#endif
73+
#endif
74+
#endif
75+
5876
#ifdef WITH_SSL_WOLFSSL
5977
static const char* tls_ciphers_list="RC4-SHA:RC4-MD5:DES-CBC3-SHA:AES128-SHA:AES256-SHA:"
6078
"NULL-SHA:NULL-SHA256:"

cdk/include/mysql/cdk.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,6 @@
3838
#include "cdk/cursor.h"
3939
#include "cdk/codec.h"
4040

41-
/*
42-
On Windows, external dependencies can be declared using
43-
#pragma comment directive.
44-
*/
45-
46-
#ifdef _WIN32
47-
#pragma comment(lib,"ws2_32")
48-
#if defined(WITH_SSL) && !defined(WITH_SSL_WOLFSSL)
49-
#pragma comment(lib,"ssleay32")
50-
#pragma comment(lib,"libeay32")
51-
#endif
52-
#endif
53-
54-
5541
namespace cdk {
5642

5743
typedef Cursor::Row_processor Row_processor;

0 commit comments

Comments
 (0)