diff options
author | Werner Koch <[email protected]> | 2002-06-20 10:43:02 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2002-06-20 10:43:02 +0000 |
commit | 42cf865350db37e80ab923bdc53e041cf9487501 (patch) | |
tree | f64fd5307b8491083ed07467c3ddee106390508b /sm/decrypt.c | |
parent | * call-agent.c (learn_cb): Use log_info instead of log_error on (diff) | |
download | gnupg-42cf865350db37e80ab923bdc53e041cf9487501.tar.gz gnupg-42cf865350db37e80ab923bdc53e041cf9487501.zip |
* certlist.c (gpgsm_add_to_certlist): Fixed locating of a
certificate with the required key usage.
* gpgsm.c (main): Fixed a segv when using --outfile without an
argument.
* keylist.c (print_capabilities): Also check for non-repudiation
and data encipherment.
* certlist.c (cert_usage_p): Test for signing and encryption was
swapped. Add a case for certification usage, handle
non-repudiation and data encipherment.
(gpgsm_cert_use_cert_p): New.
(gpgsm_add_to_certlist): Added a CTRL argument and changed all
callers to pass it.
* certpath.c (gpgsm_validate_path): Use it here to print a status
message. Added a CTRL argument and changed all callers to pass it.
* decrypt.c (gpgsm_decrypt): Print a status message for wrong key
usage.
* verify.c (gpgsm_verify): Ditto.
* keydb.c (classify_user_id): Allow a colon delimited fingerprint.
Diffstat (limited to 'sm/decrypt.c')
-rw-r--r-- | sm/decrypt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sm/decrypt.c b/sm/decrypt.c index e3566fd13..ccbcae2a6 100644 --- a/sm/decrypt.c +++ b/sm/decrypt.c @@ -381,7 +381,13 @@ gpgsm_decrypt (CTRL ctrl, int in_fd, FILE *out_fp) /* 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); + rc = gpgsm_cert_use_decrypt_p (cert); + if (rc) + { + gpgsm_status2 (ctrl, STATUS_ERROR, "decrypt.keyusage", + gnupg_error_token (rc), NULL); + rc = 0; + } hexkeygrip = gpgsm_get_keygrip_hexstring (cert); |