@@ -168,6 +168,9 @@ static STATUS status;
168
168
static ulong select_limit,max_join_size,opt_connect_timeout=0;
169
169
static char mysql_charsets_dir[FN_REFLEN+1];
170
170
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
171
+ #if !defined(HAVE_YASSL)
172
+ static char *opt_server_public_key= 0;
173
+ #endif
171
174
static const char *xmlmeta[] = {
172
175
"&", "&",
173
176
"<", "<",
@@ -195,7 +198,6 @@ static char *shared_memory_base_name=0;
195
198
static uint opt_protocol=0;
196
199
static const CHARSET_INFO *charset_info= &my_charset_latin1;
197
200
198
- #include "caching_sha2_passwordopt-vars.h"
199
201
#include "sslopt-vars.h"
200
202
201
203
const char *default_dbug_option="d:t:o,/tmp/mysql.trace";
@@ -1811,7 +1813,6 @@ static struct my_option my_long_options[] =
1811
1813
&opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR_ALLOC,
1812
1814
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1813
1815
#include "sslopt-longopts.h"
1814
- #include "caching_sha2_passwordopt-longopts.h"
1815
1816
{"table", 't', "Output in table format.", &output_tables,
1816
1817
&output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1817
1818
{"tee", OPT_TEE,
@@ -1879,6 +1880,12 @@ static struct my_option my_long_options[] =
1879
1880
"piped to mysql or loaded using the 'source' command). This is necessary "
1880
1881
"when processing output from mysqlbinlog that may contain blobs.",
1881
1882
&opt_binary_mode, &opt_binary_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1883
+ #if !defined(HAVE_YASSL)
1884
+ {"server-public-key-path", OPT_SERVER_PUBLIC_KEY,
1885
+ "File path to the server public RSA key in PEM format.",
1886
+ &opt_server_public_key, &opt_server_public_key, 0,
1887
+ GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1888
+ #endif
1882
1889
{"connect-expired-password", 0,
1883
1890
"Notify the server that this client is prepared to handle expired "
1884
1891
"password sandbox mode.",
@@ -5153,8 +5160,10 @@ init_connection_options(MYSQL *mysql)
5153
5160
if (opt_default_auth && *opt_default_auth)
5154
5161
mysql_options(mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
5155
5162
5156
- set_server_public_key(mysql);
5157
- set_get_server_public_key_option(mysql);
5163
+ #if !defined(HAVE_YASSL)
5164
+ if (opt_server_public_key && *opt_server_public_key)
5165
+ mysql_options(mysql, MYSQL_SERVER_PUBLIC_KEY, opt_server_public_key);
5166
+ #endif
5158
5167
5159
5168
if (using_opt_enable_cleartext_plugin)
5160
5169
mysql_options(mysql, MYSQL_ENABLE_CLEARTEXT_PLUGIN,
0 commit comments