staticobj.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. #ifndef CKCAPI_H
  5. #include "ckcapi.h"
  6. #endif /* CKCAPI_H */
  7. static const CK_TRUST ckt_netscape_valid = CKT_NETSCAPE_VALID;
  8. static const CK_OBJECT_CLASS cko_certificate = CKO_CERTIFICATE;
  9. static const CK_TRUST ckt_netscape_trusted_delegator = CKT_NETSCAPE_TRUSTED_DELEGATOR;
  10. static const CK_OBJECT_CLASS cko_netscape_trust = CKO_NETSCAPE_TRUST;
  11. static const CK_BBOOL ck_true = CK_TRUE;
  12. static const CK_OBJECT_CLASS cko_data = CKO_DATA;
  13. static const CK_CERTIFICATE_TYPE ckc_x_509 = CKC_X_509;
  14. static const CK_BBOOL ck_false = CK_FALSE;
  15. static const CK_OBJECT_CLASS cko_netscape_builtin_root_list = CKO_NETSCAPE_BUILTIN_ROOT_LIST;
  16. /* example of a static object */
  17. static const CK_ATTRIBUTE_TYPE nss_ckcapi_types_1[] = {
  18. CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL
  19. };
  20. static const NSSItem nss_ckcapi_items_1[] = {
  21. { (void *)&cko_data, (PRUint32)sizeof(CK_OBJECT_CLASS) },
  22. { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
  23. { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
  24. { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
  25. { (void *)"Mozilla CAPI Access", (PRUint32)20 }
  26. };
  27. ckcapiInternalObject nss_ckcapi_data[] = {
  28. {
  29. ckcapiRaw,
  30. { 5, nss_ckcapi_types_1, nss_ckcapi_items_1 },
  31. },
  32. };
  33. const PRUint32 nss_ckcapi_nObjects = 1;