scons: When running scons on a FIPS compliant machine scons still try to use md5 even if the C and python libraries are missing.
This issue was originally created at: 2014-05-24 07:57:52.
This issue was reported by: bsucha.
bsucha said at 2014-05-24 07:57:52
When running scons on a FIPS compliant machine scons still try to use md5 even if the C and python libraries are missing. This causes scons to fail the at the first file it tries to compile.
This can be easily solved by updating Util.py to try to initialize the md5 library before defining the functionality and catching the ValueError thrown when it doesn’t exist.
try:
import hashlib
hashlib.md5() # add this line, this will try to cause the initialization of the md5 functionality.
except ImportError:
pass
except ValueError: # add this line
pass # add this line
This will allow scons to continue properly and fall back to its missing md5 mode.
Specific machine: RHEL6 2.6.32-358.2.1.el6.x86_64 #<span></span>1 SMP x86_64 x86_64 x86_64 GNU/Linux
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 43 (15 by maintainers)
If there’s FIPs in your environment, it’d probably be worthwhile to add
SetOption('hash_format','sha256')In your SConstructs.
That said, if you’re willing to work with us, we’d like to have SCons “do the right thing” when it’s run in a FIPS environment. Please let us know if you can spare some time to sort this out properly. (also probably easier to do so via our Discord Server https://discord.gg/pejaFYrD9n if that’s a possibility)