diff options
author | djm@openbsd.org <djm@openbsd.org> | 2020-01-23 23:31:52 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2020-01-25 11:27:29 +1100 |
commit | 72a8bea2d748c8bd7f076a8b39a52082c79ae95f (patch) | |
tree | 14bea4a63d81af371d75708384811f5829a38267 /sshsig.h | |
parent | 0585b5697201f5d8b32e6f1b0fee7e188268d30d (diff) |
upstream: ssh-keygen -Y find-principals fixes based on feedback
from Markus:
use "principals" instead of principal, as allowed_signers lines may list
multiple.
When the signing key is a certificate, emit only principals that match
the certificate principal list.
NB. the command -Y name changes: "find-principal" => "find-principals"
ok markus@
OpenBSD-Commit-ID: ab575946ff9a55624cd4e811bfd338bf3b1d0faf
Diffstat (limited to 'sshsig.h')
-rw-r--r-- | sshsig.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -93,13 +93,12 @@ struct sshsigopt *sshsigopt_parse(const char *opts, | |||
93 | void sshsigopt_free(struct sshsigopt *opts); | 93 | void sshsigopt_free(struct sshsigopt *opts); |
94 | 94 | ||
95 | /* Get public key from signature */ | 95 | /* Get public key from signature */ |
96 | int | 96 | int sshsig_get_pubkey(struct sshbuf *signature, struct sshkey **pubkey); |
97 | sshsig_get_pubkey(struct sshbuf *signature, struct sshkey **pubkey); | ||
98 | 97 | ||
99 | /* Find principal in allowed_keys file, given a sshkey. Returns | 98 | /* Find principal in allowed_keys file, given a sshkey. Returns |
100 | * 0 on success. | 99 | * 0 on success. |
101 | */ | 100 | */ |
102 | int sshsig_find_principal(const char *path, const struct sshkey *sign_key, | 101 | int sshsig_find_principals(const char *path, const struct sshkey *sign_key, |
103 | char **principal); | 102 | char **principal); |
104 | 103 | ||
105 | #endif /* SSHSIG_H */ | 104 | #endif /* SSHSIG_H */ |