Skip to content

Commit 27b12d8

Browse files
fix(tools): use condition compiler to avoid the compiler error in generate_cert.
1 parent 19f7eb8 commit 27b12d8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/generate_cert.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ bool generate_dh_params(const std::string &path, int bits = 2048) {
269269
return ok;
270270
}
271271

272+
272273
// Windows: Install CA to local machine trust store
274+
#ifdef _WIN32
273275
bool install_ca_windows(const std::string &ca_path) {
274276
// Fix CertOpenSystemStoreA call, use 0 instead of nullptr
275277
HANDLE hStore = CertOpenSystemStoreA(0, "ROOT");
@@ -321,6 +323,7 @@ bool install_ca_windows(const std::string &ca_path) {
321323
CertCloseStore(hStore, 0);
322324
return ok;
323325
}
326+
#endif
324327

325328
// Linux: Install CA to system trust store
326329
bool install_ca_linux(const std::string &ca_path) {

0 commit comments

Comments
 (0)