aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/mainproc.c3
-rw-r--r--g10/sign.c7
2 files changed, 9 insertions, 1 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c
index 79ff21198..762fc79c8 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -618,6 +618,9 @@ print_pkenc_list (ctrl_t ctrl, struct kidlist_item *list, int failed)
{
log_info (_("public key decryption failed: %s\n"),
gpg_strerror (list->reason));
+ if (gpg_err_source (list->reason) == GPG_ERR_SOURCE_SCD
+ && gpg_err_code (list->reason) == GPG_ERR_INV_ID)
+ print_further_info ("a reason might be a card with replaced keys");
write_status_error ("pkdecrypt_failed", list->reason);
}
}
diff --git a/g10/sign.c b/g10/sign.c
index 6a90fe16e..18f6d20ea 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -462,7 +462,12 @@ do_sign (ctrl_t ctrl, PKT_public_key *pksk, PKT_signature *sig,
leave:
if (err)
- log_error (_("signing failed: %s\n"), gpg_strerror (err));
+ {
+ log_error (_("signing failed: %s\n"), gpg_strerror (err));
+ if (gpg_err_source (err) == GPG_ERR_SOURCE_SCD
+ && gpg_err_code (err) == GPG_ERR_INV_ID)
+ print_further_info ("a reason might be a card with replaced keys");
+ }
else
{
if (opt.verbose)