From 44cdb9d73f1a0b7d2c8483a119b9c4d6caabc1ec Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Fri, 19 Feb 2016 15:30:03 +0100 Subject: gpg: Split check_key_signature2. * g10/sig-check.c (hash_uid_node): Rename from this... (hash_uid_packet): ... to this. Take a PKT_user_id instead of a KBNODE. (check_key_signature2): Split the basic signature checking functionality into... (check_signature_over_key_or_uid): ... this new function. -- Signed-off-by: Neal H. Walfield --- g10/main.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'g10/main.h') diff --git a/g10/main.h b/g10/main.h index 863afa9e0..f7c47e91f 100644 --- a/g10/main.h +++ b/g10/main.h @@ -263,6 +263,19 @@ int check_key_signature2( KBNODE root, KBNODE node, PKT_public_key *check_pk, PKT_public_key *ret_pk, int *is_selfsig, u32 *r_expiredate, int *r_expired ); +/* Returns whether SIGNER generated the signature SIG over the packet + PACKET, which is a key, subkey or uid, and comes from the key block + KB. If SIGNER is NULL, it is looked up based on the information in + SIG. If not NULL, sets *IS_SELFSIG to indicate whether the + signature is a self-signature and *RET_PK to a copy of the signer's + key. */ +gpg_error_t check_signature_over_key_or_uid (PKT_public_key *signer, + PKT_signature *sig, + KBNODE kb, PACKET *packet, + int *is_selfsig, + PKT_public_key *ret_pk); + + /*-- delkey.c --*/ gpg_error_t delete_keys (strlist_t names, int secret, int allow_both); -- cgit v1.2.3