This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_hashlib failure for "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" buildbot
Type: Stage: resolved
Components: SSL Versions: Python 3.11, Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: christian.heimes, cstratak, miss-islington, pablogsal, shreyanavigyan
Priority: normal Keywords: patch

Created on 2021-05-05 11:09 by cstratak, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 26470 merged cstratak, 2021-05-31 16:11
PR 26531 merged miss-islington, 2021-06-04 16:48
Messages (4)
msg393003 - (view) Author: Charalampos Stratakis (cstratak) * Date: 2021-05-05 11:09
The buildbot started experiencing some failures. First after https://github.com/python/cpython/commit/ddbef71a2c166a5d5dd168e26493973053a953d6 this test started failing with:

======================================================================
ERROR: test_disallow_instantiation (test.test_hashlib.HashLibTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py", line 160, in __hash_new
    return _hashlib.new(name, data, **kwargs)
ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_hashlib.py", line 912, in test_disallow_instantiation
    h = constructor()
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_hashlib.py", line 133, in _test_algorithm_via_hashlib_new
    return hashlib.new(_alg, **kwargs)
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py", line 166, in __hash_new
    return __get_builtin_constructor(name)(data)
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py", line 123, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5


And then after https://github.com/python/cpython/commit/91554e4c5ca3c762998296522f854a7166ba84f0 there is another failure:

======================================================================
ERROR: test_readonly_types (test.test_hashlib.HashLibTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py", line 160, in __hash_new
    return _hashlib.new(name, data, **kwargs)
ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_hashlib.py", line 933, in test_readonly_types
    hash_type = type(constructor())
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_hashlib.py", line 133, in _test_algorithm_via_hashlib_new
    return hashlib.new(_alg, **kwargs)
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py", line 166, in __hash_new
    return __get_builtin_constructor(name)(data)
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py", line 123, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
msg393015 - (view) Author: Shreyan Avigyan (shreyanavigyan) * Date: 2021-05-05 15:48
The errors are occurring because the code before these commits checked whether those algorithms were present or not. If an algorithm was not present it was not tested. The new code doesn't check and therefore if even one of the algorithm modules are not present raises an error.
msg395104 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-06-04 16:48
New changeset a46c220edc5cf716d0b71eb80ac29ecdb4ebb430 by stratakis in branch 'main':
bpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470)
https://github.com/python/cpython/commit/a46c220edc5cf716d0b71eb80ac29ecdb4ebb430
msg395110 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-06-04 18:38
New changeset 3f4d801bf907a5fcab50f3b64475d1410b90a80f by Miss Islington (bot) in branch '3.10':
bpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470) (GH-26531)
https://github.com/python/cpython/commit/3f4d801bf907a5fcab50f3b64475d1410b90a80f
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88214
2021-06-04 18:38:09pablogsalsetmessages: + msg395110
2021-06-04 16:48:52miss-islingtonsetnosy: + miss-islington

pull_requests: + pull_request25124
2021-06-04 16:48:20pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-06-04 16:48:03pablogsalsetnosy: + pablogsal
messages: + msg395104
2021-05-31 16:11:12cstrataksetkeywords: + patch
stage: patch review
pull_requests: + pull_request25065
2021-05-05 15:48:26shreyanavigyansetnosy: + shreyanavigyan
messages: + msg393015
2021-05-05 11:09:23cstratakcreate