mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-01 01:12:59 -05:00
Prevent segfault when X509_get_default_cert_file_env() environment variable is not set (#16128)
This commit is contained in:
1 parent
c7e7fa2a0b
commit
b3490a1cdc
1 file changed
+3
-4
@@ -947,13 +947,12 @@ std::string Http::tls_global_init()
|
||||
|
||||
std::string Http::tls_system_cert_store()
|
||||
{
|
||||
std::string ret;
|
||||
|
||||
#ifdef OPENSSL_CERT_OVERRIDE
|
||||
ret = ::getenv(X509_get_default_cert_file_env());
|
||||
if (const char *cert_file = ::getenv(X509_get_default_cert_file_env()))
|
||||
return cert_file;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string Http::url_encode(const std::string &str)
|
||||
|
||||
Reference in new issue
Block a user