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

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

Issue 1843333003: Update NSPR to 4.12 and NSS to 3.23 on iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@master
Patch Set: Created 4 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
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 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 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/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 #include "builtins.h" 5 #include "builtins.h"
6 6
7 /* 7 /*
8 * builtins/instance.c 8 * builtins/instance.c
9 * 9 *
10 * This file implements the NSSCKMDInstance object for the 10 * This file implements the NSSCKMDInstance object for the
11 * "builtin objects" cryptoki module. 11 * "builtin objects" cryptoki module.
12 */ 12 */
13 13
14 /* 14 /*
15 * NSSCKMDInstance methods 15 * NSSCKMDInstance methods
16 */ 16 */
17 17
18 static CK_ULONG 18 static CK_ULONG
19 builtins_mdInstance_GetNSlots 19 builtins_mdInstance_GetNSlots(
20 ( 20 NSSCKMDInstance *mdInstance,
21 NSSCKMDInstance *mdInstance, 21 NSSCKFWInstance *fwInstance,
22 NSSCKFWInstance *fwInstance, 22 CK_RV *pError)
23 CK_RV *pError
24 )
25 { 23 {
26 return (CK_ULONG)1; 24 return (CK_ULONG)1;
27 } 25 }
28 26
29 static CK_VERSION 27 static CK_VERSION
30 builtins_mdInstance_GetCryptokiVersion 28 builtins_mdInstance_GetCryptokiVersion(
31 ( 29 NSSCKMDInstance *mdInstance,
32 NSSCKMDInstance *mdInstance, 30 NSSCKFWInstance *fwInstance)
33 NSSCKFWInstance *fwInstance
34 )
35 { 31 {
36 return nss_builtins_CryptokiVersion; 32 return nss_builtins_CryptokiVersion;
37 } 33 }
38 34
39 static NSSUTF8 * 35 static NSSUTF8 *
40 builtins_mdInstance_GetManufacturerID 36 builtins_mdInstance_GetManufacturerID(
41 ( 37 NSSCKMDInstance *mdInstance,
42 NSSCKMDInstance *mdInstance, 38 NSSCKFWInstance *fwInstance,
43 NSSCKFWInstance *fwInstance, 39 CK_RV *pError)
44 CK_RV *pError
45 )
46 { 40 {
47 return (NSSUTF8 *)nss_builtins_ManufacturerID; 41 return (NSSUTF8 *)nss_builtins_ManufacturerID;
48 } 42 }
49 43
50 static NSSUTF8 * 44 static NSSUTF8 *
51 builtins_mdInstance_GetLibraryDescription 45 builtins_mdInstance_GetLibraryDescription(
52 ( 46 NSSCKMDInstance *mdInstance,
53 NSSCKMDInstance *mdInstance, 47 NSSCKFWInstance *fwInstance,
54 NSSCKFWInstance *fwInstance, 48 CK_RV *pError)
55 CK_RV *pError
56 )
57 { 49 {
58 return (NSSUTF8 *)nss_builtins_LibraryDescription; 50 return (NSSUTF8 *)nss_builtins_LibraryDescription;
59 } 51 }
60 52
61 static CK_VERSION 53 static CK_VERSION
62 builtins_mdInstance_GetLibraryVersion 54 builtins_mdInstance_GetLibraryVersion(
63 ( 55 NSSCKMDInstance *mdInstance,
64 NSSCKMDInstance *mdInstance, 56 NSSCKFWInstance *fwInstance)
65 NSSCKFWInstance *fwInstance
66 )
67 { 57 {
68 #define NSS_VERSION_VARIABLE __nss_builtins_version 58 #define NSS_VERSION_VARIABLE __nss_builtins_version
69 #include "verref.h" 59 #include "verref.h"
70 return nss_builtins_LibraryVersion; 60 return nss_builtins_LibraryVersion;
71 } 61 }
72 62
73 static CK_RV 63 static CK_RV
74 builtins_mdInstance_GetSlots 64 builtins_mdInstance_GetSlots(
75 ( 65 NSSCKMDInstance *mdInstance,
76 NSSCKMDInstance *mdInstance, 66 NSSCKFWInstance *fwInstance,
77 NSSCKFWInstance *fwInstance, 67 NSSCKMDSlot *slots[])
78 NSSCKMDSlot *slots[]
79 )
80 { 68 {
81 slots[0] = (NSSCKMDSlot *)&nss_builtins_mdSlot; 69 slots[0] = (NSSCKMDSlot *)&nss_builtins_mdSlot;
82 return CKR_OK; 70 return CKR_OK;
83 } 71 }
84 72
85 const NSSCKMDInstance 73 const NSSCKMDInstance
86 nss_builtins_mdInstance = { 74 nss_builtins_mdInstance = {
87 (void *)NULL, /* etc */ 75 (void *)NULL, /* etc */
88 NULL, /* Initialize */ 76 NULL, /* Initialize */
89 NULL, /* Finalize */ 77 NULL, /* Finalize */
90 builtins_mdInstance_GetNSlots, 78 builtins_mdInstance_GetNSlots,
91 builtins_mdInstance_GetCryptokiVersion, 79 builtins_mdInstance_GetCryptokiVersion,
92 builtins_mdInstance_GetManufacturerID, 80 builtins_mdInstance_GetManufacturerID,
93 builtins_mdInstance_GetLibraryDescription, 81 builtins_mdInstance_GetLibraryDescription,
94 builtins_mdInstance_GetLibraryVersion, 82 builtins_mdInstance_GetLibraryVersion,
95 NULL, /* ModuleHandlesSessionObjects -- defaults to false */ 83 NULL, /* ModuleHandlesSessionObjects -- defaults to false */
96 builtins_mdInstance_GetSlots, 84 builtins_mdInstance_GetSlots,
97 NULL, /* WaitForSlotEvent */ 85 NULL, /* WaitForSlotEvent */
98 (void *)NULL /* null terminator */ 86 (void *)NULL /* null terminator */
99 }; 87 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698