代码拉取完成,页面将自动刷新
#include <openssl/ossl_typ.h>
#include <openssl/x509.h>
#include <openssl/x509_vfy.h>
#include <memory>
#include <string>
namespace phosphor::certs
{
/** @brief Creates an X509 Store from the given certSrcPath
* Creates an X509 Store, adds a lookup file to the store from the given source
* certificate, and returns it
* @param[in] certSrcPath - the file path to a list of trusted certificates
*
*/
std::unique_ptr<X509_STORE, decltype(&::X509_STORE_free)>
getX509Store(const std::string& certSrcPath);
/** @brief Loads Certificate file into the X509 structure.
* @param[in] filePath - Certificate and key full file path.
* @return pointer to the X509 structure.
*/
std::unique_ptr<X509, decltype(&::X509_free)>
loadCert(const std::string& filePath);
/**
* @brief Parses the certificate and throws error if certificate NotBefore date
* is lt 1970
* @param[in] cert Reference to certificate object uploaded
* @return void
*/
void validateCertificateStartDate(X509& cert);
/**
* @brief Validates the certificate against the trusted certificates store and
* throws error if certificate is not valid
* @param[in] x509Store Reference to trusted certificates store
* @param[in] cert Reference to certificate to be validated
* @return void
*/
void validateCertificateAgainstStore(X509_STORE& x509Store, X509& cert);
/**
* @brief Validates the certificate can be used in an SSL context, otherwise,
* throws errors
* @param[in] cert Reference to certificate to be validated
* @return void
*/
void validateCertificateInSSLContext(X509& cert);
/**
* @brief Generates certificate ID based on provided certificate file.
*
* @param[in] cert - Certificate object.
*
* @return Certificate ID as formatted string.
*/
std::string generateCertId(X509& cert);
/** @brief Parses PEM string into the X509 structure.
* @param[in] pem - PEM encoded X509 certificate buffer.
* @return pointer to the X509 structure.
*/
std::unique_ptr<X509, decltype(&::X509_free)> parseCert(const std::string& pem);
} // namespace phosphor::certs
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。