[libnma/lr-gcr-fixes: 3/5] pkcs11-cert-chooser: show CKO_PUBLIC_KEY among public certificates




commit 39eeea7e19c3d03db4551de6771affabc31d96ec
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Wed Aug 3 13:23:29 2022 +0200

    pkcs11-cert-chooser: show CKO_PUBLIC_KEY among public certificates
    
    I've previously seen public keys have CKO_CERTIFICATE type. However,
    "p11tool --generate-privkey" backed with softhsm2 creates a
    CKO_PRIVATE_KEY/CKO_PUBLIC_KEY pair. That makes sense.
    
    Let's also show CKO_PUBLIC_KEY along with CKO_CERTIFICATE if the
    certificate chooser button was not created specifically for private keys.

 src/nma-pkcs11-cert-chooser-dialog.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/src/nma-pkcs11-cert-chooser-dialog.c b/src/nma-pkcs11-cert-chooser-dialog.c
index af8c8857..8c806027 100644
--- a/src/nma-pkcs11-cert-chooser-dialog.c
+++ b/src/nma-pkcs11-cert-chooser-dialog.c
@@ -146,6 +146,7 @@ object_details (GObject *source_object, GAsyncResult *res, gpointer user_data)
 
        switch (cka_class) {
        case CKO_CERTIFICATE:
+       case CKO_PUBLIC_KEY:
                store1 = priv->cert_store;
                store2 = priv->key_store;
                break;


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