[Pkg-fedora-ds-maintainers] [libapache2-mod-nss] 51/156: Fix command-line argument miscounting caused by the addition of the FIPS flag. The result was that the database prefix was always missed.
Timo Aaltonen
tjaalton-guest at moszumanska.debian.org
Wed Jul 2 13:55:27 UTC 2014
This is an automated email from the git hooks/post-receive script.
tjaalton-guest pushed a commit to branch master
in repository libapache2-mod-nss.
commit d4cb1bb2095b03b502e2fd70f3c05d87ea01f9a2
Author: rcritten <>
Date: Fri Nov 18 16:10:23 2005 +0000
Fix command-line argument miscounting caused by the addition of the
FIPS flag. The result was that the database prefix was always
missed.
Also check the return value of NSS_Initialize() and print and exit if
the database is not opened.
---
nss_pcache.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/nss_pcache.c b/nss_pcache.c
index e1c51b1..65a7a02 100644
--- a/nss_pcache.c
+++ b/nss_pcache.c
@@ -319,7 +319,12 @@ 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(argv[2], argc == 3 ? argv[3] : NULL, argc == 3 ? argv[3] : NULL, "secmod.db", NSS_INIT_READONLY);
+ rv = NSS_Initialize(argv[2], argc == 4 ? argv[3] : NULL, argc == 4 ? argv[3] : NULL, "secmod.db", NSS_INIT_READONLY);
+
+ if (rv != SECSuccess) {
+ fprintf(stderr, "Unable to initialize NSS database: %d\n", rv);
+ exit(1);
+ }
if (fipsmode) {
if (!PK11_IsFIPS()) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-fedora-ds/libapache2-mod-nss.git
More information about the Pkg-fedora-ds-maintainers
mailing list