diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-04-20 17:45:03 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-04-20 17:45:03 +0000 |
commit | 557e2d8617904e8b691264b57573f5e8e1b5f36f (patch) | |
tree | 9dcf075d8783cdbac9f7f29ffa714b86f911ffc8 /usr.sbin/relayd/relay.c | |
parent | add509cf4b13c3424745b415509f472359536ca0 (diff) |
SSL_CTX_set_timeout only handles long for the delta timeval, so constrain
it with MIN and LONG_MAX. It is only an interval, so it is fine.
suggestion by djm, ok benno
Diffstat (limited to 'usr.sbin/relayd/relay.c')
-rw-r--r-- | usr.sbin/relayd/relay.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c index fa05de64c2a..ef276ab2a1b 100644 --- a/usr.sbin/relayd/relay.c +++ b/usr.sbin/relayd/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.164 2013/03/10 23:32:53 reyk Exp $ */ +/* $OpenBSD: relay.c,v 1.165 2013/04/20 17:45:02 deraadt Exp $ */ /* * Copyright (c) 2006 - 2012 Reyk Floeter <reyk@openbsd.org> @@ -1822,7 +1822,8 @@ relay_ssl_ctx_create(struct relay *rlay) goto err; /* Modify session timeout and cache size*/ - SSL_CTX_set_timeout(ctx, rlay->rl_conf.timeout.tv_sec); + SSL_CTX_set_timeout(ctx, + (long)MIN(rlay->rl_conf.timeout.tv_sec, LONG_MAX)); if (proto->cache < -1) { SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF); } else if (proto->cache >= -1) { |