698ee3e35ee1e862c2b5110f87c717f33df71669
[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<-corrupt_desc> I<selftest_description>]
22 [B<-corrupt_type> I<selftest_type>]
23
24 =head1 DESCRIPTION
25
26 This command is used to generate a FIPS module configuration file.
27 The generated configuration file consists of:
28
29 =over 4
30
31 =item - A mac of the FIPS module file.
32
33 =item - A status indicator that indicates if the known answer Self Tests (KAT's)
34 have successfully run.
35
36 =back
37
38 This configuration file can be used each time a FIPS module is loaded
39 in order to pass data to the FIPS modules self tests. The FIPS module always
40 verifies the modules MAC, but only needs to run the KATS once during install.
41
42 =head1 OPTIONS
43
44 =over 4
45
46 =item B<-help>
47
48 Print a usage message.
49
50 =item B<-module> I<filename>
51
52 Filename of a fips module to perform an integrity check on.
53
54 =item B<-out> I<configfilename>
55
56 Filename to output the configuration data to, or standard output by default.
57
58 =item B<-in> I<configfilename>
59
60 Input filename to load configuration data from. Used with the '-verify' option.
61 Standard input is used if the filename is '-'.
62
63 =item B<-verify>
64
65 Verify that the input configuration file contains the correct information
66
67 =item B<-provider_name> I<providername>
68
69 Name of the provider inside the configuration file.
70
71 =item B<-section_name> I<sectionname>
72
73 Name of the section inside the configuration file.
74
75 =item B<-mac_name> I<name>
76
77 Specifies the name of a supported MAC algorithm which will be used.
78 To see the list of supported MAC's use the command
79 C<openssl list -mac-algorithms>.  The default is B<HMAC>.
80
81 =item B<-macopt> I<nm>:I<v>
82
83 Passes options to the MAC algorithm.
84 A comprehensive list of controls can be found in the EVP_MAC implementation
85 documentation.
86 Common control strings used for fipsinstall are:
87
88 =over 4
89
90 =item B<key>:I<string>
91
92 Specifies the MAC key as an alphanumeric string (use if the key contains
93 printable characters only).
94 The string length must conform to any restrictions of the MAC algorithm.
95 A key must be specified for every MAC algorithm.
96
97 =item B<hexkey>:I<string>
98
99 Specifies the MAC key in hexadecimal form (two hex digits per byte).
100 The key length must conform to any restrictions of the MAC algorithm.
101 A key must be specified for every MAC algorithm.
102
103 =item B<digest>:I<string>
104
105 Used by HMAC as an alphanumeric string (use if the key contains printable
106 characters only).
107 The string length must conform to any restrictions of the MAC algorithm.
108 To see the list of supported digests, use the command
109 C<openssl list -digest-commands>.
110
111 =back
112
113 =item B<-noout>
114
115 Disable logging of the self tests.
116
117 =item B<-corrupt_desc> I<selftest_description>
118
119 =item B<-corrupt_type> I<selftest_type>
120
121 The corrupt options can be used to test failure of one or more self test(s) by
122 name.
123 Either option or both may be used to select the self test(s) to corrupt.
124 Refer to the entries for "st-desc" and "st-type" in L<OSSL_PROVIDER-FIPS(7)> for
125 values that can be used.
126
127 =back
128
129 =head1 EXAMPLES
130
131 Calculate the mac of a FIPS module F<fips.so> and run a FIPS self test
132 for the module, and save the F<fips.cnf> configuration file:
133
134  openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips \
135          -section_name fipsinstall -mac_name HMAC -macopt digest:SHA256 \
136          -macopt hexkey:000102030405060708090A0B0C0D0E0F10111213
137
138 Verify that the configuration file F<fips.cnf> contains the correct info:
139
140  openssl fipsinstall -module ./fips.so -in fips.cnf  -provider_name fips \
141           -section_name fips_install -mac_name HMAC -macopt digest:SHA256 \
142           -macopt hexkey:000102030405060708090A0B0C0D0E0F10111213 -verify
143
144 Corrupt any self tests which have the description 'SHA1':
145
146  openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips \
147          -section_name fipsinstall -mac_name HMAC -macopt digest:SHA256 \
148          -macopt hexkey:000102030405060708090A0B0C0D0E0F10111213 \
149          -corrupt_desc', 'SHA1'
150
151 =head1 NOTES
152
153 The MAC mechanisms that are available will depend on the options
154 used when building OpenSSL.
155 The command C<openssl list -mac-algorithms> command can be used to list them.
156
157 =head1 SEE ALSO
158
159 L<fips_config(5)>,
160 L<OSSL_PROVIDER-FIPS(7)>,
161 L<EVP_MAC(3)>
162
163 =head1 COPYRIGHT
164
165 Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
166
167 Licensed under the OpenSSL license (the "License").  You may not use
168 this file except in compliance with the License.  You can obtain a copy
169 in the file LICENSE in the source distribution or at
170 L<https://www.openssl.org/source/license.html>.
171
172 =cut