diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-10-05 17:32:14 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-10-05 17:32:14 +0000 |
commit | 83fd168e1f2ce28e3379505ae423b76218ab9d52 (patch) | |
tree | 5239612158057766869c706c0bc9b6b7cbd3f07d | |
parent | c485ecd1482c169b6cc97940557e16e2086f7fe2 (diff) |
stylistic changes in the relay/relay_config structure.
-rw-r--r-- | usr.sbin/hoststated/hoststated.c | 6 | ||||
-rw-r--r-- | usr.sbin/hoststated/hoststated.h | 15 | ||||
-rw-r--r-- | usr.sbin/hoststated/relay.c | 6 | ||||
-rw-r--r-- | usr.sbin/relayd/relay.c | 6 | ||||
-rw-r--r-- | usr.sbin/relayd/relayd.c | 6 | ||||
-rw-r--r-- | usr.sbin/relayd/relayd.h | 15 |
6 files changed, 28 insertions, 26 deletions
diff --git a/usr.sbin/hoststated/hoststated.c b/usr.sbin/hoststated/hoststated.c index f9a54f605c0..df82218469c 100644 --- a/usr.sbin/hoststated/hoststated.c +++ b/usr.sbin/hoststated/hoststated.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hoststated.c,v 1.42 2007/10/02 21:04:13 pyr Exp $ */ +/* $OpenBSD: hoststated.c,v 1.43 2007/10/05 17:32:13 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -481,8 +481,8 @@ purge_config(struct hoststated *env, u_int8_t what) bufferevent_free(rly->bev); if (rly->dstbev != NULL) bufferevent_free(rly->dstbev); - if (rly->ctx != NULL) - SSL_CTX_free(rly->ctx); + if (rly->ssl_ctx != NULL) + SSL_CTX_free(rly->ssl_ctx); free(rly); } } diff --git a/usr.sbin/hoststated/hoststated.h b/usr.sbin/hoststated/hoststated.h index 7badae8f4c8..8e693df764c 100644 --- a/usr.sbin/hoststated/hoststated.h +++ b/usr.sbin/hoststated/hoststated.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hoststated.h,v 1.66 2007/10/05 15:50:12 reyk Exp $ */ +/* $OpenBSD: hoststated.h,v 1.67 2007/10/05 17:32:13 reyk Exp $ */ /* * Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -524,12 +524,8 @@ struct relay_config { struct relay { TAILQ_ENTRY(relay) entry; - char *ssl_cert; - off_t ssl_cert_len; - char *ssl_key; - off_t ssl_key_len; - struct relay_config conf; + int up; struct protocol *proto; int s; @@ -544,7 +540,12 @@ struct relay { int dstnhosts; struct event ev; - SSL_CTX *ctx; + + SSL_CTX *ssl_ctx; + char *ssl_cert; + off_t ssl_cert_len; + char *ssl_key; + off_t ssl_key_len; struct ctl_stats stats[RELAY_MAXPROC + 1]; diff --git a/usr.sbin/hoststated/relay.c b/usr.sbin/hoststated/relay.c index edef5c0a476..2dfe205dcae 100644 --- a/usr.sbin/hoststated/relay.c +++ b/usr.sbin/hoststated/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.49 2007/10/05 15:46:49 reyk Exp $ */ +/* $OpenBSD: relay.c,v 1.50 2007/10/05 17:32:13 reyk Exp $ */ /* * Copyright (c) 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -408,7 +408,7 @@ relay_init(void) TAILQ_FOREACH(rlay, &env->relays, entry) { if ((rlay->conf.flags & F_SSL) && - (rlay->ctx = relay_ssl_ctx_create(rlay)) == NULL) + (rlay->ssl_ctx = relay_ssl_ctx_create(rlay)) == NULL) fatal("relay_init: failed to create SSL context"); if (rlay->dsttable != NULL) { @@ -2126,7 +2126,7 @@ relay_ssl_transaction(struct session *con) struct relay *rlay = (struct relay *)con->relay; SSL *ssl; - ssl = SSL_new(rlay->ctx); + ssl = SSL_new(rlay->ssl_ctx); if (ssl == NULL) goto err; diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c index edef5c0a476..2dfe205dcae 100644 --- a/usr.sbin/relayd/relay.c +++ b/usr.sbin/relayd/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.49 2007/10/05 15:46:49 reyk Exp $ */ +/* $OpenBSD: relay.c,v 1.50 2007/10/05 17:32:13 reyk Exp $ */ /* * Copyright (c) 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -408,7 +408,7 @@ relay_init(void) TAILQ_FOREACH(rlay, &env->relays, entry) { if ((rlay->conf.flags & F_SSL) && - (rlay->ctx = relay_ssl_ctx_create(rlay)) == NULL) + (rlay->ssl_ctx = relay_ssl_ctx_create(rlay)) == NULL) fatal("relay_init: failed to create SSL context"); if (rlay->dsttable != NULL) { @@ -2126,7 +2126,7 @@ relay_ssl_transaction(struct session *con) struct relay *rlay = (struct relay *)con->relay; SSL *ssl; - ssl = SSL_new(rlay->ctx); + ssl = SSL_new(rlay->ssl_ctx); if (ssl == NULL) goto err; diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index 766654c1fcb..4c144877835 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.42 2007/10/02 21:04:13 pyr Exp $ */ +/* $OpenBSD: relayd.c,v 1.43 2007/10/05 17:32:13 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -481,8 +481,8 @@ purge_config(struct hoststated *env, u_int8_t what) bufferevent_free(rly->bev); if (rly->dstbev != NULL) bufferevent_free(rly->dstbev); - if (rly->ctx != NULL) - SSL_CTX_free(rly->ctx); + if (rly->ssl_ctx != NULL) + SSL_CTX_free(rly->ssl_ctx); free(rly); } } diff --git a/usr.sbin/relayd/relayd.h b/usr.sbin/relayd/relayd.h index 10d12fb907e..da7551a4041 100644 --- a/usr.sbin/relayd/relayd.h +++ b/usr.sbin/relayd/relayd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.h,v 1.66 2007/10/05 15:50:12 reyk Exp $ */ +/* $OpenBSD: relayd.h,v 1.67 2007/10/05 17:32:13 reyk Exp $ */ /* * Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -524,12 +524,8 @@ struct relay_config { struct relay { TAILQ_ENTRY(relay) entry; - char *ssl_cert; - off_t ssl_cert_len; - char *ssl_key; - off_t ssl_key_len; - struct relay_config conf; + int up; struct protocol *proto; int s; @@ -544,7 +540,12 @@ struct relay { int dstnhosts; struct event ev; - SSL_CTX *ctx; + + SSL_CTX *ssl_ctx; + char *ssl_cert; + off_t ssl_cert_len; + char *ssl_key; + off_t ssl_key_len; struct ctl_stats stats[RELAY_MAXPROC + 1]; |