2 {- OpenSSL::safe::output_do_not_edit_headers(); -}
6 openssl-fipsinstall - perform FIPS configuration installation
10 B<openssl fipsinstall>
12 [B<-in> I<configfilename>]
13 [B<-out> I<configfilename>]
14 [B<-module> I<modulefilename>]
15 [B<-provider_name> I<providername>]
16 [B<-section_name> I<sectionname>]
18 [B<-mac_name> I<macname>]
19 [B<-macopt> I<nm>:I<v>]
22 [B<-corrupt_desc> I<selftest_description>]
23 [B<-corrupt_type> I<selftest_type>]
27 This command is used to generate a FIPS module configuration file.
28 The generated configuration file consists of:
32 =item - A mac of the FIPS module file.
34 =item - A status indicator that indicates if the known answer Self Tests (KAT's)
35 have successfully run.
39 This configuration file can be used each time a FIPS module is loaded
40 in order to pass data to the FIPS modules self tests. The FIPS module always
41 verifies the modules MAC, but only needs to run the KATS once during install.
49 Print a usage message.
51 =item B<-module> I<filename>
53 Filename of a fips module to perform an integrity check on.
55 =item B<-out> I<configfilename>
57 Filename to output the configuration data to, or standard output by default.
59 =item B<-in> I<configfilename>
61 Input filename to load configuration data from. Used with the '-verify' option.
62 Standard input is used if the filename is '-'.
66 Verify that the input configuration file contains the correct information
68 =item B<-provider_name> I<providername>
70 Name of the provider inside the configuration file.
72 =item B<-section_name> I<sectionname>
74 Name of the section inside the configuration file.
76 =item B<-mac_name> I<name>
78 Specifies the name of a supported MAC algorithm which will be used.
79 To see the list of supported MAC's use the command
80 C<openssl list -mac-algorithms>. The default is B<HMAC>.
82 =item B<-macopt> I<nm>:I<v>
84 Passes options to the MAC algorithm.
85 A comprehensive list of controls can be found in the EVP_MAC implementation
87 Common control strings used for fipsinstall are:
91 =item B<key>:I<string>
93 Specifies the MAC key as an alphanumeric string (use if the key contains
94 printable characters only).
95 The string length must conform to any restrictions of the MAC algorithm.
96 A key must be specified for every MAC algorithm.
98 =item B<hexkey>:I<string>
100 Specifies the MAC key in hexadecimal form (two hex digits per byte).
101 The key length must conform to any restrictions of the MAC algorithm.
102 A key must be specified for every MAC algorithm.
104 =item B<digest>:I<string>
106 Used by HMAC as an alphanumeric string (use if the key contains printable
108 The string length must conform to any restrictions of the MAC algorithm.
109 To see the list of supported digests, use the command
110 C<openssl list -digest-commands>.
116 Disable logging of the self tests.
120 Do not output pass/fail messages. Implies B<-noout>.
122 =item B<-corrupt_desc> I<selftest_description>,
123 B<-corrupt_type> I<selftest_type>
125 The corrupt options can be used to test failure of one or more self test(s) by
127 Either option or both may be used to select the self test(s) to corrupt.
128 Refer to the entries for "st-desc" and "st-type" in L<OSSL_PROVIDER-FIPS(7)> for
129 values that can be used.
135 Calculate the mac of a FIPS module F<fips.so> and run a FIPS self test
136 for the module, and save the F<fips.cnf> configuration file:
138 openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips \
139 -section_name fipsinstall -mac_name HMAC -macopt digest:SHA256 \
140 -macopt hexkey:000102030405060708090A0B0C0D0E0F10111213
142 Verify that the configuration file F<fips.cnf> contains the correct info:
144 openssl fipsinstall -module ./fips.so -in fips.cnf -provider_name fips \
145 -section_name fips_install -mac_name HMAC -macopt digest:SHA256 \
146 -macopt hexkey:000102030405060708090A0B0C0D0E0F10111213 -verify
148 Corrupt any self tests which have the description 'SHA1':
150 openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips \
151 -section_name fipsinstall -mac_name HMAC -macopt digest:SHA256 \
152 -macopt hexkey:000102030405060708090A0B0C0D0E0F10111213 \
153 -corrupt_desc', 'SHA1'
157 The MAC mechanisms that are available will depend on the options
158 used when building OpenSSL.
159 The command C<openssl list -mac-algorithms> command can be used to list them.
164 L<OSSL_PROVIDER-FIPS(7)>,
169 Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
171 Licensed under the Apache License 2.0 (the "License"). You may not use
172 this file except in compliance with the License. You can obtain a copy
173 in the file LICENSE in the source distribution or at
174 L<https://www.openssl.org/source/license.html>.