summaryrefslogtreecommitdiff
path: root/monitor_wrap.c
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2017-05-30 14:10:53 +0000
committerDamien Miller <djm@mindrot.org>2017-05-31 10:47:31 +1000
commit00ed75c92d1f95fe50032835106c368fa22f0f02 (patch)
treef66d7d747d708528011ae1d7ca553b39ed63bd82 /monitor_wrap.c
parent54d90ace1d3535b44d92a8611952dc109a74a031 (diff)
upstream commit
switch auth2-pubkey.c to modern APIs; with & ok djm@ Upstream-ID: 8f08d4316eb1b0c4ffe4a206c05cdd45ed1daf07
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r--monitor_wrap.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 0710a10b0..25f3e9678 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_wrap.c,v 1.91 2017/05/30 08:52:19 markus Exp $ */ 1/* $OpenBSD: monitor_wrap.c,v 1.92 2017/05/30 14:10:53 markus Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -436,13 +436,13 @@ mm_key_allowed(enum mm_keytype type, const char *user, const char *host,
436 */ 436 */
437 437
438int 438int
439mm_key_verify(struct sshkey *key, u_char *sig, u_int siglen, u_char *data, 439mm_sshkey_verify(const struct sshkey *key, const u_char *sig, size_t siglen,
440 u_int datalen) 440 const u_char *data, size_t datalen, u_int compat)
441{ 441{
442 Buffer m; 442 Buffer m;
443 u_char *blob; 443 u_char *blob;
444 u_int len; 444 u_int len;
445 int verified = 0; 445 u_int encoded_ret = 0;
446 446
447 debug3("%s entering", __func__); 447 debug3("%s entering", __func__);
448 448
@@ -461,11 +461,13 @@ mm_key_verify(struct sshkey *key, u_char *sig, u_int siglen, u_char *data,
461 debug3("%s: waiting for MONITOR_ANS_KEYVERIFY", __func__); 461 debug3("%s: waiting for MONITOR_ANS_KEYVERIFY", __func__);
462 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_KEYVERIFY, &m); 462 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_KEYVERIFY, &m);
463 463
464 verified = buffer_get_int(&m); 464 encoded_ret = buffer_get_int(&m);
465 465
466 buffer_free(&m); 466 buffer_free(&m);
467 467
468 return (verified); 468 if (encoded_ret != 0)
469 return SSH_ERR_SIGNATURE_INVALID;
470 return 0;
469} 471}
470 472
471void 473void