@@ -1359,45 +1359,40 @@ static void mysql_once_init()
1359
1359
#endif
1360
1360
}
1361
1361
1362
- #ifdef HAVE_OPENSSL
1363
1362
/**************************************************************************
1364
1363
** Fill in SSL part of MYSQL structure and set 'use_ssl' flag.
1365
1364
** NB! Errors are not reported until you do mysql_real_connect.
1366
1365
**************************************************************************/
1367
1366
1368
1367
int STDCALL
1369
- mysql_ssl_set (MYSQL * mysql , const char * key , const char * cert ,
1370
- const char * ca , const char * capath )
1368
+ mysql_ssl_set (MYSQL * mysql __attribute__((unused )) ,
1369
+ const char * key __attribute__((unused )),
1370
+ const char * cert __attribute__((unused )),
1371
+ const char * ca __attribute__((unused )),
1372
+ const char * capath __attribute__((unused )))
1371
1373
{
1374
+ #ifdef HAVE_OPENSSL
1372
1375
mysql -> options .ssl_key = key == 0 ? 0 : my_strdup (key ,MYF (0 ));
1373
1376
mysql -> options .ssl_cert = cert == 0 ? 0 : my_strdup (cert ,MYF (0 ));
1374
1377
mysql -> options .ssl_ca = ca == 0 ? 0 : my_strdup (ca ,MYF (0 ));
1375
1378
mysql -> options .ssl_capath = capath == 0 ? 0 : my_strdup (capath ,MYF (0 ));
1376
1379
mysql -> options .use_ssl = TRUE;
1377
1380
mysql -> connector_fd = (gptr )new_VioSSLConnectorFd (key , cert , ca , capath );
1378
1381
DBUG_PRINT ("info" ,("mysql_ssl_set, context: %p" ,((struct st_VioSSLConnectorFd * )(mysql -> connector_fd ))-> ssl_context_ ));
1379
-
1382
+ #endif
1380
1383
return 0 ;
1381
1384
}
1382
1385
1383
- /**************************************************************************
1384
- **************************************************************************
1385
-
1386
- char * STDCALL
1387
- mysql_ssl_cipher(MYSQL *mysql)
1388
- {
1389
- return (char *)mysql->net.vio->cipher_description();
1390
- }
1391
-
1392
-
1393
- **************************************************************************
1386
+ /*
1387
+ ***************************************************************************
1394
1388
** Free strings in the SSL structure and clear 'use_ssl' flag.
1395
1389
** NB! Errors are not reported until you do mysql_real_connect.
1396
1390
**************************************************************************
1397
1391
*/
1398
1392
int STDCALL
1399
- mysql_ssl_clear (MYSQL * mysql )
1393
+ mysql_ssl_clear (MYSQL * mysql __attribute__(( unused )) )
1400
1394
{
1395
+ #ifdef HAVE_OPENSSL
1401
1396
my_free (mysql -> options .ssl_key , MYF (MY_ALLOW_ZERO_PTR ));
1402
1397
my_free (mysql -> options .ssl_cert , MYF (MY_ALLOW_ZERO_PTR ));
1403
1398
my_free (mysql -> options .ssl_ca , MYF (MY_ALLOW_ZERO_PTR ));
@@ -1409,9 +1404,9 @@ mysql_ssl_clear(MYSQL *mysql)
1409
1404
mysql -> options .use_ssl = FALSE;
1410
1405
my_free (mysql -> connector_fd ,MYF (MY_ALLOW_ZERO_PTR ));
1411
1406
mysql -> connector_fd = 0 ;
1407
+ #endif /* HAVE_OPENSSL */
1412
1408
return 0 ;
1413
1409
}
1414
- #endif /* HAVE_OPENSSL */
1415
1410
1416
1411
/**************************************************************************
1417
1412
** Connect to sql server
0 commit comments