加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
csr.hpp 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
#pragma once
#include <sdbusplus/server/object.hpp>
#include <xyz/openbmc_project/Certs/CSR/server.hpp>
#include <string>
namespace phosphor::certs
{
enum class Status
{
success,
failure,
};
namespace internal
{
using CSRInterface = sdbusplus::server::object_t<
sdbusplus::xyz::openbmc_project::Certs::server::CSR>;
}
/** @class CSR
* @brief To read CSR certificate
*/
class CSR : public internal::CSRInterface
{
public:
CSR() = delete;
~CSR() = default;
CSR(const CSR&) = delete;
CSR& operator=(const CSR&) = delete;
CSR(CSR&&) = delete;
CSR& operator=(CSR&&) = delete;
/** @brief Constructor to put object onto bus at a D-Bus path.
* @param[in] bus - Bus to attach to.
* @param[in] path - The D-Bus object path to attach at.
* @param[in] installPath - Certificate installation path.
* @param[in] status - Status of Generate CSR request
*/
CSR(sdbusplus::bus_t& bus, const char* path, std::string&& installPath,
const Status& status);
/** @brief Return CSR
*/
std::string csr() override;
private:
/** @brief object path */
std::string objectPath;
/** @brief Certificate file installation path **/
std::string certInstallPath;
/** @brief Status of GenerateCSR request */
Status csrStatus;
};
} // namespace phosphor::certs
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化