1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/lib/ckfw/capi/staticobj.c Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef CKCAPI_H 1.9 +#include "ckcapi.h" 1.10 +#endif /* CKCAPI_H */ 1.11 + 1.12 +static const CK_TRUST ckt_netscape_valid = CKT_NETSCAPE_VALID; 1.13 +static const CK_OBJECT_CLASS cko_certificate = CKO_CERTIFICATE; 1.14 +static const CK_TRUST ckt_netscape_trusted_delegator = CKT_NETSCAPE_TRUSTED_DELEGATOR; 1.15 +static const CK_OBJECT_CLASS cko_netscape_trust = CKO_NETSCAPE_TRUST; 1.16 +static const CK_BBOOL ck_true = CK_TRUE; 1.17 +static const CK_OBJECT_CLASS cko_data = CKO_DATA; 1.18 +static const CK_CERTIFICATE_TYPE ckc_x_509 = CKC_X_509; 1.19 +static const CK_BBOOL ck_false = CK_FALSE; 1.20 +static const CK_OBJECT_CLASS cko_netscape_builtin_root_list = CKO_NETSCAPE_BUILTIN_ROOT_LIST; 1.21 + 1.22 +/* example of a static object */ 1.23 +static const CK_ATTRIBUTE_TYPE nss_ckcapi_types_1 [] = { 1.24 + CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL 1.25 +}; 1.26 + 1.27 +static const NSSItem nss_ckcapi_items_1 [] = { 1.28 + { (void *)&cko_data, (PRUint32)sizeof(CK_OBJECT_CLASS) }, 1.29 + { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) }, 1.30 + { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }, 1.31 + { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }, 1.32 + { (void *)"Mozilla CAPI Access", (PRUint32)20 } 1.33 +}; 1.34 + 1.35 +ckcapiInternalObject nss_ckcapi_data[] = { 1.36 + { ckcapiRaw, 1.37 + { 5, nss_ckcapi_types_1, nss_ckcapi_items_1} , 1.38 + }, 1.39 + 1.40 +}; 1.41 + 1.42 +const PRUint32 nss_ckcapi_nObjects = 1;