From c4ab080b882c5a56fabb2d4959ad0f421c557a9f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 21 Oct 2021 10:21:53 -0700 Subject: [PATCH] doc: format BUILDING.md --- BUILDING.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/BUILDING.md b/BUILDING.md index be5c646110b4d3..201d6c274279e2 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -783,6 +783,7 @@ dynamically linking with OpenSSL 3.0.0 by using the configuration flag ### FIPS support when statically linking OpenSSL FIPS can be supported by specifying the configuration flag `--openssl-is-fips`: + ```console $ ./configure --openssl-is-fips $ make -j8 @@ -795,23 +796,30 @@ to include the correct path to fipsmodule.cnf and finally uncomment the fips section. We can then run node specifying `--enable-fips`: + ```console $ ./node --enable-fips -p 'crypto.getFips()' 1 ``` + The above will use the Node.js default locations for OpenSSL 3.0: + ```console $ ./out/Release/openssl-cli version -m -d OPENSSLDIR: "/nodejs/openssl/out/Release/obj.target/deps/openssl" MODULESDIR: "/nodejs/openssl/out/Release/obj.target/deps/openssl/lib/openssl-modules" ``` + The OpenSSL configuration files will be found in `OPENSSLDIR` directory above: + ```console $ ls -w 1 out/Release/obj.target/deps/openssl/*.cnf out/Release/obj.target/deps/openssl/fipsmodule.cnf out/Release/obj.target/deps/openssl/openssl.cnf ``` + And the FIPS module will be located in the `MODULESDIR` directory: + ```console $ ls out/Release/obj.target/deps/openssl/lib/openssl-modules/ fips.so