Skip to content

Commit 7ce7404

Browse files
Caleb ツ Everettruyadorno
Caleb ツ Everett
authored andcommitted
build: fix compiling against openssl with no-psk
Node 15 prior to this commit will not compile if openssl is built with no-psk. Compiling emits an error like this: ``` crypto_tls.cc:(.text+0x4c27): undefined reference to `node::crypto::TLSWrap::SetCACerts(node::crypto::SecureContext*)' ``` Blame on crypto_tls.cc shows the file was created in a refactor. Before that refactor SetCACerts was defined outside OPENSSL_NO_PSK ifndef. PR-URL: #36881 Fixes: #36464 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
1 parent 70ee7dc commit 7ce7404

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/crypto/crypto_tls.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1339,8 +1339,6 @@ int TLSWrap::SelectSNIContextCallback(SSL* s, int* ad, void* arg) {
13391339
return SSL_TLSEXT_ERR_OK;
13401340
}
13411341

1342-
#ifndef OPENSSL_NO_PSK
1343-
13441342
int TLSWrap::SetCACerts(SecureContext* sc) {
13451343
int err = SSL_set1_verify_cert_store(
13461344
ssl_.get(), SSL_CTX_get_cert_store(sc->ctx_.get()));
@@ -1355,6 +1353,8 @@ int TLSWrap::SetCACerts(SecureContext* sc) {
13551353
return 1;
13561354
}
13571355

1356+
#ifndef OPENSSL_NO_PSK
1357+
13581358
void TLSWrap::SetPskIdentityHint(const FunctionCallbackInfo<Value>& args) {
13591359
TLSWrap* p;
13601360
ASSIGN_OR_RETURN_UNWRAP(&p, args.Holder());

0 commit comments

Comments
 (0)