diff options
author | djm@openbsd.org <djm@openbsd.org> | 2017-12-18 02:25:15 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-12-19 15:21:37 +1100 |
commit | 04c7e28f83062dc42f2380d1bb3a6bf0190852c0 (patch) | |
tree | bc2c59d39a33aba84e0576039474668ada2546d2 /serverloop.c | |
parent | 931c78dfd7fe30669681a59e536bbe66535f3ee9 (diff) |
upstream commit
pass negotiated signing algorithm though to
sshkey_verify() and check that the negotiated algorithm matches the type in
the signature (only matters for RSA SHA1/SHA2 sigs). ok markus@
OpenBSD-Commit-ID: 735fb15bf4adc060d3bee9d047a4bcaaa81b1af9
Diffstat (limited to 'serverloop.c')
-rw-r--r-- | serverloop.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/serverloop.c b/serverloop.c index 464c07d2f..fb2980568 100644 --- a/serverloop.c +++ b/serverloop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: serverloop.c,v 1.200 2017/12/10 05:55:29 dtucker Exp $ */ | 1 | /* $OpenBSD: serverloop.c,v 1.201 2017/12/18 02:25:15 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -715,7 +715,8 @@ server_input_hostkeys_prove(struct ssh *ssh, struct sshbuf **respp) | |||
715 | ssh->kex->session_id, ssh->kex->session_id_len)) != 0 || | 715 | ssh->kex->session_id, ssh->kex->session_id_len)) != 0 || |
716 | (r = sshkey_puts(key, sigbuf)) != 0 || | 716 | (r = sshkey_puts(key, sigbuf)) != 0 || |
717 | (r = ssh->kex->sign(key_prv, key_pub, &sig, &slen, | 717 | (r = ssh->kex->sign(key_prv, key_pub, &sig, &slen, |
718 | sshbuf_ptr(sigbuf), sshbuf_len(sigbuf), NULL, 0)) != 0 || | 718 | sshbuf_ptr(sigbuf), sshbuf_len(sigbuf), |
719 | ssh->kex->hostkey_alg, 0)) != 0 || | ||
719 | (r = sshbuf_put_string(resp, sig, slen)) != 0) { | 720 | (r = sshbuf_put_string(resp, sig, slen)) != 0) { |
720 | error("%s: couldn't prepare signature: %s", | 721 | error("%s: couldn't prepare signature: %s", |
721 | __func__, ssh_err(r)); | 722 | __func__, ssh_err(r)); |