aboutsummaryrefslogtreecommitdiffstats
path: root/sm/decrypt.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2002-04-12 18:54:34 +0000
committerWerner Koch <[email protected]>2002-04-12 18:54:34 +0000
commit7e07a397a009da4da1e21f8ce66fd7721b7a30c9 (patch)
tree12aeae79bc93b943aa9352c6c7933d303e6f9dfe /sm/decrypt.c
parent* card.c (card_open): Return immediately when no reader is available. (diff)
downloadgnupg-7e07a397a009da4da1e21f8ce66fd7721b7a30c9.tar.gz
gnupg-7e07a397a009da4da1e21f8ce66fd7721b7a30c9.zip
* certlist.c (cert_usable_p): New.
(gpgsm_cert_use_sign_p,gpgsm_cert_use_encrypt_p): New. (gpgsm_cert_use_verify_p,gpgsm_cert_use_decrypt_p): New. (gpgsm_add_to_certlist): Check the key usage. * sign.c (gpgsm_sign): Ditto. * verify.c (gpgsm_verify): Print a message wehn an unsuitable certificate was used. * decrypt.c (gpgsm_decrypt): Ditto * keylist.c (print_capabilities): Determine values from the cert.
Diffstat (limited to 'sm/decrypt.c')
-rw-r--r--sm/decrypt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sm/decrypt.c b/sm/decrypt.c
index 4e513a28b..e3566fd13 100644
--- a/sm/decrypt.c
+++ b/sm/decrypt.c
@@ -378,6 +378,10 @@ gpgsm_decrypt (CTRL ctrl, int in_fd, FILE *out_fp)
log_error ("failed to get cert: %s\n", gnupg_strerror (rc));
goto oops;
}
+ /* Just in case there is a problem with the own
+ certificate we print this message - should never
+ happen of course */
+ gpgsm_cert_use_decrypt_p (cert);
hexkeygrip = gpgsm_get_keygrip_hexstring (cert);