From 1b40e54188ad371427cc5d7ceffc9ac21ae1eb00 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 8 Feb 2024 10:20:39 -0500 Subject: [PATCH] fix: mysql 8.3 ssl settings --- ext/mysql2/client.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/mysql2/client.c b/ext/mysql2/client.c index 74f56549..5a2fcc1b 100644 --- a/ext/mysql2/client.c +++ b/ext/mysql2/client.c @@ -1444,19 +1444,19 @@ static VALUE set_ssl_options(VALUE self, VALUE key, VALUE cert, VALUE ca, VALUE NIL_P(cipher) ? NULL : StringValueCStr(cipher)); #else /* mysql 8.3 does not provide mysql_ssl_set */ - if (NIL_P(key)) { + if (!NIL_P(key)) { mysql_options(wrapper->client, MYSQL_OPT_SSL_KEY, StringValueCStr(key)); } - if (NIL_P(cert)) { + if (!NIL_P(cert)) { mysql_options(wrapper->client, MYSQL_OPT_SSL_CERT, StringValueCStr(cert)); } - if (NIL_P(ca)) { + if (!NIL_P(ca)) { mysql_options(wrapper->client, MYSQL_OPT_SSL_CA, StringValueCStr(ca)); } - if (NIL_P(capath)) { + if (!NIL_P(capath)) { mysql_options(wrapper->client, MYSQL_OPT_SSL_CAPATH, StringValueCStr(capath)); } - if (NIL_P(cipher)) { + if (!NIL_P(cipher)) { mysql_options(wrapper->client, MYSQL_OPT_SSL_CIPHER, StringValueCStr(cipher)); } #endif