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 * The following code handles the storage of PKCS 11 modules used by the | 5 * The following code handles the storage of PKCS 11 modules used by the |
6 * NSS. For the rest of NSS, only one kind of database handle exists: | 6 * NSS. For the rest of NSS, only one kind of database handle exists: |
7 * | 7 * |
8 * SFTKDBHandle | 8 * SFTKDBHandle |
9 * | 9 * |
10 * There is one SFTKDBHandle for the each key database and one for each cert | 10 * There is one SFTKDBHandle for the each key database and one for each cert |
11 * database. These databases are opened as associated pairs, one pair per | 11 * database. These databases are opened as associated pairs, one pair per |
12 * slot. SFTKDBHandles are reference counted objects. | 12 * slot. SFTKDBHandles are reference counted objects. |
13 * | 13 * |
14 * Each SFTKDBHandle points to a low level database handle (SDB). This handle | 14 * Each SFTKDBHandle points to a low level database handle (SDB). This handle |
15 * represents the underlying physical database. These objects are not | 15 * represents the underlying physical database. These objects are not |
16 * reference counted, an are 'owned' by their respective SFTKDBHandles. | 16 * reference counted, an are 'owned' by their respective SFTKDBHandles. |
17 * | 17 * |
18 * | 18 * |
19 */ | 19 */ |
20 #include "sftkdb.h" | 20 #include "sftkdb.h" |
21 #include "sftkdbti.h" | 21 #include "sftkdbti.h" |
22 #include "pkcs11t.h" | 22 #include "pkcs11t.h" |
23 #include "pkcs11i.h" | 23 #include "pkcs11i.h" |
24 #include "sdb.h" | 24 #include "sdb.h" |
25 #include "prprf.h" | 25 #include "prprf.h" |
26 #include "secmodt.h" | 26 #include "secasn1.h" |
27 #include "sftkpars.h" | |
28 #include "pratom.h" | 27 #include "pratom.h" |
29 #include "blapi.h" | 28 #include "blapi.h" |
30 #include "secoid.h" | 29 #include "secoid.h" |
31 #include "sechash.h" | |
32 #include "lowpbe.h" | 30 #include "lowpbe.h" |
33 #include "secdert.h" | 31 #include "secdert.h" |
34 #include "prsystem.h" | 32 #include "prsystem.h" |
35 #include "lgglue.h" | 33 #include "lgglue.h" |
36 #include "secerr.h" | 34 #include "secerr.h" |
37 #include "softoken.h" | 35 #include "softoken.h" |
38 | 36 |
39 /****************************************************************** | 37 /****************************************************************** |
40 * | 38 * |
41 * Key DB password handling functions | 39 * Key DB password handling functions |
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1268 oldKey.data = NULL; | 1266 oldKey.data = NULL; |
1269 oldKey.len = 0; | 1267 oldKey.len = 0; |
1270 sftkdb_switchKeys(keydb, &oldKey); | 1268 sftkdb_switchKeys(keydb, &oldKey); |
1271 if (oldKey.data) { | 1269 if (oldKey.data) { |
1272 PORT_ZFree(oldKey.data, oldKey.len); | 1270 PORT_ZFree(oldKey.data, oldKey.len); |
1273 } | 1271 } |
1274 return SECSuccess; | 1272 return SECSuccess; |
1275 } | 1273 } |
1276 | 1274 |
1277 | 1275 |
OLD | NEW |