Remove unused tls parameter, we now use a per-address tls flag.
This commit is contained in:
@@ -111,7 +111,7 @@ connection_closure_free(struct connection_closure *closure)
|
|||||||
|
|
||||||
TAILQ_REMOVE(&connections, closure, entries);
|
TAILQ_REMOVE(&connections, closure, entries);
|
||||||
#if defined(HAVE_OPENSSL)
|
#if defined(HAVE_OPENSSL)
|
||||||
if (closure->tls) {
|
if (closure->ssl != NULL) {
|
||||||
SSL_shutdown(closure->ssl);
|
SSL_shutdown(closure->ssl);
|
||||||
SSL_free(closure->ssl);
|
SSL_free(closure->ssl);
|
||||||
}
|
}
|
||||||
@@ -185,7 +185,7 @@ done:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
fmt_hello_message(struct connection_buffer *buf, bool tls)
|
fmt_hello_message(struct connection_buffer *buf)
|
||||||
{
|
{
|
||||||
ServerMessage msg = SERVER_MESSAGE__INIT;
|
ServerMessage msg = SERVER_MESSAGE__INIT;
|
||||||
ServerHello hello = SERVER_HELLO__INIT;
|
ServerHello hello = SERVER_HELLO__INIT;
|
||||||
@@ -810,7 +810,7 @@ server_msg_cb(int fd, int what, void *v)
|
|||||||
__func__, buf->len - buf->off);
|
__func__, buf->len - buf->off);
|
||||||
|
|
||||||
#if defined(HAVE_OPENSSL)
|
#if defined(HAVE_OPENSSL)
|
||||||
if (closure->tls) {
|
if (closure->ssl != NULL) {
|
||||||
nwritten = SSL_write(closure->ssl, buf->data + buf->off,
|
nwritten = SSL_write(closure->ssl, buf->data + buf->off,
|
||||||
buf->len - buf->off);
|
buf->len - buf->off);
|
||||||
if (nwritten <= 0) {
|
if (nwritten <= 0) {
|
||||||
@@ -897,7 +897,7 @@ client_msg_cb(int fd, int what, void *v)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_OPENSSL)
|
#if defined(HAVE_OPENSSL)
|
||||||
if (closure->tls) {
|
if (closure->ssl != NULL) {
|
||||||
nread = SSL_read(closure->ssl, buf->data + buf->len, buf->size);
|
nread = SSL_read(closure->ssl, buf->data + buf->len, buf->size);
|
||||||
if (nread <= 0) {
|
if (nread <= 0) {
|
||||||
int err = SSL_get_error(closure->ssl, nread);
|
int err = SSL_get_error(closure->ssl, nread);
|
||||||
@@ -1074,7 +1074,7 @@ start_protocol(struct connection_closure *closure)
|
|||||||
const struct timespec *timeout = logsrvd_conf_get_sock_timeout();
|
const struct timespec *timeout = logsrvd_conf_get_sock_timeout();
|
||||||
debug_decl(start_protocol, SUDO_DEBUG_UTIL);
|
debug_decl(start_protocol, SUDO_DEBUG_UTIL);
|
||||||
|
|
||||||
if (!fmt_hello_message(&closure->write_buf, closure->tls))
|
if (!fmt_hello_message(&closure->write_buf))
|
||||||
debug_return_bool(false);
|
debug_return_bool(false);
|
||||||
|
|
||||||
if (sudo_ev_add(closure->evbase, closure->write_ev, timeout, false) == -1)
|
if (sudo_ev_add(closure->evbase, closure->write_ev, timeout, false) == -1)
|
||||||
@@ -1505,7 +1505,6 @@ connection_closure_alloc(int sock, bool tls, struct sudo_event_base *base)
|
|||||||
|
|
||||||
closure->iolog_dir_fd = -1;
|
closure->iolog_dir_fd = -1;
|
||||||
closure->sock = sock;
|
closure->sock = sock;
|
||||||
closure->tls = tls;
|
|
||||||
closure->evbase = base;
|
closure->evbase = base;
|
||||||
|
|
||||||
TAILQ_INSERT_TAIL(&connections, closure, entries);
|
TAILQ_INSERT_TAIL(&connections, closure, entries);
|
||||||
|
@@ -83,7 +83,6 @@ static struct logsrvd_config {
|
|||||||
bool tcp_keepalive;
|
bool tcp_keepalive;
|
||||||
char *pid_file;
|
char *pid_file;
|
||||||
#if defined(HAVE_OPENSSL)
|
#if defined(HAVE_OPENSSL)
|
||||||
bool tls;
|
|
||||||
struct logsrvd_tls_config tls_config;
|
struct logsrvd_tls_config tls_config;
|
||||||
struct logsrvd_tls_runtime tls_runtime;
|
struct logsrvd_tls_runtime tls_runtime;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user