1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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
This commit is contained in:
msvensson@pilot.blaudden
2007-03-27 19:26:01 +02:00
parent 74b3cdb02e
commit ad649e3c2c
2 changed files with 4 additions and 6 deletions

View File

@ -3022,7 +3022,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg)
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;