1OPENSSL-FIPSINSTALL(1ossl)          OpenSSL         OPENSSL-FIPSINSTALL(1ossl)
2
3
4

NAME

6       openssl-fipsinstall - perform FIPS configuration installation
7

SYNOPSIS

9       openssl fipsinstall [-help] [-in configfilename] [-out configfilename]
10       [-module modulefilename] [-provider_name providername] [-section_name
11       sectionname] [-verify] [-mac_name macname] [-macopt nm:v] [-noout]
12       [-quiet] [-no_conditional_errors] [-no_security_checks]
13       [-self_test_onload] [-corrupt_desc selftest_description] [-corrupt_type
14       selftest_type] [-config parent_config]
15

DESCRIPTION

17       This command is used to generate a FIPS module configuration file.
18       This configuration file can be used each time a FIPS module is loaded
19       in order to pass data to the FIPS module self tests. The FIPS module
20       always verifies its MAC, but optionally only needs to run the KAT's
21       once, at installation.
22
23       The generated configuration file consists of:
24
25       - A MAC of the FIPS module file.
26       - A test status indicator.
27           This indicates if the Known Answer Self Tests (KAT's) have
28           successfully run.
29
30       - A MAC of the status indicator.
31       - A control for conditional self tests errors.
32           By default if a continuous test (e.g a key pair test) fails then
33           the FIPS module will enter an error state, and no services or
34           cryptographic algorithms will be able to be accessed after this
35           point.  The default value of '1' will cause the fips module error
36           state to be entered.  If the value is '0' then the module error
37           state will not be entered.  Regardless of whether the error state
38           is entered or not, the current operation (e.g. key generation) will
39           return an error. The user is responsible for retrying the operation
40           if the module error state is not entered.
41
42       - A control to indicate whether run-time security checks are done.
43           This indicates if run-time checks related to enforcement of
44           security parameters such as minimum security strength of keys and
45           approved curve names are used.  The default value of '1' will
46           perform the checks.  If the value is '0' the checks are not
47           performed and FIPS compliance must be done by procedures documented
48           in the relevant Security Policy.
49
50       This file is described in fips_config(5).
51

OPTIONS

53       -help
54           Print a usage message.
55
56       -module filename
57           Filename of the FIPS module to perform an integrity check on.  The
58           path provided in the filename is used to load the module when it is
59           activated, and this overrides the environment variable
60           OPENSSL_MODULES.
61
62       -out configfilename
63           Filename to output the configuration data to; the default is
64           standard output.
65
66       -in configfilename
67           Input filename to load configuration data from.  Must be used if
68           the -verify option is specified.
69
70       -verify
71           Verify that the input configuration file contains the correct
72           information.
73
74       -provider_name providername
75           Name of the provider inside the configuration file.  The default
76           value is "fips".
77
78       -section_name sectionname
79           Name of the section inside the configuration file.  The default
80           value is "fips_sect".
81
82       -mac_name name
83           Specifies the name of a supported MAC algorithm which will be used.
84           The MAC mechanisms that are available will depend on the options
85           used when building OpenSSL.  To see the list of supported MAC's use
86           the command "openssl list -mac-algorithms".  The default is HMAC.
87
88       -macopt nm:v
89           Passes options to the MAC algorithm.  A comprehensive list of
90           controls can be found in the EVP_MAC implementation documentation.
91           Common control strings used for this command are:
92
93           key:string
94               Specifies the MAC key as an alphanumeric string (use if the key
95               contains printable characters only).  The string length must
96               conform to any restrictions of the MAC algorithm.  A key must
97               be specified for every MAC algorithm.  If no key is provided,
98               the default that was specified when OpenSSL was configured is
99               used.
100
101           hexkey:string
102               Specifies the MAC key in hexadecimal form (two hex digits per
103               byte).  The key length must conform to any restrictions of the
104               MAC algorithm.  A key must be specified for every MAC
105               algorithm.  If no key is provided, the default that was
106               specified when OpenSSL was configured is used.
107
108           digest:string
109               Used by HMAC as an alphanumeric string (use if the key contains
110               printable characters only).  The string length must conform to
111               any restrictions of the MAC algorithm.  To see the list of
112               supported digests, use the command "openssl list
113               -digest-commands".  The default digest is SHA-256.
114
115       -noout
116           Disable logging of the self tests.
117
118       -no_conditional_errors
119           Configure the module to not enter an error state if a conditional
120           self test fails as described above.
121
122       -no_security_checks
123           Configure the module to not perform run-time security checks as
124           described above.
125
126       -self_test_onload
127           Do not write the two fields related to the "test status indicator"
128           and "MAC status indicator" to the output configuration file.
129           Without these fields the self tests KATS will run each time the
130           module is loaded. This option could be used for cross compiling,
131           since the self tests need to run at least once on each target
132           machine. Once the self tests have run on the target machine the
133           user could possibly then add the 2 fields into the configuration
134           using some other mechanism.
135
136       -quiet
137           Do not output pass/fail messages. Implies -noout.
138
139       -corrupt_desc selftest_description, -corrupt_type selftest_type
140           The corrupt options can be used to test failure of one or more self
141           tests by name.  Either option or both may be used to select the
142           tests to corrupt.  Refer to the entries for st-desc and st-type in
143           OSSL_PROVIDER-FIPS(7) for values that can be used.
144
145       -config parent_config
146           Test that a FIPS provider can be loaded from the specified
147           configuration file.  A previous call to this application needs to
148           generate the extra configuration data that is included by the base
149           "parent_config" configuration file.  See config(5) for further
150           information on how to set up a provider section.  All other options
151           are ignored if '-config' is used.
152

NOTES

154       Self tests results are logged by default if the options -quiet and
155       -noout are not specified, or if either of the options -corrupt_desc or
156       -corrupt_type are used.  If the base configuration file is set up to
157       autoload the fips module, then the fips module will be loaded and self
158       tested BEFORE the fipsinstall application has a chance to set up its
159       own self test callback. As a result of this the self test output and
160       the options -corrupt_desc and -corrupt_type will be ignored.  For
161       normal usage the base configuration file should use the default
162       provider when generating the fips configuration file.
163

EXAMPLES

165       Calculate the mac of a FIPS module fips.so and run a FIPS self test for
166       the module, and save the fips.cnf configuration file:
167
168        openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips
169
170       Verify that the configuration file fips.cnf contains the correct info:
171
172        openssl fipsinstall -module ./fips.so -in fips.cnf  -provider_name fips -verify
173
174       Corrupt any self tests which have the description "SHA1":
175
176        openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips \
177                -corrupt_desc 'SHA1'
178
179       Validate that the fips module can be loaded from a base configuration
180       file:
181
182        export OPENSSL_CONF_INCLUDE=<path of configuration files>
183        export OPENSSL_MODULES=<provider-path>
184        openssl fipsinstall -config' 'default.cnf'
185

SEE ALSO

187       config(5), fips_config(5), OSSL_PROVIDER-FIPS(7), EVP_MAC(3)
188
190       Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
191
192       Licensed under the Apache License 2.0 (the "License").  You may not use
193       this file except in compliance with the License.  You can obtain a copy
194       in the file LICENSE in the source distribution or at
195       <https://www.openssl.org/source/license.html>.
196
197
198
1993.0.5                             2022-11-01        OPENSSL-FIPSINSTALL(1ossl)
Impressum