summaryrefslogtreecommitdiff
path: root/monitor_wrap.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-10-31 21:23:19 +0000
committerDamien Miller <djm@mindrot.org>2019-11-01 09:46:10 +1100
commit9a14c64c38fc14d0029f1c7bc70cf62cc7f0fdf9 (patch)
treed79bb8d66eeba8e353f18dac919cb65d0ad896c7 /monitor_wrap.c
parent07da39f71d36fb547749a5b16aa8892e621a7e4a (diff)
downloadopenssh-git-9a14c64c38fc14d0029f1c7bc70cf62cc7f0fdf9.tar.gz
upstream: Refactor signing - use sshkey_sign for everything,
including the new U2F signatures. Don't use sshsk_ecdsa_sign() directly, instead make it reachable via sshkey_sign() like all other signature operations. This means that we need to add a provider argument to sshkey_sign(), so most of this change is mechanically adding that. Suggested by / ok markus@ OpenBSD-Commit-ID: d5193a03fcfa895085d91b2b83d984a9fde76c8c
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r--monitor_wrap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 4169b760..d20dc519 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor_wrap.c,v 1.113 2019/06/28 13:35:04 deraadt Exp $ */
+/* $OpenBSD: monitor_wrap.c,v 1.114 2019/10/31 21:23:19 djm Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -215,7 +215,8 @@ mm_choose_dh(int min, int nbits, int max)
int
mm_sshkey_sign(struct ssh *ssh, struct sshkey *key, u_char **sigp, size_t *lenp,
- const u_char *data, size_t datalen, const char *hostkey_alg, u_int compat)
+ const u_char *data, size_t datalen, const char *hostkey_alg,
+ const char *sk_provider, u_int compat)
{
struct kex *kex = *pmonitor->m_pkex;
struct sshbuf *m;
@@ -223,7 +224,8 @@ mm_sshkey_sign(struct ssh *ssh, struct sshkey *key, u_char **sigp, size_t *lenp,
int r;
debug3("%s entering", __func__);
-
+ if (sk_provider != NULL)
+ fatal("%s: sk_provider != NULL", __func__);
if ((m = sshbuf_new()) == NULL)
fatal("%s: sshbuf_new failed", __func__);
if ((r = sshbuf_put_u32(m, ndx)) != 0 ||