Skip to content

Commit

Permalink
doc: format BUILDING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Oct 21, 2021
1 parent 418932f commit fd5285f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions BUILDING.md
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit fd5285f

Please sign in to comment.