OLD | NEW |
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 * This file implements PKCS 11 on top of our existing security modules | 5 * This file implements PKCS 11 on top of our existing security modules |
6 * | 6 * |
7 * For more information about PKCS 11 See PKCS 11 Token Inteface Standard. | 7 * For more information about PKCS 11 See PKCS 11 Token Inteface Standard. |
8 * This implementation has two slots: | 8 * This implementation has two slots: |
9 * slot 1 is our generic crypto support. It does not require login. | 9 * slot 1 is our generic crypto support. It does not require login. |
10 * It supports Public Key ops, and all they bulk ciphers and hashes. | 10 * It supports Public Key ops, and all they bulk ciphers and hashes. |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "sftkdbt.h" | 29 #include "sftkdbt.h" |
30 | 30 |
31 #define STATIC_CMD_SIZE 2048 | 31 #define STATIC_CMD_SIZE 2048 |
32 | 32 |
33 typedef struct SDBFindStr SDBFind; | 33 typedef struct SDBFindStr SDBFind; |
34 typedef struct SDBStr SDB; | 34 typedef struct SDBStr SDB; |
35 | 35 |
36 struct SDBStr { | 36 struct SDBStr { |
37 void *private; | 37 void *private; |
38 int version; | 38 int version; |
39 SDBType sdb_type; | 39 int reserved; |
40 int sdb_flags; | 40 int sdb_flags; |
41 void *app_private; | 41 void *app_private; |
42 CK_RV (*sdb_FindObjectsInit)(SDB *sdb, const CK_ATTRIBUTE *template, | 42 CK_RV (*sdb_FindObjectsInit)(SDB *sdb, const CK_ATTRIBUTE *template, |
43 CK_ULONG count, SDBFind **find); | 43 CK_ULONG count, SDBFind **find); |
44 CK_RV (*sdb_FindObjects)(SDB *sdb, SDBFind *find, CK_OBJECT_HANDLE *ids, | 44 CK_RV (*sdb_FindObjects)(SDB *sdb, SDBFind *find, CK_OBJECT_HANDLE *ids, |
45 CK_ULONG arraySize, CK_ULONG *count); | 45 CK_ULONG arraySize, CK_ULONG *count); |
46 CK_RV (*sdb_FindObjectsFinal)(SDB *sdb, SDBFind *find); | 46 CK_RV (*sdb_FindObjectsFinal)(SDB *sdb, SDBFind *find); |
47 CK_RV (*sdb_GetAttributeValue)(SDB *sdb, CK_OBJECT_HANDLE object, | 47 CK_RV (*sdb_GetAttributeValue)(SDB *sdb, CK_OBJECT_HANDLE object, |
48 CK_ATTRIBUTE *template, CK_ULONG count); | 48 CK_ATTRIBUTE *template, CK_ULONG count); |
49 CK_RV (*sdb_SetAttributeValue)(SDB *sdb, CK_OBJECT_HANDLE object, | 49 CK_RV (*sdb_SetAttributeValue)(SDB *sdb, CK_OBJECT_HANDLE object, |
(...skipping 19 matching lines...) Expand all Loading... |
69 int flags, SDB **certdb, SDB **keydb, int *newInit); | 69 int flags, SDB **certdb, SDB **keydb, int *newInit); |
70 CK_RV s_shutdown(); | 70 CK_RV s_shutdown(); |
71 | 71 |
72 /* flags */ | 72 /* flags */ |
73 #define SDB_RDONLY 1 | 73 #define SDB_RDONLY 1 |
74 #define SDB_RDWR 2 | 74 #define SDB_RDWR 2 |
75 #define SDB_CREATE 4 | 75 #define SDB_CREATE 4 |
76 #define SDB_HAS_META 8 | 76 #define SDB_HAS_META 8 |
77 | 77 |
78 #endif | 78 #endif |
OLD | NEW |