From 0433e667029508d6933e8798d3d95bcdde70a7aa Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Mon, 19 Oct 2015 11:06:57 +0200 Subject: 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 --- g10/mainproc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'g10/mainproc.c') 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; } -- cgit