Resolves bug 206971 - selfserv should OptimizeSpeed (use NSS_Initialize).

Both selfserv and strsclnt no longer OptimizeSpace.  Moved SECMOD_DB
defines from nssinit.c to nss.h, make it availble for public use with
NSS_Initialize().
This commit is contained in:
kirk.erickson%sun.com 2003-05-30 17:25:13 +00:00
parent a0b7ac4a4d
commit 52f15c0d08
4 changed files with 10 additions and 9 deletions

View File

@ -1638,7 +1638,7 @@ main(int argc, char **argv)
PK11_SetPasswordFunc( passwd ? ownPasswd : SECU_GetModulePassword);
/* Call the libsec initialization routines */
rv = NSS_Init(dir);
rv = NSS_Initialize(dir, "", "", SECMOD_DB, NSS_INIT_READONLY);
if (rv != SECSuccess) {
fputs("NSS_Init failed.\n", stderr);
exit(8);

View File

@ -1279,7 +1279,7 @@ main(int argc, char **argv)
}
/* Call the libsec initialization routines */
rv = NSS_Init(dir);
rv = NSS_Initialize(dir, "", "", SECMOD_DB, NSS_INIT_READONLY);
if (rv != SECSuccess) {
fputs("NSS_Init failed.\n", stderr);
exit(1);

View File

@ -32,7 +32,7 @@
* may use your version of this file under either the MPL or the
* GPL.
*
* $Id: nss.h,v 1.27 2003/04/08 00:29:54 wtc%netscape.com Exp $
* $Id: nss.h,v 1.28 2003/05/30 17:25:12 kirk.erickson%sun.com Exp $
*/
#ifndef __nss_h_
@ -122,6 +122,12 @@ extern SECStatus NSS_InitReadWrite(const char *configdir);
#define NSS_INIT_NOROOTINIT 0x10
#define NSS_INIT_OPTIMIZESPACE 0x20
#ifdef macintosh
#define SECMOD_DB "Security Modules"
#else
#define SECMOD_DB "secmod.db"
#endif
extern SECStatus NSS_Initialize(const char *configdir,
const char *certPrefix, const char *keyPrefix,
const char *secmodName, PRUint32 flags);

View File

@ -32,7 +32,7 @@
* may use your version of this file under either the MPL or the
* GPL.
*
# $Id: nssinit.c,v 1.62 2003/02/28 21:13:15 ian.mcgreer%sun.com Exp $
# $Id: nssinit.c,v 1.63 2003/05/30 17:25:13 kirk.erickson%sun.com Exp $
*/
#include <ctype.h>
@ -78,11 +78,6 @@ nss_mktemp(char *path)
sizeof("noModDB")+sizeof("forceOpen")+sizeof("passwordRequired")+ \
sizeof ("optimizeSpace")
#define NSS_DEFAULT_MOD_NAME "NSS Internal Module"
#ifdef macintosh
#define SECMOD_DB "Security Modules"
#else
#define SECMOD_DB "secmod.db"
#endif
static char *
nss_makeFlags(PRBool readOnly, PRBool noCertDB,