diff options
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 76dca42e14c..2aba1f99f33 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> @@ -1843,7 +1847,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)) { |