mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-9216: Expose OpenSSL FIPS_mode() as _hashlib.get_fips_mode() (GH-19703)
test.pythoninfo logs OpenSSL FIPS_mode() and Linux /proc/sys/crypto/fips_enabled in a new "fips" section. Co-Authored-By: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
e5963ee320
commit
e3dfb9b967
4 changed files with 110 additions and 1 deletions
|
@ -856,6 +856,11 @@ class HashLibTestCase(unittest.TestCase):
|
|||
|
||||
self.assertEqual(expected_hash, hasher.hexdigest())
|
||||
|
||||
@unittest.skipUnless(hasattr(c_hashlib, 'get_fips_mode'),
|
||||
'need _hashlib.get_fips_mode')
|
||||
def test_get_fips_mode(self):
|
||||
self.assertIsInstance(c_hashlib.get_fips_mode(), int)
|
||||
|
||||
|
||||
class KDFTests(unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue