From 42cf865350db37e80ab923bdc53e041cf9487501 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 20 Jun 2002 10:43:02 +0000 Subject: * 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. --- sm/keylist.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sm/keylist.c') diff --git a/sm/keylist.c b/sm/keylist.c index a8d9c5411..c17fb7052 100644 --- a/sm/keylist.c +++ b/sm/keylist.c @@ -84,15 +84,15 @@ print_capabilities (KsbaCert cert, FILE *fp) return; } - if ((use & KSBA_KEYUSAGE_KEY_ENCIPHERMENT)) + if ((use & (KSBA_KEYUSAGE_KEY_ENCIPHERMENT|KSBA_KEYUSAGE_DATA_ENCIPHERMENT))) putc ('e', fp); - if ((use & KSBA_KEYUSAGE_DIGITAL_SIGNATURE)) + if ((use & (KSBA_KEYUSAGE_DIGITAL_SIGNATURE|KSBA_KEYUSAGE_NON_REPUDIATION))) putc ('s', fp); if ((use & KSBA_KEYUSAGE_KEY_CERT_SIGN)) putc ('c', fp); - if ((use & KSBA_KEYUSAGE_KEY_ENCIPHERMENT)) + if ((use & (KSBA_KEYUSAGE_KEY_ENCIPHERMENT|KSBA_KEYUSAGE_DATA_ENCIPHERMENT))) putc ('E', fp); - if ((use & KSBA_KEYUSAGE_DIGITAL_SIGNATURE)) + if ((use & (KSBA_KEYUSAGE_DIGITAL_SIGNATURE|KSBA_KEYUSAGE_NON_REPUDIATION))) putc ('S', fp); if ((use & KSBA_KEYUSAGE_KEY_CERT_SIGN)) putc ('C', fp); -- cgit v1.2.3