fix: X509_NAME typedef compiler issue on gcc
Build / build (push) Successful in 3m18s

This commit is contained in:
2026-04-11 13:48:46 -03:00
parent 4a71bc6f1b
commit b8b24a5c30
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -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);
+1
View File
@@ -5,6 +5,7 @@
#include <mutex>
struct x509_st;
struct X509_name_st;
struct ssl_st;
struct ssl_ctx_st;
struct evp_pkey_st;