mirror of https://github.com/Icinga/icinga2.git
CreateCertIcingaCA(EVP_PKEY*, X509_NAME*): enable optional CA creation
This commit is contained in:
parent
dc338a406a
commit
7b55df6f11
|
@ -714,7 +714,7 @@ String GetIcingaCADir()
|
|||
return Configuration::DataDir + "/ca";
|
||||
}
|
||||
|
||||
std::shared_ptr<X509> CreateCertIcingaCA(EVP_PKEY *pubkey, X509_NAME *subject)
|
||||
std::shared_ptr<X509> CreateCertIcingaCA(EVP_PKEY *pubkey, X509_NAME *subject, bool ca)
|
||||
{
|
||||
char errbuf[256];
|
||||
|
||||
|
@ -751,7 +751,7 @@ std::shared_ptr<X509> CreateCertIcingaCA(EVP_PKEY *pubkey, X509_NAME *subject)
|
|||
EVP_PKEY *privkey = EVP_PKEY_new();
|
||||
EVP_PKEY_assign_RSA(privkey, rsa);
|
||||
|
||||
return CreateCert(pubkey, subject, X509_get_subject_name(cacert.get()), privkey, false);
|
||||
return CreateCert(pubkey, subject, X509_get_subject_name(cacert.get()), privkey, ca);
|
||||
}
|
||||
|
||||
std::shared_ptr<X509> CreateCertIcingaCA(const std::shared_ptr<X509>& cert)
|
||||
|
|
|
@ -61,7 +61,7 @@ String GetIcingaCADir();
|
|||
String CertificateToString(const std::shared_ptr<X509>& cert);
|
||||
|
||||
std::shared_ptr<X509> StringToCertificate(const String& cert);
|
||||
std::shared_ptr<X509> CreateCertIcingaCA(EVP_PKEY *pubkey, X509_NAME *subject);
|
||||
std::shared_ptr<X509> CreateCertIcingaCA(EVP_PKEY *pubkey, X509_NAME *subject, bool ca = false);
|
||||
std::shared_ptr<X509> CreateCertIcingaCA(const std::shared_ptr<X509>& cert);
|
||||
bool IsCertUptodate(const std::shared_ptr<X509>& cert);
|
||||
bool IsCaUptodate(X509* cert);
|
||||
|
|
Loading…
Reference in New Issue