summaryrefslogtreecommitdiffstats
path: root/monitor_wrap.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-12-18 03:25:15 +0100
committerDamien Miller <djm@mindrot.org>2017-12-19 05:21:37 +0100
commit04c7e28f83062dc42f2380d1bb3a6bf0190852c0 (patch)
treebc2c59d39a33aba84e0576039474668ada2546d2 /monitor_wrap.c
parentupstream commit (diff)
downloadopenssh-04c7e28f83062dc42f2380d1bb3a6bf0190852c0.tar.xz
openssh-04c7e28f83062dc42f2380d1bb3a6bf0190852c0.zip
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 'monitor_wrap.c')
-rw-r--r--monitor_wrap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c
index a46628fb1..502d41687 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor_wrap.c,v 1.95 2017/10/05 15:52:03 djm Exp $ */
+/* $OpenBSD: monitor_wrap.c,v 1.96 2017/12/18 02:25:15 djm Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -441,7 +441,7 @@ mm_key_allowed(enum mm_keytype type, const char *user, const char *host,
int
mm_sshkey_verify(const struct sshkey *key, const u_char *sig, size_t siglen,
- const u_char *data, size_t datalen, u_int compat)
+ const u_char *data, size_t datalen, const char *sigalg, u_int compat)
{
Buffer m;
u_char *blob;
@@ -458,6 +458,7 @@ mm_sshkey_verify(const struct sshkey *key, const u_char *sig, size_t siglen,
buffer_put_string(&m, blob, len);
buffer_put_string(&m, sig, siglen);
buffer_put_string(&m, data, datalen);
+ buffer_put_cstring(&m, sigalg);
free(blob);
mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_KEYVERIFY, &m);