diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-11-25 00:51:37 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-11-25 12:23:33 +1100 |
commit | b7e74ea072919b31391bc0f5ff653f80b9f5e84f (patch) | |
tree | adb2a736c1b9f6346d342600877818631f9dbb3d /sshsig.h | |
parent | d2b0f88178ec9e3f11b606bf1004ac2fe541a2c3 (diff) |
upstream: Add new structure for signature options
This is populated during signature verification with additional fields
that are present in and covered by the signature. At the moment, it is
only used to record security key-specific options, especially the flags
field.
with and ok markus@
OpenBSD-Commit-ID: 338a1f0e04904008836130bedb9ece4faafd4e49
Diffstat (limited to 'sshsig.h')
-rw-r--r-- | sshsig.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -20,6 +20,7 @@ | |||
20 | struct sshbuf; | 20 | struct sshbuf; |
21 | struct sshkey; | 21 | struct sshkey; |
22 | struct sshsigopt; | 22 | struct sshsigopt; |
23 | struct sshkey_sig_details; | ||
23 | 24 | ||
24 | typedef int sshsig_signer(struct sshkey *, u_char **, size_t *, | 25 | typedef int sshsig_signer(struct sshkey *, u_char **, size_t *, |
25 | const u_char *, size_t, const char *, const char *, u_int, void *); | 26 | const u_char *, size_t, const char *, const char *, u_int, void *); |
@@ -43,7 +44,7 @@ int sshsig_signb(struct sshkey *key, const char *hashalg, | |||
43 | */ | 44 | */ |
44 | int sshsig_verifyb(struct sshbuf *signature, | 45 | int sshsig_verifyb(struct sshbuf *signature, |
45 | const struct sshbuf *message, const char *sig_namespace, | 46 | const struct sshbuf *message, const char *sig_namespace, |
46 | struct sshkey **sign_keyp); | 47 | struct sshkey **sign_keyp, struct sshkey_sig_details **sig_details); |
47 | 48 | ||
48 | /* File/FD-oriented API */ | 49 | /* File/FD-oriented API */ |
49 | 50 | ||
@@ -62,7 +63,8 @@ int sshsig_sign_fd(struct sshkey *key, const char *hashalg, | |||
62 | * Returns 0 on success or a negative SSH_ERR_* error code on failure. | 63 | * Returns 0 on success or a negative SSH_ERR_* error code on failure. |
63 | */ | 64 | */ |
64 | int sshsig_verify_fd(struct sshbuf *signature, int fd, | 65 | int sshsig_verify_fd(struct sshbuf *signature, int fd, |
65 | const char *sig_namespace, struct sshkey **sign_keyp); | 66 | const char *sig_namespace, struct sshkey **sign_keyp, |
67 | struct sshkey_sig_details **sig_details); | ||
66 | 68 | ||
67 | /* Utility functions */ | 69 | /* Utility functions */ |
68 | 70 | ||