Skip to content

Bring fips_enabled() from fMRIPrep #501

@oesteban

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions