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