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 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1871 sdb_p->lastUpdateTime = now; | 1871 sdb_p->lastUpdateTime = now; |
1872 /* set the cache delay time. This is how long we will wait before we | 1872 /* set the cache delay time. This is how long we will wait before we |
1873 * decide the existing cache is stale. Currently set to 10 sec */ | 1873 * decide the existing cache is stale. Currently set to 10 sec */ |
1874 sdb_p->updateInterval = PR_SecondsToInterval(10); | 1874 sdb_p->updateInterval = PR_SecondsToInterval(10); |
1875 sdb_p->dbMon = PR_NewMonitor(); | 1875 sdb_p->dbMon = PR_NewMonitor(); |
1876 /* these fields are protected by the lock */ | 1876 /* these fields are protected by the lock */ |
1877 sdb_p->sqlXactDB = NULL; | 1877 sdb_p->sqlXactDB = NULL; |
1878 sdb_p->sqlXactThread = NULL; | 1878 sdb_p->sqlXactThread = NULL; |
1879 sdb->private = sdb_p; | 1879 sdb->private = sdb_p; |
1880 sdb->version = 0; | 1880 sdb->version = 0; |
1881 sdb->sdb_type = SDB_SQL; | 1881 /*sdb->sdb_type = SDB_SQL; */ |
1882 sdb->sdb_flags = flags | SDB_HAS_META; | 1882 sdb->sdb_flags = flags | SDB_HAS_META; |
1883 sdb->app_private = NULL; | 1883 sdb->app_private = NULL; |
1884 sdb->sdb_FindObjectsInit = sdb_FindObjectsInit; | 1884 sdb->sdb_FindObjectsInit = sdb_FindObjectsInit; |
1885 sdb->sdb_FindObjects = sdb_FindObjects; | 1885 sdb->sdb_FindObjects = sdb_FindObjects; |
1886 sdb->sdb_FindObjectsFinal = sdb_FindObjectsFinal; | 1886 sdb->sdb_FindObjectsFinal = sdb_FindObjectsFinal; |
1887 sdb->sdb_GetAttributeValue = sdb_GetAttributeValue; | 1887 sdb->sdb_GetAttributeValue = sdb_GetAttributeValue; |
1888 sdb->sdb_SetAttributeValue = sdb_SetAttributeValue; | 1888 sdb->sdb_SetAttributeValue = sdb_SetAttributeValue; |
1889 sdb->sdb_CreateObject = sdb_CreateObject; | 1889 sdb->sdb_CreateObject = sdb_CreateObject; |
1890 sdb->sdb_DestroyObject = sdb_DestroyObject; | 1890 sdb->sdb_DestroyObject = sdb_DestroyObject; |
1891 sdb->sdb_GetMetaData = sdb_GetMetaData; | 1891 sdb->sdb_GetMetaData = sdb_GetMetaData; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2022 s_shutdown() | 2022 s_shutdown() |
2023 { | 2023 { |
2024 #ifdef SQLITE_UNSAFE_THREADS | 2024 #ifdef SQLITE_UNSAFE_THREADS |
2025 if (sqlite_lock) { | 2025 if (sqlite_lock) { |
2026 PR_DestroyLock(sqlite_lock); | 2026 PR_DestroyLock(sqlite_lock); |
2027 sqlite_lock = NULL; | 2027 sqlite_lock = NULL; |
2028 } | 2028 } |
2029 #endif | 2029 #endif |
2030 return CKR_OK; | 2030 return CKR_OK; |
2031 } | 2031 } |
OLD | NEW |