From 95926585a68f5649e733d4660334cf2744f3c087 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Sun, 30 Oct 2016 23:45:38 +1100 Subject: [PATCH] crypto: bypass FIPS_mode if not compiled for FIPS --- src/node_crypto.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 25cb003d39e90a..8f8a1d23fe915c 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -5866,11 +5866,15 @@ void SetEngine(const FunctionCallbackInfo& args) { #endif // !OPENSSL_NO_ENGINE void GetFipsCrypto(const FunctionCallbackInfo& args) { +#ifdef NODE_FIPS_MODE if (FIPS_mode()) { args.GetReturnValue().Set(1); } else { args.GetReturnValue().Set(0); } +#else + args.GetReturnValue().Set(0); +#endif // NODE_FIPS_MODE } void SetFipsCrypto(const FunctionCallbackInfo& args) {