2019-02-25 08:48:22 -05:00
|
|
|
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
|
2014-10-06 08:21:18 -04:00
|
|
|
|
2014-10-13 07:43:05 -04:00
|
|
|
#include "cli/pkinewcacommand.hpp"
|
2017-09-05 08:44:56 -04:00
|
|
|
#include "remote/pkiutility.hpp"
|
2014-10-19 08:21:12 -04:00
|
|
|
#include "base/logger.hpp"
|
2014-10-06 08:21:18 -04:00
|
|
|
|
|
|
|
|
using namespace icinga;
|
|
|
|
|
|
2014-10-13 07:43:05 -04:00
|
|
|
REGISTER_CLICOMMAND("pki/new-ca", PKINewCACommand);
|
2014-10-06 08:21:18 -04:00
|
|
|
|
2018-01-03 22:25:35 -05:00
|
|
|
String PKINewCACommand::GetDescription() const
|
2014-10-06 08:21:18 -04:00
|
|
|
{
|
|
|
|
|
return "Sets up a new Certificate Authority.";
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-03 22:25:35 -05:00
|
|
|
String PKINewCACommand::GetShortDescription() const
|
2014-10-06 08:21:18 -04:00
|
|
|
{
|
|
|
|
|
return "sets up a new CA";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2014-10-13 07:43:05 -04:00
|
|
|
* The entry point for the "pki new-ca" CLI command.
|
2014-10-06 08:21:18 -04:00
|
|
|
*
|
|
|
|
|
* @returns An exit status.
|
|
|
|
|
*/
|
2026-01-23 07:31:01 -05:00
|
|
|
int PKINewCACommand::Run(const boost::program_options::variables_map&, [[maybe_unused]] const std::vector<std::string>& ap) const
|
2014-10-06 08:21:18 -04:00
|
|
|
{
|
2014-10-21 07:54:25 -04:00
|
|
|
return PkiUtility::NewCa();
|
2014-10-06 08:21:18 -04:00
|
|
|
}
|