fix: io_set_ssl NULL in client_disconnect, SSL* type safety in protocol.h
This commit is contained in:
@@ -5,6 +5,8 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
typedef struct ssl_st SSL;
|
||||||
|
|
||||||
typedef int Status;
|
typedef int Status;
|
||||||
enum NET_STATUS { STATUS_OK, STATUS_ERROR, STATUS_FINISHED, STATUS_NEXT, STATUS_CHUNK, STATUS_MANIFEST };
|
enum NET_STATUS { STATUS_OK, STATUS_ERROR, STATUS_FINISHED, STATUS_NEXT, STATUS_CHUNK, STATUS_MANIFEST };
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "transport_tcp.h"
|
#include "transport_tcp.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "protocol.h"
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -152,6 +153,7 @@ void client_disconnect(Client *client) {
|
|||||||
SSL_shutdown(client->ssl);
|
SSL_shutdown(client->ssl);
|
||||||
SSL_free(client->ssl);
|
SSL_free(client->ssl);
|
||||||
client->ssl = NULL;
|
client->ssl = NULL;
|
||||||
|
io_set_ssl(NULL);
|
||||||
}
|
}
|
||||||
close(client->file_descriptor);
|
close(client->file_descriptor);
|
||||||
if (client->ssh_child_pid > 0) {
|
if (client->ssh_child_pid > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user