2019-08-24 16:56:34 +08:00
|
|
|
=pod
|
2020-02-27 05:45:31 +08:00
|
|
|
{- OpenSSL::safe::output_do_not_edit_headers(); -}
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
=head1 NAME
|
|
|
|
|
|
|
|
openssl-fipsinstall - perform FIPS configuration installation
|
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
|
|
B<openssl fipsinstall>
|
|
|
|
[B<-help>]
|
2019-09-26 03:20:11 +08:00
|
|
|
[B<-in> I<configfilename>]
|
|
|
|
[B<-out> I<configfilename>]
|
|
|
|
[B<-module> I<modulefilename>]
|
|
|
|
[B<-provider_name> I<providername>]
|
|
|
|
[B<-section_name> I<sectionname>]
|
2019-08-24 16:56:34 +08:00
|
|
|
[B<-verify>]
|
2019-09-26 03:20:11 +08:00
|
|
|
[B<-mac_name> I<macname>]
|
|
|
|
[B<-macopt> I<nm>:I<v>]
|
2020-01-15 08:48:01 +08:00
|
|
|
[B<-noout>]
|
|
|
|
[B<-corrupt_desc> I<selftest_description>]
|
|
|
|
[B<-corrupt_type> I<selftest_type>]
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
Command docs: fix up command references
Almost all OpenSSL commands are in reality 'openssl cmd', so make sure
they are refered to like that and not just as the sub-command.
Self-references are avoided as much as is possible, and replaced with
"this command". In some cases, we even avoid that with a slight
rewrite of the sentence or paragrah they were in. However, in the few
cases where a self-reference is still admissible, they are done in
bold, i.e. openssl-speed.pod references itself like this:
B<openssl speed>
References to other commands are done as manual links, i.e. CA.pl.pod
references 'openssl req' like this: L<openssl-req(1)>
Some commands are examples rather than references; we enclose those in
C<>.
While we are it, we abolish "utility", replacing it with "command", or
remove it entirely in some cases.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10065)
2019-10-02 01:43:36 +08:00
|
|
|
This command is used to generate a FIPS module configuration file.
|
2019-08-24 16:56:34 +08:00
|
|
|
The generated configuration file consists of:
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item - A mac of the FIPS module file.
|
|
|
|
|
|
|
|
=item - A status indicator that indicates if the known answer Self Tests (KAT's)
|
|
|
|
have successfully run.
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
This configuration file can be used each time a FIPS module is loaded
|
|
|
|
in order to pass data to the FIPS modules self tests. The FIPS module always
|
|
|
|
verifies the modules MAC, but only needs to run the KATS once during install.
|
|
|
|
|
|
|
|
=head1 OPTIONS
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item B<-help>
|
|
|
|
|
|
|
|
Print a usage message.
|
|
|
|
|
2019-09-26 03:20:11 +08:00
|
|
|
=item B<-module> I<filename>
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
Filename of a fips module to perform an integrity check on.
|
|
|
|
|
2019-09-26 03:20:11 +08:00
|
|
|
=item B<-out> I<configfilename>
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
Filename to output the configuration data to, or standard output by default.
|
|
|
|
|
2019-09-26 03:20:11 +08:00
|
|
|
=item B<-in> I<configfilename>
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
Input filename to load configuration data from. Used with the '-verify' option.
|
|
|
|
Standard input is used if the filename is '-'.
|
|
|
|
|
|
|
|
=item B<-verify>
|
|
|
|
|
|
|
|
Verify that the input configuration file contains the correct information
|
|
|
|
|
2019-09-26 03:20:11 +08:00
|
|
|
=item B<-provider_name> I<providername>
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
Name of the provider inside the configuration file.
|
|
|
|
|
2019-09-26 03:20:11 +08:00
|
|
|
=item B<-section_name> I<sectionname>
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
Name of the section inside the configuration file.
|
|
|
|
|
2019-09-26 03:20:11 +08:00
|
|
|
=item B<-mac_name> I<name>
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
Specifies the name of a supported MAC algorithm which will be used.
|
Command docs: fix up command references
Almost all OpenSSL commands are in reality 'openssl cmd', so make sure
they are refered to like that and not just as the sub-command.
Self-references are avoided as much as is possible, and replaced with
"this command". In some cases, we even avoid that with a slight
rewrite of the sentence or paragrah they were in. However, in the few
cases where a self-reference is still admissible, they are done in
bold, i.e. openssl-speed.pod references itself like this:
B<openssl speed>
References to other commands are done as manual links, i.e. CA.pl.pod
references 'openssl req' like this: L<openssl-req(1)>
Some commands are examples rather than references; we enclose those in
C<>.
While we are it, we abolish "utility", replacing it with "command", or
remove it entirely in some cases.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10065)
2019-10-02 01:43:36 +08:00
|
|
|
To see the list of supported MAC's use the command
|
|
|
|
C<openssl list -mac-algorithms>. The default is B<HMAC>.
|
2019-08-24 16:56:34 +08:00
|
|
|
|
2019-09-26 03:20:11 +08:00
|
|
|
=item B<-macopt> I<nm>:I<v>
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
Passes options to the MAC algorithm.
|
|
|
|
A comprehensive list of controls can be found in the EVP_MAC implementation
|
|
|
|
documentation.
|
|
|
|
Common control strings used for fipsinstall are:
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
2019-10-02 00:16:29 +08:00
|
|
|
=item B<key>:I<string>
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
Specifies the MAC key as an alphanumeric string (use if the key contains
|
|
|
|
printable characters only).
|
|
|
|
The string length must conform to any restrictions of the MAC algorithm.
|
|
|
|
A key must be specified for every MAC algorithm.
|
|
|
|
|
2019-10-02 00:16:29 +08:00
|
|
|
=item B<hexkey>:I<string>
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
Specifies the MAC key in hexadecimal form (two hex digits per byte).
|
|
|
|
The key length must conform to any restrictions of the MAC algorithm.
|
|
|
|
A key must be specified for every MAC algorithm.
|
|
|
|
|
2019-10-02 00:16:29 +08:00
|
|
|
=item B<digest>:I<string>
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
Used by HMAC as an alphanumeric string (use if the key contains printable
|
|
|
|
characters only).
|
|
|
|
The string length must conform to any restrictions of the MAC algorithm.
|
Command docs: fix up command references
Almost all OpenSSL commands are in reality 'openssl cmd', so make sure
they are refered to like that and not just as the sub-command.
Self-references are avoided as much as is possible, and replaced with
"this command". In some cases, we even avoid that with a slight
rewrite of the sentence or paragrah they were in. However, in the few
cases where a self-reference is still admissible, they are done in
bold, i.e. openssl-speed.pod references itself like this:
B<openssl speed>
References to other commands are done as manual links, i.e. CA.pl.pod
references 'openssl req' like this: L<openssl-req(1)>
Some commands are examples rather than references; we enclose those in
C<>.
While we are it, we abolish "utility", replacing it with "command", or
remove it entirely in some cases.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10065)
2019-10-02 01:43:36 +08:00
|
|
|
To see the list of supported digests, use the command
|
|
|
|
C<openssl list -digest-commands>.
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
=back
|
|
|
|
|
2020-01-15 08:48:01 +08:00
|
|
|
=item B<-noout>
|
|
|
|
|
|
|
|
Disable logging of the self tests.
|
|
|
|
|
|
|
|
=item B<-corrupt_desc> I<selftest_description>
|
|
|
|
|
|
|
|
=item B<-corrupt_type> I<selftest_type>
|
|
|
|
|
|
|
|
The corrupt options can be used to test failure of one or more self test(s) by
|
|
|
|
name.
|
|
|
|
Either option or both may be used to select the self test(s) to corrupt.
|
|
|
|
Refer to the entries for "st-desc" and "st-type" in L<OSSL_PROVIDER-FIPS(7)> for
|
|
|
|
values that can be used.
|
|
|
|
|
2019-08-24 16:56:34 +08:00
|
|
|
=back
|
|
|
|
|
|
|
|
=head1 EXAMPLES
|
|
|
|
|
2019-10-02 02:19:45 +08:00
|
|
|
Calculate the mac of a FIPS module F<fips.so> and run a FIPS self test
|
2020-02-26 02:25:13 +08:00
|
|
|
for the module, and save the F<fips.cnf> configuration file:
|
2019-08-24 16:56:34 +08:00
|
|
|
|
2020-02-26 02:25:13 +08:00
|
|
|
openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips \
|
2019-08-24 16:56:34 +08:00
|
|
|
-section_name fipsinstall -mac_name HMAC -macopt digest:SHA256 \
|
|
|
|
-macopt hexkey:000102030405060708090A0B0C0D0E0F10111213
|
|
|
|
|
2020-02-26 02:25:13 +08:00
|
|
|
Verify that the configuration file F<fips.cnf> contains the correct info:
|
2019-08-24 16:56:34 +08:00
|
|
|
|
2020-02-26 02:25:13 +08:00
|
|
|
openssl fipsinstall -module ./fips.so -in fips.cnf -provider_name fips \
|
2019-08-24 16:56:34 +08:00
|
|
|
-section_name fips_install -mac_name HMAC -macopt digest:SHA256 \
|
|
|
|
-macopt hexkey:000102030405060708090A0B0C0D0E0F10111213 -verify
|
|
|
|
|
2020-01-15 08:48:01 +08:00
|
|
|
Corrupt any self tests which have the description 'SHA1':
|
|
|
|
|
2020-02-26 02:25:13 +08:00
|
|
|
openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips \
|
2020-01-15 08:48:01 +08:00
|
|
|
-section_name fipsinstall -mac_name HMAC -macopt digest:SHA256 \
|
|
|
|
-macopt hexkey:000102030405060708090A0B0C0D0E0F10111213 \
|
|
|
|
-corrupt_desc', 'SHA1'
|
|
|
|
|
2019-08-24 16:56:34 +08:00
|
|
|
=head1 NOTES
|
|
|
|
|
|
|
|
The MAC mechanisms that are available will depend on the options
|
|
|
|
used when building OpenSSL.
|
Command docs: fix up command references
Almost all OpenSSL commands are in reality 'openssl cmd', so make sure
they are refered to like that and not just as the sub-command.
Self-references are avoided as much as is possible, and replaced with
"this command". In some cases, we even avoid that with a slight
rewrite of the sentence or paragrah they were in. However, in the few
cases where a self-reference is still admissible, they are done in
bold, i.e. openssl-speed.pod references itself like this:
B<openssl speed>
References to other commands are done as manual links, i.e. CA.pl.pod
references 'openssl req' like this: L<openssl-req(1)>
Some commands are examples rather than references; we enclose those in
C<>.
While we are it, we abolish "utility", replacing it with "command", or
remove it entirely in some cases.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10065)
2019-10-02 01:43:36 +08:00
|
|
|
The command C<openssl list -mac-algorithms> command can be used to list them.
|
2019-08-24 16:56:34 +08:00
|
|
|
|
|
|
|
=head1 SEE ALSO
|
|
|
|
|
|
|
|
L<fips_config(5)>,
|
2020-01-15 08:48:01 +08:00
|
|
|
L<OSSL_PROVIDER-FIPS(7)>,
|
2019-08-24 16:56:34 +08:00
|
|
|
L<EVP_MAC(3)>
|
|
|
|
|
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
|
|
|
Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
|
|
|
|
|
|
|
Licensed under the OpenSSL license (the "License"). You may not use
|
|
|
|
this file except in compliance with the License. You can obtain a copy
|
|
|
|
in the file LICENSE in the source distribution or at
|
|
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
|
|
|
|
=cut
|