Skip to content

Commit d5d163d

Browse files
richardlautargos
authored andcommitted
build: export deprecated OpenSSL symbols on Windows
Methods such as `TLSv1_server_method` are categorized as `DEPRECATEDIN_1_1_0`. Add the deprecated categories to the list of categories to include passed to `mkssldef.py`. Adds a regression test to `test/addons/openssl-binding`. PR-URL: #25991 Refs: #20369 Refs: #25981 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent d7ae105 commit d5d163d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

node.gyp

+1-1
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@
709709
'-CAES,BF,BIO,DES,DH,DSA,EC,ECDH,ECDSA,ENGINE,EVP,HMAC,MD4,MD5,'
710710
'PSK,RC2,RC4,RSA,SHA,SHA0,SHA1,SHA256,SHA512,SOCK,STDIO,TLSEXT,'
711711
'FP_API,TLS1_METHOD,TLS1_1_METHOD,TLS1_2_METHOD,SCRYPT,OCSP,'
712-
'NEXTPROTONEG,RMD160,CAST',
712+
'NEXTPROTONEG,RMD160,CAST,DEPRECATEDIN_1_1_0,DEPRECATEDIN_1_2_0',
713713
# Defines.
714714
'-DWIN32',
715715
# Symbols to filter from the export list.

test/addons/openssl-binding/binding.cc

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <node.h>
22
#include <assert.h>
33
#include <openssl/rand.h>
4+
#include <openssl/ssl.h>
45

56
namespace {
67

@@ -28,6 +29,9 @@ inline void Initialize(v8::Local<v8::Object> exports,
2829
->GetFunction(context)
2930
.ToLocalChecked();
3031
assert(exports->Set(context, key, value).IsJust());
32+
33+
const SSL_METHOD* method = TLSv1_2_server_method();
34+
assert(method != nullptr);
3135
}
3236

3337
} // anonymous namespace

0 commit comments

Comments
 (0)