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

mysqld.cc openssl support

parent 4a4c2363
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include <nisam.h>
#include <thr_alarm.h>
#include <ft_global.h>
#include "vio.h"

#ifndef DBUG_OFF
#define ONE_THREAD
@@ -226,7 +227,7 @@ static char *opt_ssl_key = 0;
static char *opt_ssl_cert = 0;
static char *opt_ssl_ca = 0;
static char *opt_ssl_capath = 0;
static VioSSLAcceptorFd* ssl_acceptor_fd = 0;
static struct st_VioSSLAcceptorFd * ssl_acceptor_fd = 0;
#endif /* HAVE_OPENSSL */


@@ -501,7 +502,7 @@ static void close_connections(void)

  /* 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 (;;)
  {
    DBUG_PRINT("quit",("Locking LOCK_thread_count"));
@@ -942,7 +943,7 @@ void yyerror(const char *s)

void close_connection(NET *net,uint errcode,bool lock)
{
  Vio* vio;
  st_vio* vio;
  DBUG_ENTER("close_connection");
  DBUG_PRINT("enter",("fd: %s  error: '%s'",
                    net->vio? vio_description(net->vio):"(not connected)",
@@ -1790,8 +1791,9 @@ int main(int argc, char **argv)
#ifdef HAVE_OPENSSL
  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);
    DBUG_PRINT("info",("ssl_acceptor_fd: %p",ssl_acceptor_fd));
    if (!ssl_acceptor_fd)
      opt_use_ssl=0;
    /* having ssl_acceptor_fd!=0 signals the use of SSL */
@@ -2206,7 +2208,7 @@ static int bootstrap(FILE *file)
  int error;
  thd->bootstrap=1;
  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->master_access= ~0;
  thd->thread_id=thread_id++;
@@ -2343,7 +2345,7 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused)))
  THD *thd;
  struct sockaddr_in cAddr;
  int ip_flags=0,socket_flags=0,flags;
  Vio *vio_tmp;
  st_vio *vio_tmp;
  DBUG_ENTER("handle_connections_sockets");

  LINT_INIT(new_sock);