Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: mozilla/security/nss/lib/ckfw/builtins/binst.c

Issue 14249009: Change the NSS and NSPR source tree to the new directory structure to be (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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 #ifdef DEBUG
6 static const char CVS_ID[] = "@(#) $RCSfile: binst.c,v $ $Revision: 1.6 $ $Date: 2012/04/25 14:49:29 $";
7 #endif /* DEBUG */
8
9 #include "builtins.h"
10
11 /*
12 * builtins/instance.c
13 *
14 * This file implements the NSSCKMDInstance object for the
15 * "builtin objects" cryptoki module.
16 */
17
18 /*
19 * NSSCKMDInstance methods
20 */
21
22 static CK_ULONG
23 builtins_mdInstance_GetNSlots
24 (
25 NSSCKMDInstance *mdInstance,
26 NSSCKFWInstance *fwInstance,
27 CK_RV *pError
28 )
29 {
30 return (CK_ULONG)1;
31 }
32
33 static CK_VERSION
34 builtins_mdInstance_GetCryptokiVersion
35 (
36 NSSCKMDInstance *mdInstance,
37 NSSCKFWInstance *fwInstance
38 )
39 {
40 return nss_builtins_CryptokiVersion;
41 }
42
43 static NSSUTF8 *
44 builtins_mdInstance_GetManufacturerID
45 (
46 NSSCKMDInstance *mdInstance,
47 NSSCKFWInstance *fwInstance,
48 CK_RV *pError
49 )
50 {
51 return (NSSUTF8 *)nss_builtins_ManufacturerID;
52 }
53
54 static NSSUTF8 *
55 builtins_mdInstance_GetLibraryDescription
56 (
57 NSSCKMDInstance *mdInstance,
58 NSSCKFWInstance *fwInstance,
59 CK_RV *pError
60 )
61 {
62 return (NSSUTF8 *)nss_builtins_LibraryDescription;
63 }
64
65 static CK_VERSION
66 builtins_mdInstance_GetLibraryVersion
67 (
68 NSSCKMDInstance *mdInstance,
69 NSSCKFWInstance *fwInstance
70 )
71 {
72 extern const char __nss_builtins_rcsid[];
73 extern const char __nss_builtins_sccsid[];
74 volatile char c; /* force a reference that won't get optimized away */
75
76 c = __nss_builtins_rcsid[0] + __nss_builtins_sccsid[0];
77 return nss_builtins_LibraryVersion;
78 }
79
80 static CK_RV
81 builtins_mdInstance_GetSlots
82 (
83 NSSCKMDInstance *mdInstance,
84 NSSCKFWInstance *fwInstance,
85 NSSCKMDSlot *slots[]
86 )
87 {
88 slots[0] = (NSSCKMDSlot *)&nss_builtins_mdSlot;
89 return CKR_OK;
90 }
91
92 const NSSCKMDInstance
93 nss_builtins_mdInstance = {
94 (void *)NULL, /* etc */
95 NULL, /* Initialize */
96 NULL, /* Finalize */
97 builtins_mdInstance_GetNSlots,
98 builtins_mdInstance_GetCryptokiVersion,
99 builtins_mdInstance_GetManufacturerID,
100 builtins_mdInstance_GetLibraryDescription,
101 builtins_mdInstance_GetLibraryVersion,
102 NULL, /* ModuleHandlesSessionObjects -- defaults to false */
103 builtins_mdInstance_GetSlots,
104 NULL, /* WaitForSlotEvent */
105 (void *)NULL /* null terminator */
106 };
OLDNEW
« no previous file with comments | « mozilla/security/nss/lib/ckfw/builtins/bfind.c ('k') | mozilla/security/nss/lib/ckfw/builtins/bobject.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698