diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-10-31 21:23:19 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-11-01 09:46:10 +1100 |
commit | 9a14c64c38fc14d0029f1c7bc70cf62cc7f0fdf9 (patch) | |
tree | d79bb8d66eeba8e353f18dac919cb65d0ad896c7 /sshkey.h | |
parent | 07da39f71d36fb547749a5b16aa8892e621a7e4a (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.h | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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))); |
190 | int sshkey_check_cert_sigtype(const struct sshkey *, const char *); | 190 | int sshkey_check_cert_sigtype(const struct sshkey *, const char *); |
191 | 191 | ||
192 | int sshkey_certify(struct sshkey *, struct sshkey *, const char *); | 192 | int 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) */ |
194 | typedef int sshkey_certify_signer(struct sshkey *, u_char **, size_t *, | 195 | typedef 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 *); |
196 | int sshkey_certify_custom(struct sshkey *, struct sshkey *, const char *, | 197 | int sshkey_certify_custom(struct sshkey *, struct sshkey *, const char *, |
197 | sshkey_certify_signer *, void *); | 198 | const char *, sshkey_certify_signer *, void *); |
198 | 199 | ||
199 | int sshkey_ecdsa_nid_from_name(const char *); | 200 | int sshkey_ecdsa_nid_from_name(const char *); |
200 | int sshkey_curve_name_to_nid(const char *); | 201 | int sshkey_curve_name_to_nid(const char *); |
@@ -223,7 +224,7 @@ int sshkey_plain_to_blob(const struct sshkey *, u_char **, size_t *); | |||
223 | int sshkey_putb_plain(const struct sshkey *, struct sshbuf *); | 224 | int sshkey_putb_plain(const struct sshkey *, struct sshbuf *); |
224 | 225 | ||
225 | int sshkey_sign(struct sshkey *, u_char **, size_t *, | 226 | int 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); |
227 | int sshkey_verify(const struct sshkey *, const u_char *, size_t, | 228 | int 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); |
229 | int sshkey_check_sigtype(const u_char *, size_t, const char *); | 230 | int sshkey_check_sigtype(const u_char *, size_t, const char *); |