diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-10-05 15:46:50 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-10-05 15:46:50 +0000 |
commit | 475b0493648edd4c163df8655f9240a29e9cdef7 (patch) | |
tree | 33e8f48eb3a458c924dbc4070916fda9005e1df1 /usr.sbin | |
parent | 899d695843e33252da85dcbe136c7cb1e49a85be (diff) |
unbreak non-SSL relays by calling the ssl context init only if the SSL
flag is present...
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/hoststated/relay.c | 5 | ||||
-rw-r--r-- | usr.sbin/relayd/relay.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/hoststated/relay.c b/usr.sbin/hoststated/relay.c index 3846666c242..edef5c0a476 100644 --- a/usr.sbin/hoststated/relay.c +++ b/usr.sbin/hoststated/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.48 2007/10/01 13:57:29 pyr Exp $ */ +/* $OpenBSD: relay.c,v 1.49 2007/10/05 15:46:49 reyk Exp $ */ /* * Copyright (c) 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -407,7 +407,8 @@ relay_init(void) struct timeval tv; TAILQ_FOREACH(rlay, &env->relays, entry) { - if ((rlay->ctx = relay_ssl_ctx_create(rlay)) == NULL) + if ((rlay->conf.flags & F_SSL) && + (rlay->ctx = relay_ssl_ctx_create(rlay)) == NULL) fatal("relay_init: failed to create SSL context"); if (rlay->dsttable != NULL) { diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c index 3846666c242..edef5c0a476 100644 --- a/usr.sbin/relayd/relay.c +++ b/usr.sbin/relayd/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.48 2007/10/01 13:57:29 pyr Exp $ */ +/* $OpenBSD: relay.c,v 1.49 2007/10/05 15:46:49 reyk Exp $ */ /* * Copyright (c) 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -407,7 +407,8 @@ relay_init(void) struct timeval tv; TAILQ_FOREACH(rlay, &env->relays, entry) { - if ((rlay->ctx = relay_ssl_ctx_create(rlay)) == NULL) + if ((rlay->conf.flags & F_SSL) && + (rlay->ctx = relay_ssl_ctx_create(rlay)) == NULL) fatal("relay_init: failed to create SSL context"); if (rlay->dsttable != NULL) { |