diff options
author | Neal H. Walfield <[email protected]> | 2015-10-19 09:15:00 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2015-10-19 18:11:02 +0000 |
commit | a608ee750dd83bf77a5fb4f0ab5bcf812436ba4d (patch) | |
tree | 3ca462d562bed126dc7287d70a32fb8215fbbe9b /g10/packet.h | |
parent | gpg: Improve and regularize naming of signature checking functions. (diff) | |
download | gnupg-a608ee750dd83bf77a5fb4f0ab5bcf812436ba4d.tar.gz gnupg-a608ee750dd83bf77a5fb4f0ab5bcf812436ba4d.zip |
gpg: Improve function documentation and some comments.
* g10/main.h: Improve function documentation.
* g10/packet.h.h: Improve function documentation.
* g10/sig-check.c: Improve function documentation and some comments.
--
Signed-off-by: Neal H. Walfield <[email protected]>
Diffstat (limited to 'g10/packet.h')
-rw-r--r-- | g10/packet.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/g10/packet.h b/g10/packet.h index 87671a6ce..2bc911d29 100644 --- a/g10/packet.h +++ b/g10/packet.h @@ -638,9 +638,18 @@ int cmp_user_ids( PKT_user_id *a, PKT_user_id *b ); /*-- sig-check.c --*/ -int check_signature( PKT_signature *sig, gcry_md_hd_t digest ); -int check_signature2( PKT_signature *sig, gcry_md_hd_t digest, u32 *r_expiredate, - int *r_expired, int *r_revoked, PKT_public_key *ret_pk ); +/* Check a signature. This is shorthand for check_signature2 with + the unnamed arguments passed as NULL. */ +int check_signature (PKT_signature *sig, gcry_md_hd_t digest); + +/* Check a signature. Looks up the public key from the key db. (If + RET_PK is not NULL, it is returned in *RET_PK.) DIGEST contains a + valid hash context that already includes the signed data. This + function adds the relevant meta-data to the hash before finalizing + it and verifying the signature. */ +int check_signature2 (PKT_signature *sig, gcry_md_hd_t digest, + u32 *r_expiredate, int *r_expired, int *r_revoked, + PKT_public_key *ret_pk); /*-- pubkey-enc.c --*/ |