(p11_list_keys): make element of search_data[0] constants and set them later

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18591 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-10-19 11:02:01 +00:00
parent 4951ed2980
commit f8bf18b7cc

View File

@@ -757,7 +757,7 @@ p11_list_keys(hx509_context context,
struct p11_collector ctx;
CK_OBJECT_CLASS key_class;
CK_ATTRIBUTE search_data[] = {
{CKA_CLASS, &key_class, sizeof(key_class)},
{CKA_CLASS, NULL, 0},
};
CK_ATTRIBUTE query_data[3] = {
{CKA_ID, NULL, 0},
@@ -766,6 +766,9 @@ p11_list_keys(hx509_context context,
};
int ret;
search_data[0].pValue = &key_class;
search_data[0].ulValueLen = sizeof(key_class);
if (lock == NULL)
lock = _hx509_empty_lock;