-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Compiling node with FIPS #2666
Comments
@nodejs/crypto |
If it helps, I also cloned 13.14.0 and didn't get the same error, but did get
the following:
… Traceback (most recent call last):
File "./configure", line 19, in <module>
from distutils.spawn import find_executable
ModuleNotFoundError: No module named 'distutils.spawn'
|
I've read the OpenSSL strategy document and noted that only node v6 and v8 are currently FIPS compatible (with openssl 1.0.2) so I tried Ubuntu 16 (with OpenSSL FIPS enabled) and attempted to build v8 but that fails too ( Any thoughts or pointers would be appreciated. |
By default Node.js will statically compile and use the version of OpenSSL in
You're running into nodejs/node#30189. |
@richardlau thank you sir, that's great information right there. So, I've gone ahead and just used
Forgive me, I'm not a programmer and not sure where I should go from here...
|
Sorry, I don't know why the compiler appears to have crashed. We use g++ 6.3 in our CI, so your version of g++ should be compatible. |
I usually see compilers crashing due to lack of memory, I'd give that a check. |
@sam-github Thanks Sam, I bumped up my VM to 4GB and the crashing has been resolved!
I'm trying to work out if this is a V8 issue or an OpenSSL configuration issue? |
https://github.com/nodejs/TSC/blob/master/OpenSSL-Strategy.md fips isn't supported for node 10 and later. see https://wiki.openssl.org/index.php/FIPS_module_2.0 Maybe if you build that, then build node 12 against it, it might work but I don't expect so. I've never done it, and its not supported, but YMMV. Your compile above failed because whatever you are building against doesn't have an openssl 1.1.1 compatible API, I'm not sure why. |
From what I can see, I'm wondering if Um ... 30mins later ... nope, it wasn't that... @sam-github : thanks for your continued responses - perhaps I'll try node 8 and see how well that works ... |
It at least was supported on Node.js 8. Not that Node.js or openssl of that vintage is supported, but the feature at least existed. |
Ok, so cloning v8.x compiled with The last thing I need to understand is why "make -j4 binary" (as was mentioned in #753) bails out on me... stating that
Am I going to screw anything up if I change node_version.h and set |
Should be fine. The only thing it controls is whether |
I'm going to close this issue as of right now - thank you for all your help @richardlau and @sam-github for pointers in the right direction. I'm going to post the commands I used to get this going (binary works too):
|
Ah ... jumped a little too early I think. So I've compiled to a binary and then moved this onto another identical system. Expanded the binaries out (as per the wiki) and whilst everything looks just fine, when I run { npm: '6.13.4', That OpenSSL version should read, IMHO, 1.0.2g should it not - the same version that my system has, the same version of the certified FIPS Crypto Module?! |
@D4V3M0NK If you run You can pass in extra flags via the |
@richardlau ... oh that's mighty good to know! Will let you know how I get on... |
@richardlau : you sir, are a gentleman and a scholar - that was the last piece of the puzzle! OpenSSL 1.0.2g-fips listed in
|
@D4V3M0NK when you do uname -r, where do you see FIPS? Is it kernel-name, nodename, etc... |
kernel-name and openssl version |
@D4V3M0NK thank you for the summary of the steps. I've followed the same step and can make it built successfully with Node 8. However, as Node 8 is already end of support in 2020. I'm trying to build with Node 16; however, I faced with a similar error you've posted above
May I ask if you've been able to pass this error in the past? Or you have to switch to Node 8 to overcome that? |
Until the newer version of OpenSSL (FIPS) is released, I had to resort to sticking with Node8 as that was the last version that worked with OpenSSL. |
I'm attempting to compile node (12.x) on Ubuntu 18 with the recently certified OpenSSL module and when running
./configure --openssl-fips=/usr/include/openssl
, I get the immediate error messageFrom #753 I was under the impression that compilation is possible if I had the FIPS libraries installed on a FIPS enabled kernel (which Bionic now is, as of 4/29/20). Am I sadly mistaken? Maybe moving to a later version of node would help? I used
git clone -b v12.x...
, which I presume is 12.16.3Can someone give me some guidance please?
The text was updated successfully, but these errors were encountered: