diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-12-21 15:03:15 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-21 15:03:15 -0800 |
commit | d2f0b7275998ebeaa15e48ce0180c466e1d77ec4 (patch) | |
tree | 9c78f0d3b6d3ba03fc9e6466f1f56fdc31443fcf /gpg-interface.h | |
parent | Merge branch 'jc/grep-patterntype-default-doc' (diff) | |
parent | ssh signing: verify ssh-keygen in test prereq (diff) | |
download | tgif-d2f0b7275998ebeaa15e48ce0180c466e1d77ec4.tar.xz |
Merge branch 'fs/ssh-signing-key-lifetime'
Extend the signing of objects with SSH keys and learn to pay
attention to the key validity time range when verifying.
* fs/ssh-signing-key-lifetime:
ssh signing: verify ssh-keygen in test prereq
ssh signing: make fmt-merge-msg consider key lifetime
ssh signing: make verify-tag consider key lifetime
ssh signing: make git log verify key lifetime
ssh signing: make verify-commit consider key lifetime
ssh signing: add key lifetime test prereqs
ssh signing: use sigc struct to pass payload
t/fmt-merge-msg: make gpgssh tests more specific
t/fmt-merge-msg: do not redirect stderr
Diffstat (limited to 'gpg-interface.h')
-rw-r--r-- | gpg-interface.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gpg-interface.h b/gpg-interface.h index beefacbb1e..b30cbdcd3d 100644 --- a/gpg-interface.h +++ b/gpg-interface.h @@ -15,8 +15,18 @@ enum signature_trust_level { TRUST_ULTIMATE, }; +enum payload_type { + SIGNATURE_PAYLOAD_UNDEFINED, + SIGNATURE_PAYLOAD_COMMIT, + SIGNATURE_PAYLOAD_TAG, + SIGNATURE_PAYLOAD_PUSH_CERT, +}; + struct signature_check { char *payload; + size_t payload_len; + enum payload_type payload_type; + timestamp_t payload_timestamp; char *output; char *gpg_status; @@ -70,9 +80,8 @@ const char *get_signing_key(void); * Either a GPG KeyID or a SSH Key Fingerprint */ const char *get_signing_key_id(void); -int check_signature(const char *payload, size_t plen, - const char *signature, size_t slen, - struct signature_check *sigc); +int check_signature(struct signature_check *sigc, + const char *signature, size_t slen); void print_signature_buffer(const struct signature_check *sigc, unsigned flags); |