diff options
author | Neal H. Walfield <[email protected]> | 2015-10-19 09:06:57 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2015-10-19 18:11:01 +0000 |
commit | 0433e667029508d6933e8798d3d95bcdde70a7aa (patch) | |
tree | 707675a1fa25bc5b345a77d4cc89cbbb45dc16f1 /g10/mainproc.c | |
parent | gpg: Mark local function as static. (diff) | |
download | gnupg-0433e667029508d6933e8798d3d95bcdde70a7aa.tar.gz gnupg-0433e667029508d6933e8798d3d95bcdde70a7aa.zip |
gpg: Improve and regularize naming of signature checking functions.
* g10/packet.h (signature_check): Rename from this...
(check_signature): ... to this. Update users.
(signature_check2): Rename from this...
(check_signature2): ... to this. Update users.
* g10/sig-check.c (do_check): Rename from this...
(check_signature_end): ... to this. Update users.
(do_check_messages): Rename from this...
(check_signature_metadata_validity): ... to this. Update users.
--
Signed-off-by: Neal H. Walfield <[email protected]>
Diffstat (limited to 'g10/mainproc.c')
-rw-r--r-- | g10/mainproc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c index af5098717..4bf5a4e08 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -873,7 +873,7 @@ do_check_sig (CTX c, kbnode_t node, int *is_selfsig, } else /* detached signature */ { - /* signature_check() will enable the md. */ + /* check_signature() will enable the md. */ if (gcry_md_open (&md, 0, 0 )) BUG (); } @@ -892,7 +892,7 @@ do_check_sig (CTX c, kbnode_t node, int *is_selfsig, else /* detached signature */ { log_debug ("Do we really need this here?"); - /* signature_check() will enable the md*/ + /* check_signature() will enable the md*/ if (gcry_md_open (&md, 0, 0 )) BUG (); if (gcry_md_open (&md2, 0, 0 )) @@ -926,12 +926,14 @@ do_check_sig (CTX c, kbnode_t node, int *is_selfsig, else return GPG_ERR_SIG_CLASS; - rc = signature_check2 (sig, md, NULL, is_expkey, is_revkey, NULL); + /* We only get here if we are checking the signature of a binary + (0x00) or text document (0x01). */ + rc = check_signature2 (sig, md, NULL, is_expkey, is_revkey, NULL); if (! rc) md_good = md; else if (gpg_err_code (rc) == GPG_ERR_BAD_SIGNATURE && md2) { - rc = signature_check2 (sig, md2, NULL, is_expkey, is_revkey, NULL); + rc = check_signature2 (sig, md2, NULL, is_expkey, is_revkey, NULL); if (! rc) md_good = md2; } |