]>
Commit | Line | Data |
---|---|---|
95214b43 | 1 | =pod |
5e98904c | 2 | {- OpenSSL::safe::output_do_not_edit_headers(); -} |
95214b43 SL |
3 | |
4 | =head1 NAME | |
5 | ||
6 | openssl-fipsinstall - perform FIPS configuration installation | |
7 | ||
8 | =head1 SYNOPSIS | |
9 | ||
10 | B<openssl fipsinstall> | |
11 | [B<-help>] | |
e8769719 RS |
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>] | |
95214b43 | 17 | [B<-verify>] |
e8769719 RS |
18 | [B<-mac_name> I<macname>] |
19 | [B<-macopt> I<nm>:I<v>] | |
36fc5fc6 | 20 | [B<-noout>] |
1cd2c1f8 | 21 | [B<-quiet>] |
35e6ea3b | 22 | [B<-no_conditional_errors>] |
991a6bb5 | 23 | [B<-no_security_checks>] |
36fc5fc6 SL |
24 | [B<-corrupt_desc> I<selftest_description>] |
25 | [B<-corrupt_type> I<selftest_type>] | |
9f7bdcf3 | 26 | [B<-config> I<parent_config>] |
95214b43 | 27 | |
95214b43 SL |
28 | =head1 DESCRIPTION |
29 | ||
35a810bb | 30 | This command is used to generate a FIPS module configuration file. |
d03b3158 RS |
31 | This configuration file can be used each time a FIPS module is loaded |
32 | in order to pass data to the FIPS module self tests. The FIPS module always | |
33 | verifies its MAC, but only needs to run the KAT's once, | |
34 | at installation. | |
35 | ||
95214b43 SL |
36 | The generated configuration file consists of: |
37 | ||
38 | =over 4 | |
39 | ||
d03b3158 RS |
40 | =item - A MAC of the FIPS module file. |
41 | ||
42 | =item - A test status indicator. | |
95214b43 | 43 | |
d03b3158 RS |
44 | This indicates if the Known Answer Self Tests (KAT's) have successfully run. |
45 | ||
46 | =item - A MAC of the status indicator. | |
95214b43 | 47 | |
35e6ea3b SL |
48 | =item - A control for conditional self tests errors. |
49 | ||
50 | By default if a continuous test (e.g a key pair test) fails then the FIPS module | |
51 | will enter an error state, and no services or cryptographic algorithms will be | |
52 | able to be accessed after this point. | |
53 | The default value of '1' will cause the fips module error state to be entered. | |
54 | If the value is '0' then the module error state will not be entered. | |
55 | Regardless of whether the error state is entered or not, the current operation | |
56 | (e.g. key generation) will return an error. The user is responsible for retrying | |
57 | the operation if the module error state is not entered. | |
58 | ||
991a6bb5 SL |
59 | =item - A control to indicate whether run-time security checks are done. |
60 | ||
61 | This indicates if run-time checks related to enforcement of security parameters | |
62 | such as minimum security strength of keys and approved curve names are used. | |
63 | The default value of '1' will perform the checks. | |
64 | If the value is '0' the checks are not performed and FIPS compliance must | |
65 | be done by procedures documented in the relevant Security Policy. | |
66 | ||
95214b43 SL |
67 | =back |
68 | ||
d03b3158 | 69 | This file is described in L<fips_config(5)>. |
95214b43 SL |
70 | |
71 | =head1 OPTIONS | |
72 | ||
73 | =over 4 | |
74 | ||
75 | =item B<-help> | |
76 | ||
77 | Print a usage message. | |
78 | ||
e8769719 | 79 | =item B<-module> I<filename> |
95214b43 | 80 | |
d03b3158 | 81 | Filename of the FIPS module to perform an integrity check on. |
9a62ccbe SL |
82 | The path provided in the filename is used to load the module when it is |
83 | activated, and this overrides the environment variable B<OPENSSL_MODULES>. | |
95214b43 | 84 | |
e8769719 | 85 | =item B<-out> I<configfilename> |
95214b43 | 86 | |
d03b3158 | 87 | Filename to output the configuration data to; the default is standard output. |
95214b43 | 88 | |
e8769719 | 89 | =item B<-in> I<configfilename> |
95214b43 | 90 | |
eb78f955 RS |
91 | Input filename to load configuration data from. |
92 | Must be used if the B<-verify> option is specified. | |
95214b43 SL |
93 | |
94 | =item B<-verify> | |
95 | ||
d03b3158 | 96 | Verify that the input configuration file contains the correct information. |
95214b43 | 97 | |
e8769719 | 98 | =item B<-provider_name> I<providername> |
95214b43 SL |
99 | |
100 | Name of the provider inside the configuration file. | |
5744dacb | 101 | The default value is C<fips>. |
95214b43 | 102 | |
e8769719 | 103 | =item B<-section_name> I<sectionname> |
95214b43 SL |
104 | |
105 | Name of the section inside the configuration file. | |
5744dacb | 106 | The default value is C<fips_sect>. |
95214b43 | 107 | |
e8769719 | 108 | =item B<-mac_name> I<name> |
95214b43 SL |
109 | |
110 | Specifies the name of a supported MAC algorithm which will be used. | |
d03b3158 RS |
111 | The MAC mechanisms that are available will depend on the options |
112 | used when building OpenSSL. | |
35a810bb RL |
113 | To see the list of supported MAC's use the command |
114 | C<openssl list -mac-algorithms>. The default is B<HMAC>. | |
95214b43 | 115 | |
e8769719 | 116 | =item B<-macopt> I<nm>:I<v> |
95214b43 SL |
117 | |
118 | Passes options to the MAC algorithm. | |
119 | A comprehensive list of controls can be found in the EVP_MAC implementation | |
120 | documentation. | |
31214258 | 121 | Common control strings used for this command are: |
95214b43 SL |
122 | |
123 | =over 4 | |
124 | ||
2f0ea936 | 125 | =item B<key>:I<string> |
95214b43 SL |
126 | |
127 | Specifies the MAC key as an alphanumeric string (use if the key contains | |
128 | printable characters only). | |
129 | The string length must conform to any restrictions of the MAC algorithm. | |
130 | A key must be specified for every MAC algorithm. | |
31214258 RS |
131 | If no key is provided, the default that was specified when OpenSSL was |
132 | configured is used. | |
95214b43 | 133 | |
2f0ea936 | 134 | =item B<hexkey>:I<string> |
95214b43 SL |
135 | |
136 | Specifies the MAC key in hexadecimal form (two hex digits per byte). | |
137 | The key length must conform to any restrictions of the MAC algorithm. | |
138 | A key must be specified for every MAC algorithm. | |
31214258 RS |
139 | If no key is provided, the default that was specified when OpenSSL was |
140 | configured is used. | |
95214b43 | 141 | |
2f0ea936 | 142 | =item B<digest>:I<string> |
95214b43 SL |
143 | |
144 | Used by HMAC as an alphanumeric string (use if the key contains printable | |
145 | characters only). | |
146 | The string length must conform to any restrictions of the MAC algorithm. | |
35a810bb RL |
147 | To see the list of supported digests, use the command |
148 | C<openssl list -digest-commands>. | |
31214258 | 149 | The default digest is SHA-256. |
95214b43 SL |
150 | |
151 | =back | |
152 | ||
36fc5fc6 SL |
153 | =item B<-noout> |
154 | ||
155 | Disable logging of the self tests. | |
156 | ||
35e6ea3b SL |
157 | =item B<-no_conditional_errors> |
158 | ||
159 | Configure the module to not enter an error state if a conditional self test | |
160 | fails as described above. | |
161 | ||
991a6bb5 SL |
162 | =item B<-no_security_checks> |
163 | ||
164 | Configure the module to not perform run-time security checks as described above. | |
35e6ea3b | 165 | |
1cd2c1f8 | 166 | =item B<-quiet> |
36fc5fc6 | 167 | |
1cd2c1f8 RS |
168 | Do not output pass/fail messages. Implies B<-noout>. |
169 | ||
170 | =item B<-corrupt_desc> I<selftest_description>, | |
171 | B<-corrupt_type> I<selftest_type> | |
36fc5fc6 | 172 | |
d03b3158 | 173 | The corrupt options can be used to test failure of one or more self tests by |
36fc5fc6 | 174 | name. |
d03b3158 RS |
175 | Either option or both may be used to select the tests to corrupt. |
176 | Refer to the entries for B<st-desc> and B<st-type> in L<OSSL_PROVIDER-FIPS(7)> for | |
36fc5fc6 SL |
177 | values that can be used. |
178 | ||
9f7bdcf3 SL |
179 | =item B<-config> I<parent_config> |
180 | ||
181 | Test that a FIPS provider can be loaded from the specified configuration file. | |
182 | A previous call to this application needs to generate the extra configuration | |
183 | data that is included by the base C<parent_config> configuration file. | |
184 | See L<config(5)> for further information on how to set up a provider section. | |
185 | All other options are ignored if '-config' is used. | |
186 | ||
95214b43 SL |
187 | =back |
188 | ||
189 | =head1 EXAMPLES | |
190 | ||
1948394d | 191 | Calculate the mac of a FIPS module F<fips.so> and run a FIPS self test |
433deaff | 192 | for the module, and save the F<fips.cnf> configuration file: |
95214b43 | 193 | |
991a6bb5 | 194 | openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips |
95214b43 | 195 | |
433deaff | 196 | Verify that the configuration file F<fips.cnf> contains the correct info: |
95214b43 | 197 | |
991a6bb5 | 198 | openssl fipsinstall -module ./fips.so -in fips.cnf -provider_name fips -verify |
95214b43 | 199 | |
d03b3158 | 200 | Corrupt any self tests which have the description C<SHA1>: |
36fc5fc6 | 201 | |
433deaff | 202 | openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips \ |
d03b3158 | 203 | -corrupt_desc 'SHA1' |
95214b43 | 204 | |
9f7bdcf3 SL |
205 | Validate that the fips module can be loaded from a base configuration file: |
206 | ||
207 | export OPENSSL_CONF_INCLUDE=<path of configuration files> | |
c9dcbc07 | 208 | export OPENSSL_MODULES=<provider-path> |
9f7bdcf3 SL |
209 | openssl fipsinstall -config' 'default.cnf' |
210 | ||
211 | ||
95214b43 SL |
212 | =head1 SEE ALSO |
213 | ||
9f7bdcf3 | 214 | L<config(5)>, |
95214b43 | 215 | L<fips_config(5)>, |
36fc5fc6 | 216 | L<OSSL_PROVIDER-FIPS(7)>, |
95214b43 SL |
217 | L<EVP_MAC(3)> |
218 | ||
219 | =head1 COPYRIGHT | |
220 | ||
3c2bdd7d | 221 | Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. |
95214b43 | 222 | |
a6ed19dc | 223 | Licensed under the Apache License 2.0 (the "License"). You may not use |
95214b43 SL |
224 | this file except in compliance with the License. You can obtain a copy |
225 | in the file LICENSE in the source distribution or at | |
226 | L<https://www.openssl.org/source/license.html>. | |
227 | ||
228 | =cut |