MCPcopy Index your code
hub / github.com/python/cpython / collect_fips

Function collect_fips

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

Source from the content-addressed store, hash-verified

1007
1008
1009def collect_fips(info_add):
1010 try:
1011 import _hashlib
1012 except ImportError:
1013 _hashlib = None
1014
1015 if _hashlib is not None:
1016 call_func(info_add, 'fips.openssl_fips_mode', _hashlib, 'get_fips_mode')
1017
1018 try:
1019 with open("/proc/sys/crypto/fips_enabled", encoding="utf-8") as fp:
1020 line = fp.readline().rstrip()
1021
1022 if line:
1023 info_add('fips.linux_crypto_fips_enabled', line)
1024 except OSError:
1025 pass
1026
1027
1028def 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…