comparison nss/lib/ckfw/builtins/bslot.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/slot.c
9 *
10 * This file implements the NSSCKMDSlot object for the
11 * "builtin objects" cryptoki module.
12 */
13
14 static NSSUTF8 *
15 builtins_mdSlot_GetSlotDescription
16 (
17 NSSCKMDSlot *mdSlot,
18 NSSCKFWSlot *fwSlot,
19 NSSCKMDInstance *mdInstance,
20 NSSCKFWInstance *fwInstance,
21 CK_RV *pError
22 )
23 {
24 return (NSSUTF8 *)nss_builtins_SlotDescription;
25 }
26
27 static NSSUTF8 *
28 builtins_mdSlot_GetManufacturerID
29 (
30 NSSCKMDSlot *mdSlot,
31 NSSCKFWSlot *fwSlot,
32 NSSCKMDInstance *mdInstance,
33 NSSCKFWInstance *fwInstance,
34 CK_RV *pError
35 )
36 {
37 return (NSSUTF8 *)nss_builtins_ManufacturerID;
38 }
39
40 static CK_VERSION
41 builtins_mdSlot_GetHardwareVersion
42 (
43 NSSCKMDSlot *mdSlot,
44 NSSCKFWSlot *fwSlot,
45 NSSCKMDInstance *mdInstance,
46 NSSCKFWInstance *fwInstance
47 )
48 {
49 return nss_builtins_HardwareVersion;
50 }
51
52 static CK_VERSION
53 builtins_mdSlot_GetFirmwareVersion
54 (
55 NSSCKMDSlot *mdSlot,
56 NSSCKFWSlot *fwSlot,
57 NSSCKMDInstance *mdInstance,
58 NSSCKFWInstance *fwInstance
59 )
60 {
61 return nss_builtins_FirmwareVersion;
62 }
63
64 static NSSCKMDToken *
65 builtins_mdSlot_GetToken
66 (
67 NSSCKMDSlot *mdSlot,
68 NSSCKFWSlot *fwSlot,
69 NSSCKMDInstance *mdInstance,
70 NSSCKFWInstance *fwInstance,
71 CK_RV *pError
72 )
73 {
74 return (NSSCKMDToken *)&nss_builtins_mdToken;
75 }
76
77 const NSSCKMDSlot
78 nss_builtins_mdSlot = {
79 (void *)NULL, /* etc */
80 NULL, /* Initialize */
81 NULL, /* Destroy */
82 builtins_mdSlot_GetSlotDescription,
83 builtins_mdSlot_GetManufacturerID,
84 NULL, /* GetTokenPresent -- defaults to true */
85 NULL, /* GetRemovableDevice -- defaults to false */
86 NULL, /* GetHardwareSlot -- defaults to false */
87 builtins_mdSlot_GetHardwareVersion,
88 builtins_mdSlot_GetFirmwareVersion,
89 builtins_mdSlot_GetToken,
90 (void *)NULL /* null terminator */
91 };
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)