comparison nss/lib/ckfw/builtins/binst.c @ 0:1e5118fa0cb1

This is NSS with a Cmake Buildsyste To compile a static NSS library for Windows we've used the Chromium-NSS fork and added a Cmake buildsystem to compile it statically for Windows. See README.chromium for chromium changes and README.trustbridge for our modifications.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 28 Jul 2014 10:47:06 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1e5118fa0cb1
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
5 #include "builtins.h"
6
7 /*
8 * builtins/instance.c
9 *
10 * This file implements the NSSCKMDInstance object for the
11 * "builtin objects" cryptoki module.
12 */
13
14 /*
15 * NSSCKMDInstance methods
16 */
17
18 static CK_ULONG
19 builtins_mdInstance_GetNSlots
20 (
21 NSSCKMDInstance *mdInstance,
22 NSSCKFWInstance *fwInstance,
23 CK_RV *pError
24 )
25 {
26 return (CK_ULONG)1;
27 }
28
29 static CK_VERSION
30 builtins_mdInstance_GetCryptokiVersion
31 (
32 NSSCKMDInstance *mdInstance,
33 NSSCKFWInstance *fwInstance
34 )
35 {
36 return nss_builtins_CryptokiVersion;
37 }
38
39 static NSSUTF8 *
40 builtins_mdInstance_GetManufacturerID
41 (
42 NSSCKMDInstance *mdInstance,
43 NSSCKFWInstance *fwInstance,
44 CK_RV *pError
45 )
46 {
47 return (NSSUTF8 *)nss_builtins_ManufacturerID;
48 }
49
50 static NSSUTF8 *
51 builtins_mdInstance_GetLibraryDescription
52 (
53 NSSCKMDInstance *mdInstance,
54 NSSCKFWInstance *fwInstance,
55 CK_RV *pError
56 )
57 {
58 return (NSSUTF8 *)nss_builtins_LibraryDescription;
59 }
60
61 static CK_VERSION
62 builtins_mdInstance_GetLibraryVersion
63 (
64 NSSCKMDInstance *mdInstance,
65 NSSCKFWInstance *fwInstance
66 )
67 {
68 extern const char __nss_builtins_rcsid[];
69 extern const char __nss_builtins_sccsid[];
70 volatile char c; /* force a reference that won't get optimized away */
71
72 c = __nss_builtins_rcsid[0] + __nss_builtins_sccsid[0];
73 return nss_builtins_LibraryVersion;
74 }
75
76 static CK_RV
77 builtins_mdInstance_GetSlots
78 (
79 NSSCKMDInstance *mdInstance,
80 NSSCKFWInstance *fwInstance,
81 NSSCKMDSlot *slots[]
82 )
83 {
84 slots[0] = (NSSCKMDSlot *)&nss_builtins_mdSlot;
85 return CKR_OK;
86 }
87
88 const NSSCKMDInstance
89 nss_builtins_mdInstance = {
90 (void *)NULL, /* etc */
91 NULL, /* Initialize */
92 NULL, /* Finalize */
93 builtins_mdInstance_GetNSlots,
94 builtins_mdInstance_GetCryptokiVersion,
95 builtins_mdInstance_GetManufacturerID,
96 builtins_mdInstance_GetLibraryDescription,
97 builtins_mdInstance_GetLibraryVersion,
98 NULL, /* ModuleHandlesSessionObjects -- defaults to false */
99 builtins_mdInstance_GetSlots,
100 NULL, /* WaitForSlotEvent */
101 (void *)NULL /* null terminator */
102 };
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)