security/nss/lib/softoken/legacydb/cdbhdl.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4 /*
michael@0 5 * cdbhdl.h - certificate database handle
michael@0 6 * private to the certdb module
michael@0 7 */
michael@0 8 #ifndef _CDBHDL_H_
michael@0 9 #define _CDBHDL_H_
michael@0 10
michael@0 11 #include "nspr.h"
michael@0 12 #include "mcom_db.h"
michael@0 13 #include "pcertt.h"
michael@0 14 #include "prtypes.h"
michael@0 15
michael@0 16 /*
michael@0 17 * Handle structure for open certificate databases
michael@0 18 */
michael@0 19 struct NSSLOWCERTCertDBHandleStr {
michael@0 20 DB *permCertDB;
michael@0 21 PZMonitor *dbMon;
michael@0 22 PRBool dbVerify;
michael@0 23 PRInt32 ref; /* reference count */
michael@0 24 };
michael@0 25
michael@0 26 #ifdef DBM_USING_NSPR
michael@0 27 #define NO_RDONLY PR_RDONLY
michael@0 28 #define NO_RDWR PR_RDWR
michael@0 29 #define NO_CREATE (PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE)
michael@0 30 #else
michael@0 31 #define NO_RDONLY O_RDONLY
michael@0 32 #define NO_RDWR O_RDWR
michael@0 33 #define NO_CREATE (O_RDWR | O_CREAT | O_TRUNC)
michael@0 34 #endif
michael@0 35
michael@0 36 typedef DB * (*rdbfunc)(const char *appName, const char *prefix,
michael@0 37 const char *type, int flags);
michael@0 38 typedef int (*rdbstatusfunc)(void);
michael@0 39
michael@0 40 #define RDB_FAIL 1
michael@0 41 #define RDB_RETRY 2
michael@0 42
michael@0 43 DB * rdbopen(const char *appName, const char *prefix,
michael@0 44 const char *type, int flags, int *status);
michael@0 45
michael@0 46 DB *dbsopen (const char *dbname , int flags, int mode, DBTYPE type,
michael@0 47 const void * appData);
michael@0 48 SECStatus db_Copy(DB *dest,DB *src);
michael@0 49 int db_InitComplete(DB *db);
michael@0 50
michael@0 51 #endif

mercurial