diff --git a/src/lib/net/SecureUtils.cpp b/src/lib/net/SecureUtils.cpp index d6e0d24b7..f47e4379a 100644 --- a/src/lib/net/SecureUtils.cpp +++ b/src/lib/net/SecureUtils.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -88,8 +89,9 @@ void generatePemSelfSignedCert(const QString &path, int keyLength) X509_set_issuer_name(cert, name); X509_sign(cert, privateKey, EVP_sha256()); + const QFile file(path); + const std::filesystem::path fsPath = file.filesystemFileName(); - const std::filesystem::path fsPath = path.toStdString(); #if defined(Q_OS_WIN) auto fp = _wfopen(fsPath.native().c_str(), L"w"); #else