diff options
author | nelsonb%netscape.com <devnull@localhost> | 2000-10-06 21:40:52 +0000 |
---|---|---|
committer | nelsonb%netscape.com <devnull@localhost> | 2000-10-06 21:40:52 +0000 |
commit | 22617e2d7d4ae28631e19bbbd313b295e6ae3dfd (patch) | |
tree | 9e2d354c72f399f2cb3482709d6e09152d026628 | |
parent | 3c1c8d7efbbe2a5e8ed56b10c00a0e3590064ec0 (diff) | |
download | nss-hg-22617e2d7d4ae28631e19bbbd313b295e6ae3dfd.tar.gz |
Call NSS_NoDB_Init instead of that broken old SECU_PKCS11Init.
Also, test to see that the init succeeded.
-rw-r--r-- | security/nss/cmd/pp/pp.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/security/nss/cmd/pp/pp.c b/security/nss/cmd/pp/pp.c index f4d108d57..3ed34a8a9 100644 --- a/security/nss/cmd/pp/pp.c +++ b/security/nss/cmd/pp/pp.c @@ -48,6 +48,7 @@ extern int fprintf(FILE *, char *, ...); #include "pk11func.h" #include "nspr.h" +#include "nss.h" static void Usage(char *progName) { @@ -126,10 +127,17 @@ int main(int argc, char **argv) if (!outFile) outFile = stdout; PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1); - SECU_PKCS11Init(PR_FALSE); - SEC_Init(); + rv = NSS_NoDB_Init(NULL); + if (rv != SECSuccess) { + fprintf(stderr, "%s: NSS_NoDB_Init failed\n", progName); + exit(1); + } rv = SECU_ReadDERFromFile(&der, inFile, ascii); + if (rv != SECSuccess) { + fprintf(stderr, "%s: SECU_ReadDERFromFile failed\n", progName); + exit(1); + } /* Data is untyped, using the specified type */ data.data = der.data; |