From 4ad60b7bc1a0a5347dfa50cb970c6b990f6085f8 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 9 Dec 2008 23:04:46 +0000 Subject: Don't expose a netscape builtin roots object. --- module/p11-capi-builtin.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'module') diff --git a/module/p11-capi-builtin.c b/module/p11-capi-builtin.c index 4341f0c..3a7d291 100644 --- a/module/p11-capi-builtin.c +++ b/module/p11-capi-builtin.c @@ -31,9 +31,9 @@ static const CK_BBOOL ck_true = CK_TRUE; static const CK_BBOOL ck_false = CK_FALSE; -static const CK_OBJECT_CLASS cko_netscape_builtin_root_list = CKO_NETSCAPE_BUILTIN_ROOT_LIST; +static const CK_OBJECT_CLASS cko_sample_class = CKO_DATA; -static const char ck_root_label[] = "Windows Certificate Roots"; +static const char ck_sample_label[] = "Sample Builtin"; /* -------------------------------------------------------------------------- * BUILT IN OBJECTS @@ -41,12 +41,10 @@ static const char ck_root_label[] = "Windows Certificate Roots"; #define CK_END_LIST (CK_ULONG)-1 -static const CK_ATTRIBUTE builtin_root[] = { +static const CK_ATTRIBUTE builtin_sample[] = { { CKA_TOKEN, (void*)&ck_true, sizeof(CK_BBOOL) }, - { CKA_CLASS, (void*)&cko_netscape_builtin_root_list, sizeof(CK_OBJECT_CLASS) }, { CKA_PRIVATE, (void*)&ck_false, sizeof(CK_BBOOL) }, - { CKA_MODIFIABLE, (void*)&ck_false, sizeof(CK_BBOOL) }, - { CKA_LABEL, (void*)ck_root_label, sizeof(ck_root_label) }, + { CKA_LABEL, (void*)ck_sample_label, sizeof(ck_sample_label) }, { CK_END_LIST, NULL, 0 } }; @@ -58,7 +56,7 @@ typedef struct _BuiltinMatch BuiltinMatch; static const BuiltinMatch all_builtins[] = { -// { (CK_ATTRIBUTE_PTR)&builtin_root, P11C_SLOT_TRUSTED | P11C_SLOT_CA | P11C_SLOT_CERTS }, + { (CK_ATTRIBUTE_PTR)&builtin_sample, P11C_SLOT_CERTS }, { NULL, 0 } }; -- cgit v1.2.3