summaryrefslogtreecommitdiffstats
path: root/nss_pcache.c
diff options
context:
space:
mode:
authorrcritten <>2005-05-20 21:21:04 +0000
committerrcritten <>2005-05-20 21:21:04 +0000
commite5a4f202262ae20b5d7e7ae39ec39e59fe94f505 (patch)
tree626420800c8b6a92cf716b0fbb31948cc821c259 /nss_pcache.c
parentaabd41a7fa3f5f98c49288b6f6d352e9f858ca3c (diff)
downloadmod_nss-e5a4f202262ae20b5d7e7ae39ec39e59fe94f505.tar.gz
mod_nss-e5a4f202262ae20b5d7e7ae39ec39e59fe94f505.tar.xz
mod_nss-e5a4f202262ae20b5d7e7ae39ec39e59fe94f505.zip
The path to the cert database was hardcoded, use the value passed in
by Apache.
Diffstat (limited to 'nss_pcache.c')
-rw-r--r--nss_pcache.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nss_pcache.c b/nss_pcache.c
index 40ecadf..5912c02 100644
--- a/nss_pcache.c
+++ b/nss_pcache.c
@@ -297,6 +297,11 @@ int main(int argc, char ** argv)
char * tokenName;
char * tokenpw;
+ if (argc != 2) {
+ fprintf(stderr, "Usage: nss_pcache <directory>\n");
+ exit(1);
+ }
+
/* Initialize NSPR */
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 256);
@@ -304,7 +309,7 @@ int main(int argc, char ** argv)
PK11_ConfigurePKCS11(NULL,NULL,NULL, INTERNAL_TOKEN_NAME, NULL, NULL,NULL,NULL,8,1);
/* Initialize NSS and open the certificate database read-only. */
- rv = NSS_Initialize("/home/rcrit/redhat/apache//conf/nss/", NULL, NULL, "secmod.db", NSS_INIT_READONLY);
+ rv = NSS_Initialize(argv[1], NULL, NULL, "secmod.db", NSS_INIT_READONLY);
in = PR_GetSpecialFD(PR_StandardInput);
out = PR_GetSpecialFD(PR_StandardOutput);