6ed7c9
diff -up openssl-3.0.0/apps/fipsinstall.c.xxx openssl-3.0.0/apps/fipsinstall.c
6ed7c9
--- openssl-3.0.0/apps/fipsinstall.c.xxx	2021-11-22 13:09:28.232560235 +0100
6ed7c9
+++ openssl-3.0.0/apps/fipsinstall.c	2021-11-22 13:12:22.272058910 +0100
6ed7c9
@@ -311,6 +311,9 @@ int fipsinstall_main(int argc, char **ar
6ed7c9
     EVP_MAC *mac = NULL;
6ed7c9
     CONF *conf = NULL;
6ed7c9
 
6ed7c9
+    BIO_printf(bio_err, "This command is not enabled in the Red Hat Enterprise Linux OpenSSL build, please consult Red Hat documentation to learn how to enable FIPS mode\n");
6ed7c9
+    return 1;
6ed7c9
+
6ed7c9
     if ((opts = sk_OPENSSL_STRING_new_null()) == NULL)
6ed7c9
         goto end;
6ed7c9
 
a74baf
diff -up openssl-3.0.0/doc/man1/openssl.pod.xxx openssl-3.0.0/doc/man1/openssl.pod
a74baf
--- openssl-3.0.0/doc/man1/openssl.pod.xxx	2021-11-22 13:18:51.081406990 +0100
a74baf
+++ openssl-3.0.0/doc/man1/openssl.pod	2021-11-22 13:19:02.897508738 +0100
a74baf
@@ -158,10 +158,6 @@ Engine (loadable module) information and
a74baf
 
a74baf
 Error Number to Error String Conversion.
a74baf
 
a74baf
-=item B<fipsinstall>
a74baf
-
a74baf
-FIPS configuration installation.
a74baf
-
a74baf
 =item B<gendsa>
a74baf
 
a74baf
 Generation of DSA Private Key from Parameters. Superseded by
a74baf
diff -up openssl-3.0.0/doc/man5/config.pod.xxx openssl-3.0.0/doc/man5/config.pod
a74baf
--- openssl-3.0.0/doc/man5/config.pod.xxx	2021-11-22 13:24:51.359509501 +0100
a74baf
+++ openssl-3.0.0/doc/man5/config.pod	2021-11-22 13:26:02.360121820 +0100
a74baf
@@ -573,7 +573,6 @@ configuration files using that syntax wi
a74baf
 =head1 SEE ALSO
a74baf
 
a74baf
 L<openssl-x509(1)>, L<openssl-req(1)>, L<openssl-ca(1)>,
a74baf
-L<openssl-fipsinstall(1)>,
a74baf
 L<ASN1_generate_nconf(3)>,
a74baf
 L<EVP_set_default_properties(3)>,
a74baf
 L<CONF_modules_load(3)>,
a74baf
diff -up openssl-3.0.0/doc/man5/fips_config.pod.xxx openssl-3.0.0/doc/man5/fips_config.pod
a74baf
--- openssl-3.0.0/doc/man5/fips_config.pod.xxx	2021-11-22 13:21:13.812636065 +0100
a74baf
+++ openssl-3.0.0/doc/man5/fips_config.pod	2021-11-22 13:24:12.278172847 +0100
a74baf
@@ -6,106 +6,10 @@ fips_config - OpenSSL FIPS configuration
a74baf
 
a74baf
 =head1 DESCRIPTION
a74baf
 
a74baf
-A separate configuration file, using the OpenSSL L<config(5)> syntax,
a74baf
-is used to hold information about the FIPS module. This includes a digest
a74baf
-of the shared library file, and status about the self-testing.
a74baf
-This data is used automatically by the module itself for two
a74baf
-purposes:
a74baf
-
a74baf
-=over 4
a74baf
-
a74baf
-=item - Run the startup FIPS self-test known answer tests (KATS).
a74baf
-
a74baf
-This is normally done once, at installation time, but may also be set up to
a74baf
-run each time the module is used.
a74baf
-
a74baf
-=item - Verify the module's checksum.
a74baf
-
a74baf
-This is done each time the module is used.
a74baf
-
a74baf
-=back
a74baf
-
a74baf
-This file is generated by the L<openssl-fipsinstall(1)> program, and
a74baf
-used internally by the FIPS module during its initialization.
a74baf
-
a74baf
-The following options are supported. They should all appear in a section
a74baf
-whose name is identified by the B<fips> option in the B<providers>
a74baf
-section, as described in L<config(5)/Provider Configuration Module>.
a74baf
-
a74baf
-=over 4
a74baf
-
a74baf
-=item B<activate>
a74baf
-
a74baf
-If present, the module is activated. The value assigned to this name is not
a74baf
-significant.
a74baf
-
a74baf
-=item B<install-version>
a74baf
-
a74baf
-A version number for the fips install process. Should be 1.
a74baf
-
a74baf
-=item B<conditional-errors>
a74baf
-
a74baf
-The FIPS module normally enters an internal error mode if any self test fails.
a74baf
-Once this error mode is active, no services or cryptographic algorithms are
a74baf
-accessible from this point on.
a74baf
-Continuous tests are a subset of the self tests (e.g., a key pair test during key
a74baf
-generation, or the CRNG output test).
a74baf
-Setting this value to C<0> allows the error mode to not be triggered if any
a74baf
-continuous test fails. The default value of C<1> will trigger the error mode.
a74baf
-Regardless of the value, the operation (e.g., key generation) that called the
a74baf
-continuous test will return an error code if its continuous test fails. The
a74baf
-operation may then be retried if the error mode has not been triggered.
a74baf
-
a74baf
-=item B<security-checks>
a74baf
-
a74baf
-This indicates if run-time checks related to enforcement of security parameters
a74baf
-such as minimum security strength of keys and approved curve names are used.
a74baf
-A value of '1' will perform the checks, otherwise if the value is '0' the checks
a74baf
-are not performed and FIPS compliance must be done by procedures documented in
a74baf
-the relevant Security Policy.
a74baf
-
a74baf
-=item B<module-mac>
a74baf
-
a74baf
-The calculated MAC of the FIPS provider file.
a74baf
-
a74baf
-=item B<install-status>
a74baf
-
a74baf
-An indicator that the self-tests were successfully run.
a74baf
-This should only be written after the module has
a74baf
-successfully passed its self tests during installation.
a74baf
-If this field is not present, then the self tests will run when the module
a74baf
-loads.
a74baf
-
a74baf
-=item B<install-mac>
a74baf
-
a74baf
-A MAC of the value of the B<install-status> option, to prevent accidental
a74baf
-changes to that value.
a74baf
-It is written-to at the same time as B<install-status> is updated.
a74baf
-
a74baf
-=back
a74baf
-
a74baf
-For example:
a74baf
-
a74baf
- [fips_sect]
a74baf
- activate = 1
a74baf
- install-version = 1
a74baf
- conditional-errors = 1
a74baf
- security-checks = 1
a74baf
- module-mac = 41:D0:FA:C2:5D:41:75:CD:7D:C3:90:55:6F:A4:DC
a74baf
- install-mac = FE:10:13:5A:D3:B4:C7:82:1B:1E:17:4C:AC:84:0C
a74baf
- install-status = INSTALL_SELF_TEST_KATS_RUN
a74baf
-
a74baf
-=head1 NOTES
a74baf
-
a74baf
-When using the FIPS provider, it is recommended that the
a74baf
-B<config_diagnostics> option is enabled to prevent accidental use of
a74baf
-non-FIPS validated algorithms via broken or mistaken configuration.
a74baf
-See L<config(5)>.
a74baf
-
a74baf
-=head1 SEE ALSO
a74baf
-
a74baf
-L<config(5)>
a74baf
-L<openssl-fipsinstall(1)>
a74baf
+This command is disabled in Red Hat Enterprise Linux. The FIPS provider is
a74baf
+automatically loaded when the system is booted in FIPS mode, or when the
a74baf
+environment variable B<OPENSSL_FORCE_FIPS_MODE> is set. See the documentation
a74baf
+for more information.
a74baf
 
a74baf
 =head1 COPYRIGHT
a74baf
 
a74baf
diff -up openssl-3.0.0/doc/man7/OSSL_PROVIDER-FIPS.pod.xxx openssl-3.0.0/doc/man7/OSSL_PROVIDER-FIPS.pod
a74baf
--- openssl-3.0.0/doc/man7/OSSL_PROVIDER-FIPS.pod.xxx	2021-11-22 13:18:13.850086386 +0100
a74baf
+++ openssl-3.0.0/doc/man7/OSSL_PROVIDER-FIPS.pod	2021-11-22 13:18:24.607179038 +0100
a74baf
@@ -388,7 +388,6 @@ A simple self test callback is shown bel
a74baf
 
a74baf
 =head1 SEE ALSO
a74baf
 
a74baf
-L<openssl-fipsinstall(1)>,
a74baf
 L<fips_config(5)>,
a74baf
 L<OSSL_SELF_TEST_set_callback(3)>,
a74baf
 L<OSSL_SELF_TEST_new(3)>,
a74baf
diff -up openssl-3.0.1/doc/man1/openssl-fipsinstall.pod.in.embed-hmac openssl-3.0.1/doc/man1/openssl-fipsinstall.pod.in
a74baf
--- openssl-3.0.1/doc/man1/openssl-fipsinstall.pod.in.embed-hmac	2022-01-11 13:26:33.279906225 +0100
a74baf
+++ openssl-3.0.1/doc/man1/openssl-fipsinstall.pod.in	2022-01-11 13:33:18.757994419 +0100
a74baf
@@ -8,236 +8,11 @@ openssl-fipsinstall - perform FIPS confi
6ed7c9
 =head1 SYNOPSIS
6ed7c9
 
6ed7c9
 B<openssl fipsinstall>
6ed7c9
-[B<-help>]
6ed7c9
-[B<-in> I<configfilename>]
6ed7c9
-[B<-out> I<configfilename>]
6ed7c9
-[B<-module> I<modulefilename>]
6ed7c9
-[B<-provider_name> I<providername>]
6ed7c9
-[B<-section_name> I<sectionname>]
6ed7c9
-[B<-verify>]
6ed7c9
-[B<-mac_name> I<macname>]
6ed7c9
-[B<-macopt> I<nm>:I<v>]
6ed7c9
-[B<-noout>]
6ed7c9
-[B<-quiet>]
6ed7c9
-[B<-no_conditional_errors>]
6ed7c9
-[B<-no_security_checks>]
6ed7c9
-[B<-self_test_onload>]
6ed7c9
-[B<-corrupt_desc> I<selftest_description>]
6ed7c9
-[B<-corrupt_type> I<selftest_type>]
6ed7c9
-[B<-config> I<parent_config>]
6ed7c9
 
6ed7c9
 =head1 DESCRIPTION
a74baf
-
6ed7c9
-This command is used to generate a FIPS module configuration file.
6ed7c9
-This configuration file can be used each time a FIPS module is loaded
6ed7c9
-in order to pass data to the FIPS module self tests. The FIPS module always
6ed7c9
-verifies its MAC, but optionally only needs to run the KAT's once,
6ed7c9
-at installation.
6ed7c9
-
6ed7c9
-The generated configuration file consists of:
6ed7c9
-
6ed7c9
-=over 4
6ed7c9
-
6ed7c9
-=item - A MAC of the FIPS module file.
6ed7c9
-
6ed7c9
-=item - A test status indicator.
6ed7c9
-
6ed7c9
-This indicates if the Known Answer Self Tests (KAT's) have successfully run.
6ed7c9
-
6ed7c9
-=item - A MAC of the status indicator.
6ed7c9
-
6ed7c9
-=item - A control for conditional self tests errors.
6ed7c9
-
6ed7c9
-By default if a continuous test (e.g a key pair test) fails then the FIPS module
6ed7c9
-will enter an error state, and no services or cryptographic algorithms will be
6ed7c9
-able to be accessed after this point.
6ed7c9
-The default value of '1' will cause the fips module error state to be entered.
6ed7c9
-If the value is '0' then the module error state will not be entered.
6ed7c9
-Regardless of whether the error state is entered or not, the current operation
6ed7c9
-(e.g. key generation) will return an error. The user is responsible for retrying
6ed7c9
-the operation if the module error state is not entered.
6ed7c9
-
6ed7c9
-=item - A control to indicate whether run-time security checks are done.
6ed7c9
-
6ed7c9
-This indicates if run-time checks related to enforcement of security parameters
6ed7c9
-such as minimum security strength of keys and approved curve names are used.
6ed7c9
-The default value of '1' will perform the checks.
6ed7c9
-If the value is '0' the checks are not performed and FIPS compliance must
6ed7c9
-be done by procedures documented in the relevant Security Policy.
6ed7c9
-
6ed7c9
-=back
6ed7c9
-
6ed7c9
-This file is described in L<fips_config(5)>.
6ed7c9
-
6ed7c9
-=head1 OPTIONS
6ed7c9
-
6ed7c9
-=over 4
6ed7c9
-
6ed7c9
-=item B<-help>
6ed7c9
-
6ed7c9
-Print a usage message.
6ed7c9
-
6ed7c9
-=item B<-module> I<filename>
6ed7c9
-
6ed7c9
-Filename of the FIPS module to perform an integrity check on.
6ed7c9
-The path provided in the filename is used to load the module when it is
6ed7c9
-activated, and this overrides the environment variable B<OPENSSL_MODULES>.
6ed7c9
-
6ed7c9
-=item B<-out> I<configfilename>
6ed7c9
-
6ed7c9
-Filename to output the configuration data to; the default is standard output.
6ed7c9
-
6ed7c9
-=item B<-in> I<configfilename>
6ed7c9
-
6ed7c9
-Input filename to load configuration data from.
6ed7c9
-Must be used if the B<-verify> option is specified.
6ed7c9
-
6ed7c9
-=item B<-verify>
6ed7c9
-
6ed7c9
-Verify that the input configuration file contains the correct information.
6ed7c9
-
6ed7c9
-=item B<-provider_name> I<providername>
6ed7c9
-
6ed7c9
-Name of the provider inside the configuration file.
6ed7c9
-The default value is C<fips>.
6ed7c9
-
6ed7c9
-=item B<-section_name> I<sectionname>
6ed7c9
-
6ed7c9
-Name of the section inside the configuration file.
6ed7c9
-The default value is C<fips_sect>.
6ed7c9
-
6ed7c9
-=item B<-mac_name> I<name>
6ed7c9
-
6ed7c9
-Specifies the name of a supported MAC algorithm which will be used.
6ed7c9
-The MAC mechanisms that are available will depend on the options
6ed7c9
-used when building OpenSSL.
6ed7c9
-To see the list of supported MAC's use the command
6ed7c9
-C<openssl list -mac-algorithms>.  The default is B<HMAC>.
6ed7c9
-
6ed7c9
-=item B<-macopt> I<nm>:I<v>
6ed7c9
-
6ed7c9
-Passes options to the MAC algorithm.
6ed7c9
-A comprehensive list of controls can be found in the EVP_MAC implementation
6ed7c9
-documentation.
6ed7c9
-Common control strings used for this command are:
6ed7c9
-
6ed7c9
-=over 4
6ed7c9
-
6ed7c9
-=item B<key>:I<string>
6ed7c9
-
6ed7c9
-Specifies the MAC key as an alphanumeric string (use if the key contains
6ed7c9
-printable characters only).
6ed7c9
-The string length must conform to any restrictions of the MAC algorithm.
6ed7c9
-A key must be specified for every MAC algorithm.
6ed7c9
-If no key is provided, the default that was specified when OpenSSL was
6ed7c9
-configured is used.
6ed7c9
-
6ed7c9
-=item B<hexkey>:I<string>
6ed7c9
-
6ed7c9
-Specifies the MAC key in hexadecimal form (two hex digits per byte).
6ed7c9
-The key length must conform to any restrictions of the MAC algorithm.
6ed7c9
-A key must be specified for every MAC algorithm.
6ed7c9
-If no key is provided, the default that was specified when OpenSSL was
6ed7c9
-configured is used.
6ed7c9
-
6ed7c9
-=item B<digest>:I<string>
6ed7c9
-
6ed7c9
-Used by HMAC as an alphanumeric string (use if the key contains printable
6ed7c9
-characters only).
6ed7c9
-The string length must conform to any restrictions of the MAC algorithm.
6ed7c9
-To see the list of supported digests, use the command
6ed7c9
-C<openssl list -digest-commands>.
6ed7c9
-The default digest is SHA-256.
6ed7c9
-
6ed7c9
-=back
6ed7c9
-
6ed7c9
-=item B<-noout>
6ed7c9
-
6ed7c9
-Disable logging of the self tests.
6ed7c9
-
6ed7c9
-=item B<-no_conditional_errors>
6ed7c9
-
6ed7c9
-Configure the module to not enter an error state if a conditional self test
6ed7c9
-fails as described above.
6ed7c9
-
6ed7c9
-=item B<-no_security_checks>
6ed7c9
-
6ed7c9
-Configure the module to not perform run-time security checks as described above.
6ed7c9
-
6ed7c9
-=item B<-self_test_onload>
6ed7c9
-
6ed7c9
-Do not write the two fields related to the "test status indicator" and
6ed7c9
-"MAC status indicator" to the output configuration file. Without these fields
6ed7c9
-the self tests KATS will run each time the module is loaded. This option could be
6ed7c9
-used for cross compiling, since the self tests need to run at least once on each
6ed7c9
-target machine. Once the self tests have run on the target machine the user
6ed7c9
-could possibly then add the 2 fields into the configuration using some other
6ed7c9
-mechanism.
6ed7c9
-
6ed7c9
-=item B<-quiet>
6ed7c9
-
6ed7c9
-Do not output pass/fail messages. Implies B<-noout>.
6ed7c9
-
6ed7c9
-=item B<-corrupt_desc> I<selftest_description>,
6ed7c9
-B<-corrupt_type> I<selftest_type>
6ed7c9
-
6ed7c9
-The corrupt options can be used to test failure of one or more self tests by
6ed7c9
-name.
6ed7c9
-Either option or both may be used to select the tests to corrupt.
6ed7c9
-Refer to the entries for B<st-desc> and B<st-type> in L<OSSL_PROVIDER-FIPS(7)> for
6ed7c9
-values that can be used.
6ed7c9
-
6ed7c9
-=item B<-config> I<parent_config>
6ed7c9
-
6ed7c9
-Test that a FIPS provider can be loaded from the specified configuration file.
6ed7c9
-A previous call to this application needs to generate the extra configuration
6ed7c9
-data that is included by the base C<parent_config> configuration file.
6ed7c9
-See L<config(5)> for further information on how to set up a provider section.
6ed7c9
-All other options are ignored if '-config' is used.
6ed7c9
-
6ed7c9
-=back
6ed7c9
-
a74baf
-=head1 NOTES
a74baf
-
a74baf
-Self tests results are logged by default if the options B<-quiet> and B<-noout>
a74baf
-are not specified, or if either of the options B<-corrupt_desc> or
a74baf
-B<-corrupt_type> are used.
a74baf
-If the base configuration file is set up to autoload the fips module, then the
a74baf
-fips module will be loaded and self tested BEFORE the fipsinstall application
a74baf
-has a chance to set up its own self test callback. As a result of this the self
a74baf
-test output and the options B<-corrupt_desc> and B<-corrupt_type> will be ignored.
a74baf
-For normal usage the base configuration file should use the default provider
a74baf
-when generating the fips configuration file.
a74baf
-
6ed7c9
-=head1 EXAMPLES
6ed7c9
-
6ed7c9
-Calculate the mac of a FIPS module F<fips.so> and run a FIPS self test
6ed7c9
-for the module, and save the F<fips.cnf> configuration file:
6ed7c9
-
6ed7c9
- openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips
6ed7c9
-
6ed7c9
-Verify that the configuration file F<fips.cnf> contains the correct info:
6ed7c9
-
6ed7c9
- openssl fipsinstall -module ./fips.so -in fips.cnf  -provider_name fips -verify
6ed7c9
-
6ed7c9
-Corrupt any self tests which have the description C<SHA1>:
6ed7c9
-
6ed7c9
- openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips \
6ed7c9
-         -corrupt_desc 'SHA1'
6ed7c9
-
6ed7c9
-Validate that the fips module can be loaded from a base configuration file:
6ed7c9
-
6ed7c9
- export OPENSSL_CONF_INCLUDE=<path of configuration files>
6ed7c9
- export OPENSSL_MODULES=<provider-path>
6ed7c9
- openssl fipsinstall -config' 'default.cnf'
6ed7c9
-
6ed7c9
-
6ed7c9
-=head1 SEE ALSO
6ed7c9
-
6ed7c9
-L<config(5)>,
6ed7c9
-L<fips_config(5)>,
6ed7c9
-L<OSSL_PROVIDER-FIPS(7)>,
6ed7c9
-L<EVP_MAC(3)>
a74baf
+This command is disabled.
a74baf
+Please consult Red Hat Enterprise Linux documentation to learn how to correctly
a74baf
+enable FIPS mode on Red Hat Enterprise
6ed7c9
 
6ed7c9
 =head1 COPYRIGHT
6ed7c9