summaryrefslogtreecommitdiffstats
path: root/sm/verify.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2002-07-02 21:38:14 +0200
committerWerner Koch <wk@gnupg.org>2002-07-02 21:38:14 +0200
commit6aaa48054b1c3347b2f8b0bbaddbd174459d6345 (patch)
tree8da60138b1b3688715f7a031a9c48f2d0f0728a8 /sm/verify.c
parent* certpath.c (check_cert_policy): Don't use log_error to print a (diff)
downloadgnupg2-6aaa48054b1c3347b2f8b0bbaddbd174459d6345.tar.xz
gnupg2-6aaa48054b1c3347b2f8b0bbaddbd174459d6345.zip
* verify.c (gpgsm_verify): Extend the STATUS_BADSIG line with
the fingerprint.
Diffstat (limited to '')
-rw-r--r--sm/verify.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sm/verify.c b/sm/verify.c
index 8e54da285..f4af56885 100644
--- a/sm/verify.c
+++ b/sm/verify.c
@@ -351,9 +351,13 @@ gpgsm_verify (CTRL ctrl, int in_fd, int data_fd, FILE *out_fp)
|| gcry_md_get_algo_dlen (algo) != msgdigestlen
|| !s || memcmp (s, msgdigest, msgdigestlen) )
{
+ char *fpr;
+
log_error ("invalid signature: message digest attribute "
"does not match calculated one\n");
- gpgsm_status (ctrl, STATUS_BADSIG, NULL);
+ fpr = gpgsm_get_fingerprint_hexstring (cert, GCRY_MD_SHA1);
+ gpgsm_status (ctrl, STATUS_BADSIG, fpr);
+ xfree (fpr);
goto next_signer;
}
@@ -385,8 +389,12 @@ gpgsm_verify (CTRL ctrl, int in_fd, int data_fd, FILE *out_fp)
if (rc)
{
+ char *fpr;
+
log_error ("invalid signature: %s\n", gnupg_strerror (rc));
- gpgsm_status (ctrl, STATUS_BADSIG, NULL);
+ fpr = gpgsm_get_fingerprint_hexstring (cert, GCRY_MD_SHA1);
+ gpgsm_status (ctrl, STATUS_BADSIG, fpr);
+ xfree (fpr);
goto next_signer;
}
rc = gpgsm_cert_use_verify_p (cert); /*(this displays an info message)*/