diff options
Diffstat (limited to 'pkcs11/xdg-store/gkm-xdg-module.c')
-rw-r--r-- | pkcs11/xdg-store/gkm-xdg-module.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkcs11/xdg-store/gkm-xdg-module.c b/pkcs11/xdg-store/gkm-xdg-module.c index 1f5ef01e..708d4eea 100644 --- a/pkcs11/xdg-store/gkm-xdg-module.c +++ b/pkcs11/xdg-store/gkm-xdg-module.c @@ -39,6 +39,8 @@ #include "gkm/gkm-transaction.h" #include "gkm/gkm-util.h" +#include "pkcs11x.h" + #include <string.h> struct _GkmXdgModule { @@ -314,6 +316,14 @@ guess_basename_for_object (GkmObject *object) name = name_for_subject (data, n_data); g_free (data); + /* Next we try and see if it has a peer (is a trust assertion) */ + if (name == NULL) { + data = gkm_object_get_attribute_data (object, NULL, CKA_X_PEER, &n_data); + if (data && n_data) + name = g_strndup ((gchar *)data, n_data); + g_free (data); + } + /* Next we try hex encoding the ID */ if (name == NULL) { data = gkm_object_get_attribute_data (object, NULL, CKA_ID, &n_data); |