[seahorse/gnome-3-8] pkcs11: Hide certificates that have no DER X.509 values
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse/gnome-3-8] pkcs11: Hide certificates that have no DER X.509 values
- Date: Fri, 19 Apr 2013 19:22:35 +0000 (UTC)
commit e87d3a9f6122146117505c5ad8eefcd6b01007c1
Author: Stef Walter <stefw gnome org>
Date: Fri Apr 19 21:13:53 2013 +0200
pkcs11: Hide certificates that have no DER X.509 values
pkcs11/seahorse-token.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/pkcs11/seahorse-token.c b/pkcs11/seahorse-token.c
index e5d9727..37bac4d 100644
--- a/pkcs11/seahorse-token.c
+++ b/pkcs11/seahorse-token.c
@@ -250,6 +250,7 @@ receive_objects (SeahorseToken *self,
{
GckAttributes *attrs;
const GckAttribute *id;
+ const GckAttribute *der;
gpointer object;
gpointer prev;
gpointer pair;
@@ -263,6 +264,15 @@ receive_objects (SeahorseToken *self,
handle = gck_object_get_handle (object);
attrs = gck_object_cache_get_attributes (object);
+ /* For now skip certificates that have no X.509 data */
+ if (SEAHORSE_IS_CERTIFICATE (object)) {
+ der = gck_attributes_find (attrs, CKA_VALUE);
+ if (!der || !der->value) {
+ gck_attributes_unref (attrs);
+ continue;
+ }
+ }
+
prev = g_hash_table_lookup (self->pv->object_for_handle, &handle);
if (prev == NULL) {
g_hash_table_insert (self->pv->object_for_handle,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]