diff -ur mysql-5.1.31/client/mysqlbinlog.cc mysql-5.1.31-binlog-ssl/client/mysqlbinlog.cc --- mysql-5.1.31/client/mysqlbinlog.cc 2009-02-11 00:23:17.000000000 +0000 +++ mysql-5.1.31-binlog-ssl/client/mysqlbinlog.cc 2009-03-02 10:21:15.000000000 +0000 @@ -83,7 +83,7 @@ static const char* user = 0; static char* pass = 0; static char *charset= 0; - +#include static uint verbose= 0; static ulonglong start_position, stop_position; @@ -1025,6 +1025,7 @@ "using --base64-output=never instead.", (uchar**) &short_form, (uchar**) &short_form, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, +#include {"socket", 'S', "Socket file to use for connection.", (uchar**) &sock, (uchar**) &sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -1217,6 +1218,7 @@ setscreenmode(SCR_AUTOCLOSE_ON_EXIT); break; #endif +#include #ifndef DBUG_OFF case '#': DBUG_PUSH(argument ? argument : default_dbug_option); @@ -1316,7 +1318,13 @@ error("Failed on mysql_init."); return ERROR_STOP; } - +#ifdef HAVE_OPENSSL + if (opt_use_ssl) + mysql_ssl_set(mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, + opt_ssl_capath, opt_ssl_cipher); + mysql_options(mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT, + (char*)&opt_ssl_verify_server_cert); +#endif if (opt_protocol) mysql_options(mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol); if (!mysql_real_connect(mysql, host, user, pass, 0, port, sock, 0))