diff options
author | djm@openbsd.org <djm@openbsd.org> | 2018-12-27 03:25:24 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-12-27 14:38:22 +1100 |
commit | 0a843d9a0e805f14653a555f5c7a8ba99d62c12d (patch) | |
tree | 481f36e9fd1918be5449e369a97c086a1a8d2432 /kexgexs.c | |
parent | 434b587afe41c19391821e7392005068fda76248 (diff) |
upstream: move client/server SSH-* banners to buffers under
ssh->kex and factor out the banner exchange. This eliminates some common code
from the client and server.
Also be more strict about handling \r characters - these should only
be accepted immediately before \n (pointed out by Jann Horn).
Inspired by a patch from Markus Schmidt.
(lots of) feedback and ok markus@
OpenBSD-Commit-ID: 1cc7885487a6754f63641d7d3279b0941890275b
Diffstat (limited to 'kexgexs.c')
-rw-r--r-- | kexgexs.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kexgexs.c,v 1.35 2018/10/04 00:04:41 djm Exp $ */ | 1 | /* $OpenBSD: kexgexs.c,v 1.36 2018/12/27 03:25:25 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Niels Provos. All rights reserved. | 3 | * Copyright (c) 2000 Niels Provos. All rights reserved. |
4 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
@@ -198,8 +198,8 @@ input_kex_dh_gex_init(int type, u_int32_t seq, struct ssh *ssh) | |||
198 | hashlen = sizeof(hash); | 198 | hashlen = sizeof(hash); |
199 | if ((r = kexgex_hash( | 199 | if ((r = kexgex_hash( |
200 | kex->hash_alg, | 200 | kex->hash_alg, |
201 | kex->client_version_string, | 201 | kex->client_version, |
202 | kex->server_version_string, | 202 | kex->server_version, |
203 | sshbuf_ptr(kex->peer), sshbuf_len(kex->peer), | 203 | sshbuf_ptr(kex->peer), sshbuf_len(kex->peer), |
204 | sshbuf_ptr(kex->my), sshbuf_len(kex->my), | 204 | sshbuf_ptr(kex->my), sshbuf_len(kex->my), |
205 | server_host_key_blob, sbloblen, | 205 | server_host_key_blob, sbloblen, |