Skip to content

Commit 00e6686

Browse files
committed
logsrvd_conf_apply: allow TLS relay without a certificate
If sudo_logsrvd is not configured to use TLS, it should still be possile to use TLS for the relay connection as log as the server we are relaying to does not require a client certificate. Also fixes TLS relay when using the server section TLS settings.
1 parent e89bb81 commit 00e6686

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

logsrvd/logsrvd_conf.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,16 +1794,6 @@ logsrvd_conf_apply(struct logsrvd_config *config)
17941794
if (!addr->tls)
17951795
continue;
17961796

1797-
/* Relay requires TLS so it must be configured (in relay or server). */
1798-
if (!TLS_CONFIGURED(config->relay)) {
1799-
if (config->server.ssl_ctx != NULL) {
1800-
/* We will use the server TLS settings. */
1801-
break;
1802-
}
1803-
sudo_warnx("%s", U_("relay uses TLS but TLS not configured"));
1804-
debug_return_bool(false);
1805-
}
1806-
18071797
/* Create a TLS context for the relay. */
18081798
config->relay.ssl_ctx = init_tls_context(
18091799
TLS_RELAY_STR(config, tls_cacert_path),

0 commit comments

Comments
 (0)