[gcr: 2/4] gcr: Also display missing key usage bits



commit 946047ebd786a51f1a15a36b09c9890d155a9205
Author: Christophe Kamphaus <christophe kamphaus jemmic com>
Date:   Tue Jun 9 00:47:22 2020 +0200

    gcr: Also display missing key usage bits
    
    Previously the nonRepudiation, encipherOnly and decipherOnly bits were
    not listed.

 gcr/gcr-certificate-extensions.h | 2 ++
 ui/gcr-certificate-renderer.c    | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gcr/gcr-certificate-extensions.h b/gcr/gcr-certificate-extensions.h
index 3f0849c..0e5d135 100644
--- a/gcr/gcr-certificate-extensions.h
+++ b/gcr/gcr-certificate-extensions.h
@@ -51,6 +51,8 @@ typedef enum {
        GCR_KEY_USAGE_KEY_AGREEMENT = 1 << 4,
        GCR_KEY_USAGE_KEY_CERT_SIGN = 1 << 5,
        GCR_KEY_USAGE_CRL_SIGN = 1 << 6,
+       GCR_KEY_USAGE_ENCIPHER_ONLY = 1 << 7,
+       GCR_KEY_USAGE_DECIPHER_ONLY = 1 << 8,
 } GcrCertificateExtensionKeyUsage;
 
 gboolean   _gcr_certificate_extension_key_usage               (GBytes *data,
diff --git a/ui/gcr-certificate-renderer.c b/ui/gcr-certificate-renderer.c
index 5d9ba11..513cf01 100644
--- a/ui/gcr-certificate-renderer.c
+++ b/ui/gcr-certificate-renderer.c
@@ -185,11 +185,14 @@ static const struct {
        const gchar *description;
 } usage_descriptions[] = {
        { GCR_KEY_USAGE_DIGITAL_SIGNATURE, N_("Digital signature") },
+       { GCR_KEY_USAGE_NON_REPUDIATION, N_("Non repudiation") },
        { GCR_KEY_USAGE_KEY_ENCIPHERMENT, N_("Key encipherment") },
        { GCR_KEY_USAGE_DATA_ENCIPHERMENT, N_("Data encipherment") },
        { GCR_KEY_USAGE_KEY_AGREEMENT, N_("Key agreement") },
        { GCR_KEY_USAGE_KEY_CERT_SIGN, N_("Certificate signature") },
-       { GCR_KEY_USAGE_CRL_SIGN, N_("Revocation list signature") }
+       { GCR_KEY_USAGE_CRL_SIGN, N_("Revocation list signature") },
+       { GCR_KEY_USAGE_ENCIPHER_ONLY, N_("Encipher only") },
+       { GCR_KEY_USAGE_DECIPHER_ONLY, N_("Decipher only") }
 };
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]