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

Side by Side Diff: mozilla/security/nss/lib/ckfw/builtins/btoken.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: btoken.c,v $ $Revision: 1.5 $ $Date : 2012/04/25 14:49:29 $";
7 #endif /* DEBUG */
8
9 #include "builtins.h"
10
11 /*
12 * builtins/token.c
13 *
14 * This file implements the NSSCKMDToken object for the
15 * "builtin objects" cryptoki module.
16 */
17
18 static NSSUTF8 *
19 builtins_mdToken_GetLabel
20 (
21 NSSCKMDToken *mdToken,
22 NSSCKFWToken *fwToken,
23 NSSCKMDInstance *mdInstance,
24 NSSCKFWInstance *fwInstance,
25 CK_RV *pError
26 )
27 {
28 return (NSSUTF8 *)nss_builtins_TokenLabel;
29 }
30
31 static NSSUTF8 *
32 builtins_mdToken_GetManufacturerID
33 (
34 NSSCKMDToken *mdToken,
35 NSSCKFWToken *fwToken,
36 NSSCKMDInstance *mdInstance,
37 NSSCKFWInstance *fwInstance,
38 CK_RV *pError
39 )
40 {
41 return (NSSUTF8 *)nss_builtins_ManufacturerID;
42 }
43
44 static NSSUTF8 *
45 builtins_mdToken_GetModel
46 (
47 NSSCKMDToken *mdToken,
48 NSSCKFWToken *fwToken,
49 NSSCKMDInstance *mdInstance,
50 NSSCKFWInstance *fwInstance,
51 CK_RV *pError
52 )
53 {
54 return (NSSUTF8 *)nss_builtins_TokenModel;
55 }
56
57 static NSSUTF8 *
58 builtins_mdToken_GetSerialNumber
59 (
60 NSSCKMDToken *mdToken,
61 NSSCKFWToken *fwToken,
62 NSSCKMDInstance *mdInstance,
63 NSSCKFWInstance *fwInstance,
64 CK_RV *pError
65 )
66 {
67 return (NSSUTF8 *)nss_builtins_TokenSerialNumber;
68 }
69
70 static CK_BBOOL
71 builtins_mdToken_GetIsWriteProtected
72 (
73 NSSCKMDToken *mdToken,
74 NSSCKFWToken *fwToken,
75 NSSCKMDInstance *mdInstance,
76 NSSCKFWInstance *fwInstance
77 )
78 {
79 return CK_TRUE;
80 }
81
82 static CK_VERSION
83 builtins_mdToken_GetHardwareVersion
84 (
85 NSSCKMDToken *mdToken,
86 NSSCKFWToken *fwToken,
87 NSSCKMDInstance *mdInstance,
88 NSSCKFWInstance *fwInstance
89 )
90 {
91 return nss_builtins_HardwareVersion;
92 }
93
94 static CK_VERSION
95 builtins_mdToken_GetFirmwareVersion
96 (
97 NSSCKMDToken *mdToken,
98 NSSCKFWToken *fwToken,
99 NSSCKMDInstance *mdInstance,
100 NSSCKFWInstance *fwInstance
101 )
102 {
103 return nss_builtins_FirmwareVersion;
104 }
105
106 static NSSCKMDSession *
107 builtins_mdToken_OpenSession
108 (
109 NSSCKMDToken *mdToken,
110 NSSCKFWToken *fwToken,
111 NSSCKMDInstance *mdInstance,
112 NSSCKFWInstance *fwInstance,
113 NSSCKFWSession *fwSession,
114 CK_BBOOL rw,
115 CK_RV *pError
116 )
117 {
118 return nss_builtins_CreateSession(fwSession, pError);
119 }
120
121 const NSSCKMDToken
122 nss_builtins_mdToken = {
123 (void *)NULL, /* etc */
124 NULL, /* Setup */
125 NULL, /* Invalidate */
126 NULL, /* InitToken -- default errs */
127 builtins_mdToken_GetLabel,
128 builtins_mdToken_GetManufacturerID,
129 builtins_mdToken_GetModel,
130 builtins_mdToken_GetSerialNumber,
131 NULL, /* GetHasRNG -- default is false */
132 builtins_mdToken_GetIsWriteProtected,
133 NULL, /* GetLoginRequired -- default is false */
134 NULL, /* GetUserPinInitialized -- default is false */
135 NULL, /* GetRestoreKeyNotNeeded -- irrelevant */
136 NULL, /* GetHasClockOnToken -- default is false */
137 NULL, /* GetHasProtectedAuthenticationPath -- default is false */
138 NULL, /* GetSupportsDualCryptoOperations -- default is false */
139 NULL, /* GetMaxSessionCount -- default is CK_UNAVAILABLE_INFORMATION */
140 NULL, /* GetMaxRwSessionCount -- default is CK_UNAVAILABLE_INFORMATION */
141 NULL, /* GetMaxPinLen -- irrelevant */
142 NULL, /* GetMinPinLen -- irrelevant */
143 NULL, /* GetTotalPublicMemory -- default is CK_UNAVAILABLE_INFORMATION */
144 NULL, /* GetFreePublicMemory -- default is CK_UNAVAILABLE_INFORMATION */
145 NULL, /* GetTotalPrivateMemory -- default is CK_UNAVAILABLE_INFORMATION */
146 NULL, /* GetFreePrivateMemory -- default is CK_UNAVAILABLE_INFORMATION */
147 builtins_mdToken_GetHardwareVersion,
148 builtins_mdToken_GetFirmwareVersion,
149 NULL, /* GetUTCTime -- no clock */
150 builtins_mdToken_OpenSession,
151 NULL, /* GetMechanismCount -- default is zero */
152 NULL, /* GetMechanismTypes -- irrelevant */
153 NULL, /* GetMechanism -- irrelevant */
154 (void *)NULL /* null terminator */
155 };
OLDNEW
« no previous file with comments | « mozilla/security/nss/lib/ckfw/builtins/bslot.c ('k') | mozilla/security/nss/lib/ckfw/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698