Skip to content

Upstream fips_enabled() from fMRIPrep #501

Description

@oesteban

There's a check in fMRIPrep, under fmriprep.utils.misc, to check if the system is FIPS enabled.

This little function should be the same for all tools using FreeSurfer:

def fips_enabled():
    """
    Check if FIPS is enabled on the system.

    For more information, see:
    https://github.com/nipreps/fmriprep/issues/2480#issuecomment-891199276
    """
    from pathlib import Path

    fips = Path('/proc/sys/crypto/fips_enabled')
    return fips.exists() and fips.read_text()[0] != '0'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions