summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2013-02-26 19:30:20 -0500
committerEric Milkie <milkie@10gen.com>2013-02-26 19:30:25 -0500
commita61095252979abc4793bfe1c72e2e4bb9790c49f (patch)
tree6f9d9af88c910be6cce62fbbf1e213a052a63ab3
parentf396ed2f582b17e0aeac263ca55242b699e7fc27 (diff)
downloadmongo-a61095252979abc4793bfe1c72e2e4bb9790c49f.tar.gz
SERVER-8709 stricted command line parsing
-rw-r--r--src/mongo/db/cmdline.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/cmdline.cpp b/src/mongo/db/cmdline.cpp
index 253181d3f1d..0dea50faeef 100644
--- a/src/mongo/db/cmdline.cpp
+++ b/src/mongo/db/cmdline.cpp
@@ -418,7 +418,7 @@ namespace {
if (params.count("sslOnNormalPorts")) {
cmdLine.sslOnNormalPorts = true;
if ( cmdLine.sslPEMKeyFile.size() == 0 ) {
- log() << "need sslPEMKeyFile" << endl;
+ log() << "need sslPEMKeyFile with sslOnNormalPorts" << endl;
return false;
}
if (cmdLine.sslWeakCertificateValidation &&
@@ -426,6 +426,11 @@ namespace {
log() << "need sslCAFile with sslWeakCertificateValidation" << endl;
return false;
}
+ if (!cmdLine.sslCRLFile.empty() &&
+ cmdLine.sslCAFile.empty()) {
+ log() << "need sslCAFile with sslCRLFile" << endl;
+ return false;
+ }
if (params.count("sslFIPSMode")) {
cmdLine.sslFIPSMode = true;
}