Skip to content

Commit

Permalink
Merge pull request #1353 from flavorjones/flavorjones-fix-mysql-83-ssl
Browse files Browse the repository at this point in the history
fix: mysql 8.3 ssl settings
  • Loading branch information
tenderlove authored Feb 8, 2024
2 parents 42ac528 + 1b40e54 commit 8c0a8f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ext/mysql2/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8c0a8f8

Please sign in to comment.