'\" t
.\"     Title: fips-mode-setup
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 09/22/2023
.\"    Manual: \ \&
.\"    Source: fips-mode-setup
.\"  Language: English
.\"
.TH "FIPS\-MODE\-SETUP" "8" "09/22/2023" "fips\-mode\-setup" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
fips-mode-setup \- Check or enable the system FIPS mode\&.
.SH "SYNOPSIS"
.sp
\fBfips\-mode\-setup\fR [\fICOMMAND\fR]
.SH "DESCRIPTION"
.sp
fips\-mode\-setup(8) is used to check and control the system FIPS mode\&.
.sp
When enabling the system FIPS mode, the command completes the installation of FIPS modules if needed by calling \fIfips\-finish\-install\fR and changes the system crypto policy to FIPS (unless the policy has already been set to FIPS plus subpolicies on top, in which case the currently active subpolicies is retained)\&.
.sp
Then the command modifies the boot loader configuration to add \fIfips=1\fR and \fIboot=<boot\-device>\fR options to the kernel command line\&.
.sp
When disabling the system FIPS mode the system crypto policy is switched to DEFAULT and the kernel command line option \fIfips=0\fR is set\&.
.sp
On transactional systems, enabling the system in FIPS mode with the fips\-mode\-setup tool is not implemented\&. To enable the FIPS mode in these systems requires the following steps:
.sp
.if n \{\
.RS 4
.\}
.nf
1\&.\- Install the FIPS pattern on a running system:
    # transactional\-update pkg install \-t pattern microos\-fips
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
2\&.\- Reboot your system\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
3\&.\- Add the kernel command line parameter fips=1 to the boot loader
    configuration\&. To do so, edit the file /etc/default/grub and add
    fips=1 to the GRUB_CMDLINE_LINUX_DEFAULT variable\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
4\&.\- After logging in to the system, run:
    # transactional\-update grub\&.cfg
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
5\&.\- Reboot your system\&.
.fi
.if n \{\
.RE
.\}
.SH "OPTIONS"
.sp
The following options are available in fips\-mode\-setup tool\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-enable: Enables the system FIPS mode\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-disable: Undo some of the FIPS\-enablement steps\&. Please note that module installation cannot be undone without reformatting of and overwriting, at least once, the platform\(cqs hard drive or other permanent storage media\&. This option is not meant to be used in production, is not supported, and is implemented for testing purposes only\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-check: Checks for inconsistently enabled FIPS mode\&. Exits successfully (0) for both consistently\-enabled FIPS mode and consistently\-disabled FIPS mode, returns error code (1) if inconsistencies are detected\&. For checking whether FIPS mode is enabled, see \-\-is\-enabled below\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-is\-enabled: Checks the system FIPS mode status and returns failure error code if disabled (2) or inconsistent (1)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-\-no\-bootcfg: The tool will not reconfigure the boot loader, and, instead, will print the options that need to be added to the kernel command line\&. Exception: it still attempts executing zipl(8) on s390x, as the system might become unbootable otherwise\&.
.RE
.SH "FILES"
.PP
/proc/sys/crypto/fips_enabled
.RS 4
The kernel FIPS mode flag\&.
.RE
.SH "SEE ALSO"
.sp
update\-crypto\-policies(8), fips\-finish\-install(8)
.SH "AUTHOR"
.sp
Written by Tomáš Mráz\&.
