Commit d3e7244592107458dcc87f18f118a9e6df387cd8

Authored by Georg GH. Hopp
1 parent 1249d857

disabled SSL support for now, cause it seems that it crashed the whole thing right now.

... ... @@ -60,14 +60,14 @@ serverRun(Server this)
60 60 }
61 61 }
62 62
63   - /**
64   - * handle accept SSL
65   - */
66   - if (0 != ((this->fds)[1].revents & POLLIN)) {
67   - if (-1 == serverHandleAccept(this, 1)) {
68   - events--;
69   - }
70   - }
  63 + // /**
  64 + // * handle accept SSL
  65 + // */
  66 + // if (0 != ((this->fds)[1].revents & POLLIN)) {
  67 + // if (-1 == serverHandleAccept(this, 1)) {
  68 + // events--;
  69 + // }
  70 + // }
71 71
72 72 for (i=2; i < this->nfds; i++) {
73 73 /**
... ...
... ... @@ -74,31 +74,32 @@ serverCtor(void * _this, va_list * params)
74 74 flags = fcntl(this->sock->handle, F_GETFL, 0);
75 75 fcntl(this->sock->handle, F_SETFL, flags | O_NONBLOCK);
76 76
77   - this->sockSSL = new(Sock, this->logger, port+1);
78   - flags = fcntl(this->sockSSL->handle, F_GETFL, 0);
79   - fcntl(this->sockSSL->handle, F_SETFL, flags | O_NONBLOCK);
80   -
81   - SSL_library_init();
82   - SSL_load_error_strings();
83   - this->ctx = SSL_CTX_new(SSLv23_server_method());
84   - SSL_CTX_use_certificate_file(
85   - this->ctx,
86   - "./certs/server.crt",
87   - SSL_FILETYPE_PEM);
88   -
89   - SSL_CTX_use_RSAPrivateKey_file(
90   - this->ctx,
91   - "./certs/server.key",
92   - SSL_FILETYPE_PEM);
  77 + // this->sockSSL = new(Sock, this->logger, port+1);
  78 + // flags = fcntl(this->sockSSL->handle, F_GETFL, 0);
  79 + // fcntl(this->sockSSL->handle, F_SETFL, flags | O_NONBLOCK);
  80 +
  81 + // SSL_library_init();
  82 + // SSL_load_error_strings();
  83 + // this->ctx = SSL_CTX_new(SSLv23_server_method());
  84 + // SSL_CTX_use_certificate_file(
  85 + // this->ctx,
  86 + // "./certs/server.crt",
  87 + // SSL_FILETYPE_PEM);
  88 +
  89 + // SSL_CTX_use_RSAPrivateKey_file(
  90 + // this->ctx,
  91 + // "./certs/server.key",
  92 + // SSL_FILETYPE_PEM);
93 93
94 94 socketListen(this->sock, backlog);
95   - socketListen(this->sockSSL, backlog);
  95 + // socketListen(this->sockSSL, backlog);
96 96
97 97 (this->fds)[0].fd = this->sock->handle;
98 98 (this->fds)[0].events = POLLIN;
99   - (this->fds)[1].fd = this->sockSSL->handle;
100   - (this->fds)[1].events = POLLIN;
101   - this->nfds = 2;
  99 + // (this->fds)[1].fd = this->sockSSL->handle;
  100 + // (this->fds)[1].events = POLLIN;
  101 + // this->nfds = 2;
  102 + this->nfds = 1;
102 103
103 104 return 0;
104 105 }
... ... @@ -121,10 +122,10 @@ serverDtor(void * _this)
121 122 MEM_FREE(this->conns);
122 123
123 124 delete(this->sock);
124   - delete(this->sockSSL);
  125 + // delete(this->sockSSL);
125 126
126   - SSL_CTX_free(this->ctx);
127   - ERR_free_strings();
  127 + // SSL_CTX_free(this->ctx);
  128 + // ERR_free_strings();
128 129 }
129 130
130 131 INIT_IFACE(Class, serverCtor, serverDtor, NULL);
... ...
Please register or login to post a comment