This commit is contained in:
@@ -145,7 +145,7 @@ bool CertManager::generateCA()
|
||||
X509_gmtime_adj(X509_get_notBefore(cert.get()), 0);
|
||||
X509_gmtime_adj(X509_get_notAfter(cert.get()), 31536000L); // 1 year
|
||||
|
||||
X509_NAME* subjName = X509_get_subject_name(cert.get());
|
||||
X509_name_st* subjName = X509_get_subject_name(cert.get());
|
||||
std::string randomCN = utils::randomizeString(16);
|
||||
X509_NAME_add_entry_by_txt(subjName, "CN", MBSTRING_ASC, (unsigned char*)randomCN.c_str(), -1, -1, 0);
|
||||
X509_set_issuer_name(cert.get(), subjName);
|
||||
@@ -198,7 +198,7 @@ SSL_CTX* CertManager::createHostContext(const std::string& host)
|
||||
X509_gmtime_adj(X509_get_notBefore(cert.get()), 0);
|
||||
X509_gmtime_adj(X509_get_notAfter(cert.get()), 31536000L);
|
||||
|
||||
X509_NAME* subjName = X509_get_subject_name(cert.get());
|
||||
X509_name_st* subjName = X509_get_subject_name(cert.get());
|
||||
X509_NAME_add_entry_by_txt(subjName, "CN", MBSTRING_ASC, (unsigned char*)host.c_str(), -1, -1, 0);
|
||||
X509_set_issuer_name(cert.get(), X509_get_subject_name(_caCert));
|
||||
X509_set_pubkey(cert.get(), _sessionPkey);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <mutex>
|
||||
|
||||
struct x509_st;
|
||||
struct X509_name_st;
|
||||
struct ssl_st;
|
||||
struct ssl_ctx_st;
|
||||
struct evp_pkey_st;
|
||||
|
||||
Reference in New Issue
Block a user