MCPcopy Index your code
hub / github.com/RustPython/RustPython / collect_fips

Function collect_fips

Lib/test/pythoninfo.py:980–996  ·  view source on GitHub ↗
(info_add)

Source from the content-addressed store, hash-verified

978
979
980def collect_fips(info_add):
981 try:
982 import _hashlib
983 except ImportError:
984 _hashlib = None
985
986 if _hashlib is not None:
987 call_func(info_add, 'fips.openssl_fips_mode', _hashlib, 'get_fips_mode')
988
989 try:
990 with open("/proc/sys/crypto/fips_enabled", encoding="utf-8") as fp:
991 line = fp.readline().rstrip()
992
993 if line:
994 info_add('fips.linux_crypto_fips_enabled', line)
995 except OSError:
996 pass
997
998
999def collect_tempfile(info_add):

Callers

nothing calls this directly

Calls 4

call_funcFunction · 0.85
openFunction · 0.50
rstripMethod · 0.45
readlineMethod · 0.45

Tested by

no test coverage detected