summaryrefslogtreecommitdiffstats
path: root/nss_engine_init.c
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2014-10-28 17:41:22 -0400
committerRob Crittenden <rcritten@redhat.com>2014-10-28 17:41:22 -0400
commitb5d1505fc81a33aa10d013efd247d00f631fc681 (patch)
treef840f8450cdd70b5143ad45eab6d87b3ef630492 /nss_engine_init.c
parent0d4c4e31e3f55473569c4e937f432d6f20c9d6be (diff)
downloadmod_nss-b5d1505fc81a33aa10d013efd247d00f631fc681.tar.gz
mod_nss-b5d1505fc81a33aa10d013efd247d00f631fc681.tar.xz
mod_nss-b5d1505fc81a33aa10d013efd247d00f631fc681.zip
Add support for sqlite NSS databases
We do a chdir() to the NSS database location so that libnssckbi.so is available when the database is opened. Strip off a sql: prefix if one is available. This allows the new sqlite format to work. Add an additional test pass configuring NSS using the sqlite format. This requires a bit of a hack to pass in the value to python but it will work for now. Resolves: #1057650
Diffstat (limited to 'nss_engine_init.c')
-rw-r--r--nss_engine_init.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nss_engine_init.c b/nss_engine_init.c
index 2569c8d..50b623d 100644
--- a/nss_engine_init.c
+++ b/nss_engine_init.c
@@ -145,6 +145,7 @@ static void nss_init_SSLLibrary(server_rec *base_server)
int fipsenabled = FALSE;
int ocspenabled = FALSE;
int ocspdefault = FALSE;
+ char *dbdir = NULL;
const char * ocspurl = NULL;
const char * ocspname = NULL;
@@ -186,7 +187,11 @@ static void nss_init_SSLLibrary(server_rec *base_server)
else
return;
}
- if (chdir(mc->pCertificateDatabase) != 0) {
+ if (strncasecmp(mc->pCertificateDatabase, "sql:", 4) == 0)
+ dbdir = mc->pCertificateDatabase + 4;
+ else
+ dbdir = mc->pCertificateDatabase;
+ if (chdir(dbdir) != 0) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, base_server,
"Unable to change directory to %s", mc->pCertificateDatabase);
if (mc->nInitCount == 1)