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 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1684 * shared library is already taken care of at the PKCS#11 level. | 1684 * shared library is already taken care of at the PKCS#11 level. |
1685 * If and when we add fork state to the sqlite shared library and extern | 1685 * If and when we add fork state to the sqlite shared library and extern |
1686 * interface, we will need to set it and reset it from here */ | 1686 * interface, we will need to set it and reset it from here */ |
1687 } | 1687 } |
1688 | 1688 |
1689 /* | 1689 /* |
1690 * initialize a single database | 1690 * initialize a single database |
1691 */ | 1691 */ |
1692 static const char INIT_CMD[] = | 1692 static const char INIT_CMD[] = |
1693 "CREATE TABLE %s (id PRIMARY KEY UNIQUE ON CONFLICT ABORT%s)"; | 1693 "CREATE TABLE %s (id PRIMARY KEY UNIQUE ON CONFLICT ABORT%s)"; |
1694 static const char ALTER_CMD[] = | |
1695 "ALTER TABLE %s ADD COLUMN a%x"; | |
1696 | 1694 |
1697 CK_RV | 1695 CK_RV |
1698 sdb_init(char *dbname, char *table, sdbDataType type, int *inUpdate, | 1696 sdb_init(char *dbname, char *table, sdbDataType type, int *inUpdate, |
1699 int *newInit, int flags, PRUint32 accessOps, SDB **pSdb) | 1697 int *newInit, int flags, PRUint32 accessOps, SDB **pSdb) |
1700 { | 1698 { |
1701 int i; | 1699 int i; |
1702 char *initStr = NULL; | 1700 char *initStr = NULL; |
1703 char *newStr; | 1701 char *newStr; |
1704 int inTransaction = 0; | 1702 int inTransaction = 0; |
1705 SDB *sdb = NULL; | 1703 SDB *sdb = NULL; |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2080 s_shutdown() | 2078 s_shutdown() |
2081 { | 2079 { |
2082 #ifdef SQLITE_UNSAFE_THREADS | 2080 #ifdef SQLITE_UNSAFE_THREADS |
2083 if (sqlite_lock) { | 2081 if (sqlite_lock) { |
2084 PR_DestroyLock(sqlite_lock); | 2082 PR_DestroyLock(sqlite_lock); |
2085 sqlite_lock = NULL; | 2083 sqlite_lock = NULL; |
2086 } | 2084 } |
2087 #endif | 2085 #endif |
2088 return CKR_OK; | 2086 return CKR_OK; |
2089 } | 2087 } |
OLD | NEW |