summaryrefslogtreecommitdiff
path: root/ext/net/02_tls.js
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2024-04-24 14:27:15 -0400
committerGitHub <noreply@github.com>2024-04-24 14:27:15 -0400
commitda70608700274392a8f134735ac3701eecd6cfa7 (patch)
treeb977ecacc2d6cf64110d0d53ba7063a48753f781 /ext/net/02_tls.js
parenteed2598e6cf1db643b4edd07b5eff94c59eb9408 (diff)
fix(ext/net): check for TLS using undefined rather than using ReflectHas (#23538)
Fixes #23537
Diffstat (limited to 'ext/net/02_tls.js')
-rw-r--r--ext/net/02_tls.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/net/02_tls.js b/ext/net/02_tls.js
index b77b92e26..0b775047f 100644
--- a/ext/net/02_tls.js
+++ b/ext/net/02_tls.js
@@ -15,7 +15,6 @@ import {
const {
Number,
ObjectDefineProperty,
- ReflectHas,
TypeError,
} = primordials;
@@ -134,10 +133,10 @@ class TlsListener extends Listener {
* interfaces.
*/
function hasTlsKeyPairOptions(options) {
- return (ReflectHas(options, "cert") || ReflectHas(options, "key") ||
- ReflectHas(options, "certFile") ||
- ReflectHas(options, "keyFile") || ReflectHas(options, "privateKey") ||
- ReflectHas(options, "certChain"));
+ return (options.cert !== undefined || options.key !== undefined ||
+ options.certFile !== undefined ||
+ options.keyFile !== undefined || options.privateKey !== undefined ||
+ options.certChain !== undefined);
}
/**