Commit b8670d48 authored by tonu@x3.internalnet's avatar tonu@x3.internalnet

mysqld.cc openssl support

parent 4a4c2363
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <nisam.h> #include <nisam.h>
#include <thr_alarm.h> #include <thr_alarm.h>
#include <ft_global.h> #include <ft_global.h>
#include "vio.h"
#ifndef DBUG_OFF #ifndef DBUG_OFF
#define ONE_THREAD #define ONE_THREAD
...@@ -226,7 +227,7 @@ static char *opt_ssl_key = 0; ...@@ -226,7 +227,7 @@ static char *opt_ssl_key = 0;
static char *opt_ssl_cert = 0; static char *opt_ssl_cert = 0;
static char *opt_ssl_ca = 0; static char *opt_ssl_ca = 0;
static char *opt_ssl_capath = 0; static char *opt_ssl_capath = 0;
static VioSSLAcceptorFd* ssl_acceptor_fd = 0; static struct st_VioSSLAcceptorFd * ssl_acceptor_fd = 0;
#endif /* HAVE_OPENSSL */ #endif /* HAVE_OPENSSL */
...@@ -501,7 +502,7 @@ static void close_connections(void) ...@@ -501,7 +502,7 @@ static void close_connections(void)
/* Force remaining threads to die by closing the connection to the client */ /* Force remaining threads to die by closing the connection to the client */
(void) my_net_init(&net, (Vio*) 0); (void) my_net_init(&net, (st_vio*) 0);
for (;;) for (;;)
{ {
DBUG_PRINT("quit",("Locking LOCK_thread_count")); DBUG_PRINT("quit",("Locking LOCK_thread_count"));
...@@ -942,7 +943,7 @@ void yyerror(const char *s) ...@@ -942,7 +943,7 @@ void yyerror(const char *s)
void close_connection(NET *net,uint errcode,bool lock) void close_connection(NET *net,uint errcode,bool lock)
{ {
Vio* vio; st_vio* vio;
DBUG_ENTER("close_connection"); DBUG_ENTER("close_connection");
DBUG_PRINT("enter",("fd: %s error: '%s'", DBUG_PRINT("enter",("fd: %s error: '%s'",
net->vio? vio_description(net->vio):"(not connected)", net->vio? vio_description(net->vio):"(not connected)",
...@@ -1790,8 +1791,9 @@ int main(int argc, char **argv) ...@@ -1790,8 +1791,9 @@ int main(int argc, char **argv)
#ifdef HAVE_OPENSSL #ifdef HAVE_OPENSSL
if (opt_use_ssl) if (opt_use_ssl)
{ {
ssl_acceptor_fd = VioSSLAcceptorFd_new(opt_ssl_key, opt_ssl_cert, ssl_acceptor_fd = new_VioSSLAcceptorFd(opt_ssl_key, opt_ssl_cert,
opt_ssl_ca, opt_ssl_capath); opt_ssl_ca, opt_ssl_capath);
DBUG_PRINT("info",("ssl_acceptor_fd: %p",ssl_acceptor_fd));
if (!ssl_acceptor_fd) if (!ssl_acceptor_fd)
opt_use_ssl=0; opt_use_ssl=0;
/* having ssl_acceptor_fd!=0 signals the use of SSL */ /* having ssl_acceptor_fd!=0 signals the use of SSL */
...@@ -2206,7 +2208,7 @@ static int bootstrap(FILE *file) ...@@ -2206,7 +2208,7 @@ static int bootstrap(FILE *file)
int error; int error;
thd->bootstrap=1; thd->bootstrap=1;
thd->client_capabilities=0; thd->client_capabilities=0;
my_net_init(&thd->net,(Vio*) 0); my_net_init(&thd->net,(st_vio*) 0);
thd->max_packet_length=thd->net.max_packet; thd->max_packet_length=thd->net.max_packet;
thd->master_access= ~0; thd->master_access= ~0;
thd->thread_id=thread_id++; thd->thread_id=thread_id++;
...@@ -2343,7 +2345,7 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused))) ...@@ -2343,7 +2345,7 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused)))
THD *thd; THD *thd;
struct sockaddr_in cAddr; struct sockaddr_in cAddr;
int ip_flags=0,socket_flags=0,flags; int ip_flags=0,socket_flags=0,flags;
Vio *vio_tmp; st_vio *vio_tmp;
DBUG_ENTER("handle_connections_sockets"); DBUG_ENTER("handle_connections_sockets");
LINT_INIT(new_sock); LINT_INIT(new_sock);
......
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