Revise x509v3_config.pod
[openssl.git] / doc / man1 / openssl-fipsinstall.pod.in
1 =pod
2 {- OpenSSL::safe::output_do_not_edit_headers(); -}
3
4 =head1 NAME
5
6 openssl-fipsinstall - perform FIPS configuration installation
7
8 =head1 SYNOPSIS
9
10 B<openssl fipsinstall>
11 [B<-help>]
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>]
17 [B<-verify>]
18 [B<-mac_name> I<macname>]
19 [B<-macopt> I<nm>:I<v>]
20 [B<-noout>]
21 [B<-quiet>]
22 [B<-corrupt_desc> I<selftest_description>]
23 [B<-corrupt_type> I<selftest_type>]
24
25 =head1 DESCRIPTION
26
27 This command is used to generate a FIPS module configuration file.
28 The generated configuration file consists of:
29
30 =over 4
31
32 =item - A mac of the FIPS module file.
33
34 =item - A status indicator that indicates if the known answer Self Tests (KAT's)
35 have successfully run.
36
37 =back
38
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.
42
43 =head1 OPTIONS
44
45 =over 4
46
47 =item B<-help>
48
49 Print a usage message.
50
51 =item B<-module> I<filename>
52
53 Filename of a fips module to perform an integrity check on.
54
55 =item B<-out> I<configfilename>
56
57 Filename to output the configuration data to, or standard output by default.
58
59 =item B<-in> I<configfilename>
60
61 Input filename to load configuration data from. Used with the '-verify' option.
62 Standard input is used if the filename is '-'.
63
64 =item B<-verify>
65
66 Verify that the input configuration file contains the correct information
67
68 =item B<-provider_name> I<providername>
69
70 Name of the provider inside the configuration file.
71
72 =item B<-section_name> I<sectionname>
73
74 Name of the section inside the configuration file.
75
76 =item B<-mac_name> I<name>
77
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>.
81
82 =item B<-macopt> I<nm>:I<v>
83
84 Passes options to the MAC algorithm.
85 A comprehensive list of controls can be found in the EVP_MAC implementation
86 documentation.
87 Common control strings used for fipsinstall are:
88
89 =over 4
90
91 =item B<key>:I<string>
92
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.
97
98 =item B<hexkey>:I<string>
99
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.
103
104 =item B<digest>:I<string>
105
106 Used by HMAC as an alphanumeric string (use if the key contains printable
107 characters only).
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>.
111
112 =back
113
114 =item B<-noout>
115
116 Disable logging of the self tests.
117
118 =item B<-quiet>
119
120 Do not output pass/fail messages. Implies B<-noout>.
121
122 =item B<-corrupt_desc> I<selftest_description>,
123 B<-corrupt_type> I<selftest_type>
124
125 The corrupt options can be used to test failure of one or more self test(s) by
126 name.
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.
130
131 =back
132
133 =head1 EXAMPLES
134
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:
137
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
141
142 Verify that the configuration file F<fips.cnf> contains the correct info:
143
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
147
148 Corrupt any self tests which have the description 'SHA1':
149
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'
154
155 =head1 NOTES
156
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.
160
161 =head1 SEE ALSO
162
163 L<fips_config(5)>,
164 L<OSSL_PROVIDER-FIPS(7)>,
165 L<EVP_MAC(3)>
166
167 =head1 COPYRIGHT
168
169 Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
170
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>.
175
176 =cut