From 3ee83904a12de84e71d2ed79da1b081cf8843f00 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Mon, 6 Dec 2021 15:13:55 +0100 Subject: [PATCH] Windows rewrite when jfc since when is `c_str()` not convertible to `const char*`? --- src/Http.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http.cpp b/src/Http.cpp index 136facb..8f16cf4 100644 --- a/src/Http.cpp +++ b/src/Http.cpp @@ -199,7 +199,7 @@ X509* Http::Server::Tx509KeypairGenerator::GenerateCertificate(EVP_PKEY& PKey) { void Http::Server::Tx509KeypairGenerator::GenerateAndWriteToDisk(const fs::path& KeyFilePath, const fs::path& CertFilePath) { // todo: generate directories for ssl keys - FILE* KeyFile = std::fopen(KeyFilePath.c_str(), "wb"); + FILE* KeyFile = std::fopen(reinterpret_cast(KeyFilePath.c_str()), "wb"); if (!KeyFile) { beammp_error("Could not create file 'key.pem', check your permissions"); throw std::runtime_error("Could not create file 'key.pem'"); @@ -215,7 +215,7 @@ void Http::Server::Tx509KeypairGenerator::GenerateAndWriteToDisk(const fs::path& throw std::runtime_error("Could not write to file 'key.pem'"); } - FILE* CertFile = std::fopen(CertFilePath.c_str(), "wb"); // x509 file + FILE* CertFile = std::fopen(reinterpret_cast(CertFilePath.c_str()), "wb"); // x509 file if (!CertFile) { beammp_error("Could not create file 'cert.pem', check your permissions"); throw std::runtime_error("Could not create file 'cert.pem'");