summaryrefslogtreecommitdiff
path: root/gck/gck-slot.c
diff options
context:
space:
mode:
Diffstat (limited to 'gck/gck-slot.c')
-rw-r--r--gck/gck-slot.c36
1 files changed, 8 insertions, 28 deletions
diff --git a/gck/gck-slot.c b/gck/gck-slot.c
index 8698198..990800d 100644
--- a/gck/gck-slot.c
+++ b/gck/gck-slot.c
@@ -300,33 +300,6 @@ gck_token_info_free (GckTokenInfo *token_info)
g_free (token_info);
}
-static gboolean
-match_token_string (const gchar *match, const gchar *string)
-{
- /* NULL matches anything */
- if (match == NULL)
- return TRUE;
-
- if (string == NULL)
- return FALSE;
-
- return g_str_equal (match, string);
-}
-
-gboolean
-_gck_token_info_match (GckTokenInfo *match, GckTokenInfo *info)
-{
- /* Matches two GckTokenInfo for use in PKCS#11 URI's */
-
- g_return_val_if_fail (match, FALSE);
- g_return_val_if_fail (info, FALSE);
-
- return (match_token_string (match->label, info->label) &&
- match_token_string (match->manufacturer_id, info->manufacturer_id) &&
- match_token_string (match->model, info->model) &&
- match_token_string (match->serial_number, info->serial_number));
-}
-
/**
* GckMechanismInfo:
* @min_key_size: The minimum key size that can be used with this mechanism.
@@ -814,7 +787,14 @@ gck_slot_has_flags (GckSlot *self, gulong flags)
GckEnumerator*
gck_slots_enumerate_objects (GList *slots, GckAttributes *attrs, guint session_options)
{
- return _gck_enumerator_new (slots, session_options, NULL, attrs);
+ GckUriInfo *uri_info;
+
+ g_return_val_if_fail (attrs, NULL);
+
+ uri_info = _gck_uri_info_new ();
+ uri_info->attributes = gck_attributes_ref (attrs);
+
+ return _gck_enumerator_new (slots, session_options, uri_info);
}