diff options
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/commands/server_status.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mongo/db/commands/server_status.cpp b/src/mongo/db/commands/server_status.cpp index e5d9a791589..49a4cacb303 100644 --- a/src/mongo/db/commands/server_status.cpp +++ b/src/mongo/db/commands/server_status.cpp @@ -43,6 +43,7 @@ #include "mongo/db/stats/counters.h" #include "mongo/platform/process_id.h" #include "mongo/util/net/listen.h" +#include "mongo/util/net/ssl_manager.h" #include "mongo/util/processinfo.h" #include "mongo/util/ramlog.h" #include "mongo/util/version.h" @@ -257,6 +258,24 @@ namespace mongo { } network; +#ifdef MONGO_SSL + class Security : public ServerStatusSection { + public: + Security() : ServerStatusSection( "security" ) {} + virtual bool includeByDefault() const { return true; } + + BSONObj generateSection(const BSONElement& configElement) const { + BSONObjBuilder security; + if (getSSLManager()) { + security.appendDate( "SSLCertificateExpirationDate", + getSSLManager()->getServerCertificateExpirationDate() ); + } + + return security.obj(); + } + } security; +#endif + class MemBase : public ServerStatusMetric { public: MemBase() : ServerStatusMetric(".mem.bits") {} |