Fix bug#68: ssl_test.c does not compile/work

parent c4637293
...@@ -22,7 +22,7 @@ LIBS = @CLIENT_LIBS@ ...@@ -22,7 +22,7 @@ LIBS = @CLIENT_LIBS@
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la
bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \ bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \
mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen
noinst_PROGRAMS = insert_test select_test thread_test noinst_PROGRAMS = insert_test select_test thread_test ssl_test
noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \ noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
client_priv.h client_priv.h
mysql_SOURCES = mysql.cc readline.cc sql_string.cc completion_hash.cc mysql_SOURCES = mysql.cc readline.cc sql_string.cc completion_hash.cc
......
...@@ -41,7 +41,9 @@ int main(int argc, char **argv) ...@@ -41,7 +41,9 @@ int main(int argc, char **argv)
mysql_init(&mysql); mysql_init(&mysql);
#ifdef HAVE_OPENSSL #ifdef HAVE_OPENSSL
mysql_ssl_set(&mysql,"../SSL/MySQL-client-key.pem","../SSL/MySQL-client-cert.pem","../SSL/MySQL-ca-cert.pem","../SSL/"); mysql_ssl_set(&mysql,"../SSL/MySQL-client-key.pem",
"../SSL/MySQL-client-cert.pem",
"../SSL/MySQL-ca-cert.pem", 0, 0);
#endif #endif
if (!(sock = mysql_real_connect(&mysql,"127.0.0.1",0,0,argv[1],3306,NULL,0))) if (!(sock = mysql_real_connect(&mysql,"127.0.0.1",0,0,argv[1],3306,NULL,0)))
{ {
...@@ -49,7 +51,6 @@ int main(int argc, char **argv) ...@@ -49,7 +51,6 @@ int main(int argc, char **argv)
perror(""); perror("");
exit(1); exit(1);
} }
printf("Cipher:%s\n",mysql_ssl_cipher(&mysql));
count = 0; count = 0;
num = atoi(argv[2]); num = atoi(argv[2]);
while (count < num) while (count < num)
...@@ -62,7 +63,7 @@ int main(int argc, char **argv) ...@@ -62,7 +63,7 @@ int main(int argc, char **argv)
} }
if (!(res=mysql_store_result(sock))) if (!(res=mysql_store_result(sock)))
{ {
fprintf(stderr,"Couldn't get result from query failed\n", fprintf(stderr,"Couldn't get result from query failed (%s)\n",
mysql_error(sock)); mysql_error(sock));
exit(1); exit(1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment