security/nss/lib/ckfw/nssmkey/staticobj.c

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/ckfw/nssmkey/staticobj.c	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,36 @@
     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 CKMK_H
     1.9 +#include "ckmk.h"
    1.10 +#endif /* CKMK_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_ckmk_types_1 [] = {
    1.24 + CKA_CLASS,  CKA_TOKEN,  CKA_PRIVATE,  CKA_MODIFIABLE,  CKA_LABEL
    1.25 +};
    1.26 +
    1.27 +static const NSSItem nss_ckmk_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 Mac Key Ring Access", (PRUint32)28 }
    1.33 +};
    1.34 +
    1.35 +ckmkInternalObject nss_ckmk_data[] = {
    1.36 +  { ckmkRaw, {{ 5, nss_ckmk_types_1, nss_ckmk_items_1}} , CKO_DATA, {NULL} },
    1.37 +};
    1.38 +
    1.39 +const PRUint32 nss_ckmk_nObjects = 1;

mercurial