-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup: unify client's setting of ssl options
- Loading branch information
Showing
10 changed files
with
37 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,22 @@ SSL_STATIC char *opt_ssl_crlpath = 0; | |
SSL_STATIC char *opt_tls_version = 0; | ||
#ifdef MYSQL_CLIENT | ||
SSL_STATIC my_bool opt_ssl_verify_server_cert= 0; | ||
|
||
#define SET_SSL_OPTS(M) \ | ||
do { \ | ||
if (opt_use_ssl) \ | ||
{ \ | ||
mysql_ssl_set((M), opt_ssl_key, opt_ssl_cert, opt_ssl_ca, \ | ||
opt_ssl_capath, opt_ssl_cipher); \ | ||
mysql_options((M), MYSQL_OPT_SSL_CRL, opt_ssl_crl); \ | ||
mysql_options((M), MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath); \ | ||
mysql_options((M), MARIADB_OPT_TLS_VERSION, opt_tls_version); \ | ||
} \ | ||
mysql_options((M),MYSQL_OPT_SSL_VERIFY_SERVER_CERT, \ | ||
&opt_ssl_verify_server_cert); \ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dlenski
Contributor
|
||
} while(0) | ||
#endif | ||
#else | ||
#define SET_SSL_OPTS(M) do { } while(0) | ||
#endif | ||
#endif /* SSLOPT_VARS_INCLUDED */ |
mysqltest.cc
changes, breaks every single MTR that tries to useNOSSL
, because both theUSE_SSL_FORBIDDEN
andUSE_SSL_REQUIRED
cases will follow the same branch of thisif
statement.