diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2017-02-03 02:56:00 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2017-02-03 14:34:25 +1100 |
commit | c998bf0afa1a01257a53793eba57941182e9e0b7 (patch) | |
tree | ac760850c4433e2bcde4a91acc9a1d22796c6a11 /sshconnect2.c | |
parent | 3ec5fa4ba97d4c4853620daea26a33b9f1fe3422 (diff) |
upstream commit
Make ssh_packet_set_rekey_limits take u32 for the number of
seconds until rekeying (negative values are rejected at config parse time).
This allows the removal of some casts and a signed vs unsigned comparison
warning.
rekey_time is cast to int64 for the comparison which is a no-op
on OpenBSD, but should also do the right thing in -portable on
anything still using 32bit time_t (until the system time actually
wraps, anyway).
some early guidance deraadt@, ok djm@
Upstream-ID: c9f18613afb994a07e7622eb326f49de3d123b6c
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index dd47b75d3..2abb86679 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshconnect2.c,v 1.253 2017/01/30 00:32:28 djm Exp $ */ | 1 | /* $OpenBSD: sshconnect2.c,v 1.254 2017/02/03 02:56:00 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * Copyright (c) 2008 Damien Miller. All rights reserved. | 4 | * Copyright (c) 2008 Damien Miller. All rights reserved. |
@@ -193,8 +193,8 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port) | |||
193 | } | 193 | } |
194 | 194 | ||
195 | if (options.rekey_limit || options.rekey_interval) | 195 | if (options.rekey_limit || options.rekey_interval) |
196 | packet_set_rekey_limits((u_int32_t)options.rekey_limit, | 196 | packet_set_rekey_limits(options.rekey_limit, |
197 | (time_t)options.rekey_interval); | 197 | options.rekey_interval); |
198 | 198 | ||
199 | /* start key exchange */ | 199 | /* start key exchange */ |
200 | if ((r = kex_setup(active_state, myproposal)) != 0) | 200 | if ((r = kex_setup(active_state, myproposal)) != 0) |