diff options
author | Eric Milkie <milkie@10gen.com> | 2013-02-26 19:30:20 -0500 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2013-02-26 19:30:25 -0500 |
commit | a61095252979abc4793bfe1c72e2e4bb9790c49f (patch) | |
tree | 6f9d9af88c910be6cce62fbbf1e213a052a63ab3 | |
parent | f396ed2f582b17e0aeac263ca55242b699e7fc27 (diff) | |
download | mongo-a61095252979abc4793bfe1c72e2e4bb9790c49f.tar.gz |
SERVER-8709 stricted command line parsing
-rw-r--r-- | src/mongo/db/cmdline.cpp | 7 |
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; } |