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

Side by Side Diff: nss/lib/softoken/sftkdbti.h

Issue 2078763002: Delete bundled copy of NSS and replace with README. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss@master
Patch Set: Delete bundled copy of NSS and replace with README. Created 4 years, 6 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
« no previous file with comments | « nss/lib/softoken/sftkdbt.h ('k') | nss/lib/softoken/sftkhmac.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 #ifndef SFTKDBTI_H
6 #define SFTKDBTI_H 1
7
8 /*
9 * private defines
10 */
11 struct SFTKDBHandleStr {
12 SDB *db;
13 PRInt32 ref;
14 CK_OBJECT_HANDLE type;
15 SECItem passwordKey;
16 SECItem *newKey;
17 SECItem *oldKey;
18 SECItem *updatePasswordKey;
19 PZLock *passwordLock;
20 SFTKDBHandle *peerDB;
21 SDB *update;
22 char *updateID;
23 PRBool updateDBIsInit;
24 };
25
26 #define SFTK_KEYDB_TYPE 0x40000000
27 #define SFTK_CERTDB_TYPE 0x00000000
28 #define SFTK_OBJ_TYPE_MASK 0xc0000000
29 #define SFTK_OBJ_ID_MASK (~SFTK_OBJ_TYPE_MASK)
30 #define SFTK_TOKEN_TYPE 0x80000000
31
32 /* the following is the number of id's to handle on the stack at a time,
33 * it's not an upper limit of IDS that can be stored in the database */
34 #define SFTK_MAX_IDS 10
35
36 #define SFTK_GET_SDB(handle) \
37 ((handle)->update ? (handle)->update : (handle)->db)
38
39 SECStatus sftkdb_DecryptAttribute(SECItem *passKey, SECItem *cipherText,
40 SECItem **plainText);
41 SECStatus sftkdb_EncryptAttribute(PLArenaPool *arena, SECItem *passKey,
42 SECItem *plainText, SECItem **cipherText);
43 SECStatus sftkdb_SignAttribute(PLArenaPool *arena, SECItem *passKey,
44 CK_OBJECT_HANDLE objectID,
45 CK_ATTRIBUTE_TYPE attrType,
46 SECItem *plainText, SECItem **sigText);
47 SECStatus sftkdb_VerifyAttribute(SECItem *passKey,
48 CK_OBJECT_HANDLE objectID,
49 CK_ATTRIBUTE_TYPE attrType,
50 SECItem *plainText, SECItem *sigText);
51
52 void sftk_ULong2SDBULong(unsigned char *data, CK_ULONG value);
53 CK_RV sftkdb_Update(SFTKDBHandle *handle, SECItem *key);
54 CK_RV sftkdb_PutAttributeSignature(SFTKDBHandle *handle,
55 SDB *keyTarget, CK_OBJECT_HANDLE objectID,
56 CK_ATTRIBUTE_TYPE type, SECItem *signText);
57
58
59
60 #endif
OLDNEW
« no previous file with comments | « nss/lib/softoken/sftkdbt.h ('k') | nss/lib/softoken/sftkhmac.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698