Skip to content

hashlib.md5() on FIPS compliant systems #30

@NavidSassan

Description

@NavidSassan

which is used in base, causing:

File "/usr/lib64/nagios/plugins/disk-io", line 283,
    in main() File "/usr/lib64/nagios/plugins/disk-io", line 138,
    in main lib.base2.coe(lib.db_sqlite2.create_index(conn, 'name'))

File "/usr/lib64/nagios/plugins/lib/db_sqlite2.py", line 109,
    in create_index index_name = 'idx_{}'.format(base2.md5sum(table + column_list))

File "/usr/lib64/nagios/plugins/lib/base2.py", line 641,
    in md5sum return hashlib.md5(string).hexdigest() ValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips

redhat implemented a usedforsecurity=False parameter, which was also integrated into python >= 3.9 (see https://bugzilla.redhat.com/show_bug.cgi?id=1744670).

this could be implemented as a fallback. the other question is, how do we handle this if usedforsecurity is not available.

can be replicated on a system according to https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/chap-federal_standards_and_regulations (the 'After the System Installation'-steps are enough).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions