summaryrefslogtreecommitdiff
path: root/sshkey.h
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 /sshkey.h
parent07da39f71d36fb547749a5b16aa8892e621a7e4a (diff)
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 'sshkey.h')
-rw-r--r--sshkey.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/sshkey.h b/sshkey.h
index 2edcb13ab..1d36a24a9 100644
--- a/sshkey.h
+++ b/sshkey.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshkey.h,v 1.35 2019/10/31 21:15:14 djm Exp $ */ 1/* $OpenBSD: sshkey.h,v 1.36 2019/10/31 21:23:19 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -189,12 +189,13 @@ size_t sshkey_format_cert_validity(const struct sshkey_cert *,
189 char *, size_t) __attribute__((__bounded__(__string__, 2, 3))); 189 char *, size_t) __attribute__((__bounded__(__string__, 2, 3)));
190int sshkey_check_cert_sigtype(const struct sshkey *, const char *); 190int sshkey_check_cert_sigtype(const struct sshkey *, const char *);
191 191
192int sshkey_certify(struct sshkey *, struct sshkey *, const char *); 192int sshkey_certify(struct sshkey *, struct sshkey *,
193 const char *, const char *);
193/* Variant allowing use of a custom signature function (e.g. for ssh-agent) */ 194/* Variant allowing use of a custom signature function (e.g. for ssh-agent) */
194typedef int sshkey_certify_signer(struct sshkey *, u_char **, size_t *, 195typedef int sshkey_certify_signer(struct sshkey *, u_char **, size_t *,
195 const u_char *, size_t, const char *, u_int, void *); 196 const u_char *, size_t, const char *, const char *, u_int, void *);
196int sshkey_certify_custom(struct sshkey *, struct sshkey *, const char *, 197int sshkey_certify_custom(struct sshkey *, struct sshkey *, const char *,
197 sshkey_certify_signer *, void *); 198 const char *, sshkey_certify_signer *, void *);
198 199
199int sshkey_ecdsa_nid_from_name(const char *); 200int sshkey_ecdsa_nid_from_name(const char *);
200int sshkey_curve_name_to_nid(const char *); 201int sshkey_curve_name_to_nid(const char *);
@@ -223,7 +224,7 @@ int sshkey_plain_to_blob(const struct sshkey *, u_char **, size_t *);
223int sshkey_putb_plain(const struct sshkey *, struct sshbuf *); 224int sshkey_putb_plain(const struct sshkey *, struct sshbuf *);
224 225
225int sshkey_sign(struct sshkey *, u_char **, size_t *, 226int sshkey_sign(struct sshkey *, u_char **, size_t *,
226 const u_char *, size_t, const char *, u_int); 227 const u_char *, size_t, const char *, const char *, u_int);
227int sshkey_verify(const struct sshkey *, const u_char *, size_t, 228int sshkey_verify(const struct sshkey *, const u_char *, size_t,
228 const u_char *, size_t, const char *, u_int); 229 const u_char *, size_t, const char *, u_int);
229int sshkey_check_sigtype(const u_char *, size_t, const char *); 230int sshkey_check_sigtype(const u_char *, size_t, const char *);