Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-03-27 19:26:01+02:00, msvensson@stripped +2 -0
Bug#24121 Incorrect test for SSL_VERIFY_SERVER_CERT
- Interpret the pointer passed to 'mysql_options' for
MYSQL_OPT_SSL_VERIFY_SERVER_CERT as a my_bool
- In 5.1 the mysql_options signature will be chanegd to take
a 'void*' in order to further emphasize the need for a pointer
to correct type
client/mysqltest.c@stripped, 2007-03-27 19:25:59+02:00, msvensson@stripped +3 -5
Turn on ssl_verify_server_cert for all connections to "localhost"
in mysqltest
sql-common/client.c@stripped, 2007-03-27 19:26:00+02:00, msvensson@stripped +1 -1
The pointer passed to 'mysql_options' for MYSQL_OPT_SSL_VERIFY_SERVER_CERT
should be interpreted as a my_bool pointer (aka char*).
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: pilot.blaudden
# Root: /home/msvensson/mysql/bug24121/my50-bug24121
--- 1.110/sql-common/client.c 2007-02-21 12:05:04 +01:00
+++ 1.111/sql-common/client.c 2007-03-27 19:26:00 +02:00
@@ -3022,7 +3022,7 @@ mysql_options(MYSQL *mysql,enum mysql_op
mysql->reconnect= *(my_bool *) arg;
break;
case MYSQL_OPT_SSL_VERIFY_SERVER_CERT:
- if (!arg || test(*(uint*) arg))
+ if (*(my_bool*) arg)
mysql->options.client_flag|= CLIENT_SSL_VERIFY_SERVER_CERT;
else
mysql->options.client_flag&= ~CLIENT_SSL_VERIFY_SERVER_CERT;
--- 1.282/client/mysqltest.c 2007-03-20 21:24:16 +01:00
+++ 1.283/client/mysqltest.c 2007-03-27 19:25:59 +02:00
@@ -3534,7 +3534,7 @@ void do_connect(struct st_command *comma
opt_ssl_capath, opt_ssl_cipher);
#if MYSQL_VERSION_ID >= 50000
/* Turn on ssl_verify_server_cert only if host is "localhost" */
- opt_ssl_verify_server_cert= !strcmp(ds_connection_name.str, "localhost");
+ opt_ssl_verify_server_cert= !strcmp(ds_host.str, "localhost");
mysql_options(&next_con->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
&opt_ssl_verify_server_cert);
#endif
@@ -6002,15 +6002,13 @@ int main(int argc, char **argv)
#ifdef HAVE_OPENSSL
-#if MYSQL_VERSION_ID >= 50000
- opt_ssl_verify_server_cert= TRUE; /* Always on in mysqltest */
-#endif
-
if (opt_use_ssl)
{
mysql_ssl_set(&cur_con->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath, opt_ssl_cipher);
#if MYSQL_VERSION_ID >= 50000
+ /* Turn on ssl_verify_server_cert only if host is "localhost" */
+ opt_ssl_verify_server_cert= opt_host && !strcmp(opt_host, "localhost");
mysql_options(&cur_con->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
&opt_ssl_verify_server_cert);
#endif
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2415) BUG#24121 | msvensson | 27 Mar |