File tree 1 file changed +16
-2
lines changed
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 5
5
// This file provides native crypto hooks for OpenSSL 3 (the default since Node.js 18),
6
6
// allowing us to skip expensive round-trips between JS and C++.
7
7
8
+ #include " mongocrypt.h"
9
+
10
+ // Electron does not expose OpenSSL, so we cannot use OpenSSL
11
+ // functions directly if we're building against Electron:
12
+ // https://github.com/electron/electron/issues/13176
13
+ #ifndef ELECTRON_ENSURE_CONFIG_GYPI
8
14
#include < openssl/crypto.h>
9
15
#include < openssl/err.h>
10
16
#include < openssl/evp.h>
13
19
14
20
#include < stdexcept>
15
21
16
- #include " mongocrypt.h"
17
-
18
22
#ifdef _WIN32
19
23
#include < windows.h>
20
24
#else
@@ -441,3 +445,13 @@ std::unique_ptr<CryptoHooks> createOpenSSLCryptoHooks() {
441
445
442
446
} // namespace opensslcrypto
443
447
} // namespace node_mongocrypt
448
+
449
+ #else // ELECTRON_ENSURE_CONFIG_GYPI
450
+ namespace node_mongocrypt {
451
+ namespace opensslcrypto {
452
+ std::unique_ptr<CryptoHooks> createOpenSSLCryptoHooks () {
453
+ return {};
454
+ }
455
+ }
456
+ }
457
+ #endif // ELECTRON_ENSURE_CONFIG_GYPI
You can’t perform that action at this time.
0 commit comments