diff options
author | Georg Richter <georg@mariadb.com> | 2017-03-08 17:39:47 +0100 |
---|---|---|
committer | Georg Richter <georg@mariadb.com> | 2017-03-08 17:39:47 +0100 |
commit | f88977321038cf04bed974afce953ae7a0dca2e6 (patch) | |
tree | 7c4d55904981cc63443bb5a49cac66ccfbf4c2b2 /sql-common/client.c | |
parent | 2bca41265c802dc9a3e8852bb2b3cda720a5d44a (diff) | |
download | mariadb-git-MDEV-10332.tar.gz |
Initial implementation for MDEV-10332:MDEV-10332
support for OpenSSL 1.1 and LibreSSL
tested against OpenSSL 1.0.1, 1.0.2, 1.1.0, Yassl and LibreSSL
not working on Windows with native SChannel support, due to wrong cipher mapping: Latter one requires push of CONC-241 fixes.
Please note that OpenSSL 0.9.8 and OpenSSL 1.1.0 will not work: Even if the build succeeds, test cases will fail with various errors, especially when using different tls libraries or versions for client and server.
Diffstat (limited to 'sql-common/client.c')
-rw-r--r-- | sql-common/client.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index fc76fa976e0..d4041fd60f9 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -104,6 +104,10 @@ my_bool net_flush(NET *net); #define CONNECT_TIMEOUT 0 #endif +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) || defined(HAVE_YASSL) +#define ASN1_STRING_get0_data(X) ASN1_STRING_data(X) +#endif + #include "client_settings.h" #include <sql_common.h> #include <mysql/client_plugin.h> @@ -1842,7 +1846,7 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c goto error; } - cn= (char *) ASN1_STRING_data(cn_asn1); + cn= (char *) ASN1_STRING_get0_data(cn_asn1); if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn)) { |