mirror of
https://github.com/lxsang/ant-http
synced 2025-02-23 16:42:48 +01:00
fix ssl initialisation bug
This commit is contained in:
parent
dab7e28903
commit
d0df213164
@ -20,7 +20,7 @@ void accept_request(void* client)
|
|||||||
//char *query_string = NULL;
|
//char *query_string = NULL;
|
||||||
//LOG("SOCK IS %d\n", ((antd_client_t*)client)->sock);
|
//LOG("SOCK IS %d\n", ((antd_client_t*)client)->sock);
|
||||||
numchars = read_buf(client, buf, sizeof(buf));
|
numchars = read_buf(client, buf, sizeof(buf));
|
||||||
if(numchars < 0)
|
if(numchars <= 0)
|
||||||
{
|
{
|
||||||
unknow(client);
|
unknow(client);
|
||||||
goto end;
|
goto end;
|
||||||
|
1
httpd.c
1
httpd.c
@ -242,6 +242,7 @@ int main(int argc, char* argv[])
|
|||||||
if(server_config.usessl == 1)
|
if(server_config.usessl == 1)
|
||||||
{
|
{
|
||||||
client->ssl = (void*)SSL_new(ctx);
|
client->ssl = (void*)SSL_new(ctx);
|
||||||
|
if(!client->ssl) continue;
|
||||||
SSL_set_fd((SSL*)client->ssl, client_sock);
|
SSL_set_fd((SSL*)client->ssl, client_sock);
|
||||||
|
|
||||||
if (SSL_accept((SSL*)client->ssl) <= 0) {
|
if (SSL_accept((SSL*)client->ssl) <= 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user