forked from rpms/openssl
Utilities from the general purpose cryptography library with TLS implementation
1. Deny SHA-1 signature verification in FIPS provider
For RHEL, we already disable SHA-1 signatures by default in the default
provider, so it is unexpected that the FIPS provider would have a more
lenient configuration in this regard. Additionally, we do not think
continuing to accept SHA-1 signatures is a good idea due to the
published chosen-prefix collision attacks.
As a consequence, disable verification of SHA-1 signatures in the FIPS
provider.
This requires adjusting a few tests that would otherwise fail:
- 30-test_acvp: Remove the test vectors that use SHA-1.
- 30-test_evp: Mark tests in evppkey_rsa_common.txt and
evppkey_ecdsa.txt that use SHA-1 digests as "Availablein = default",
which will not run them when the FIPS provider is enabled.
- 80-test_cms: Re-generate all certificates in test/smime-certificates
using the mksmime-certs.sh script, because most of them were signed
with SHA-1 and thus fail verification in the FIPS provider. Keep
smec3.pem, which was used to sign static test data in
test/recipes/80-test_cms_data/ciphertext_from_1_1_1.cms, which would
otherwise no longer verify. Note that smec3.pem was signed with
a smroot.pem, which was now re-generated. This does not affect the
test.
Fix some other tests by explicitly running them in the default
provider, where SHA-1 is available.
- 80-test_ssl_old: Skip tests that rely on SSLv3 and SHA-1 when run with
the FIPS provider.
2. Disable EVP_PKEY_{sign,verify} in FIPS provider
The APIs to compute both digest and signature in one step,
EVP_DigestSign*/EVP_DigestVerify* and EVP_Sign*/EVP_Verify*, should be
used instead. This ensures that the digest is computed inside of the
FIPS module, and that only approved digests are used.
Update documentation for EVP_PKEY_{sign,verify} to reflect this.
Since the KATs use EVP_PKEY_sign/EVP_PKEY_verify, modify the tests to
set the OSSL_SIGNATURE_PARAM_KAT parameter and use EVP_PKEY_sign_init_ex
and EVP_PKEY_verify_init_ex where these parameters can be passed on
creation and allow EVP_PKEY_sign/EVP_PKEY_verify when this parameter is
set and evaluates as true.
Move tests that use the EVP_PKEY API to only run in the default
provider, since they would fail in the FIPS provider. This also affects
a number of CMS tests where error handling is insufficient and failure
to sign would only show up when verifying the CMS structure due to
a parse error.
Resolves: rhbz#2087147
Signed-off-by: Clemens Lang <cllang@redhat.com>
|
||
|---|---|---|
| .gitignore | ||
| 0001-Aarch64-and-ppc64le-use-lib64.patch | ||
| 0002-Use-more-general-default-values-in-openssl.cnf.patch | ||
| 0003-Do-not-install-html-docs.patch | ||
| 0004-Override-default-paths-for-the-CA-directory-tree.patch | ||
| 0005-apps-ca-fix-md-option-help-text.patch | ||
| 0006-Disable-signature-verification-with-totally-unsafe-h.patch | ||
| 0007-Add-support-for-PROFILE-SYSTEM-system-default-cipher.patch | ||
| 0008-Add-FIPS_mode-compatibility-macro.patch | ||
| 0009-Add-Kernel-FIPS-mode-flag-support.patch | ||
| 0011-Remove-EC-curves.patch | ||
| 0012-Disable-explicit-ec.patch | ||
| 0013-FIPS-provider-explicit-ec.patch | ||
| 0014-FIPS-disable-explicit-ec.patch | ||
| 0024-load-legacy-prov.patch | ||
| 0025-for-tests.patch | ||
| 0031-tmp-Fix-test-names.patch | ||
| 0032-Force-fips.patch | ||
| 0033-FIPS-embed-hmac.patch | ||
| 0034.fipsinstall_disable.patch | ||
| 0035-speed-skip-unavailable-dgst.patch | ||
| 0045-FIPS-services-minimize.patch | ||
| 0046-FIPS-s390x-hardening.patch | ||
| 0047-FIPS-early-KATS.patch | ||
| 0048-correctly-handle-records.patch | ||
| 0049-Selectively-disallow-SHA1-signatures.patch | ||
| 0050-FIPS-enable-pkcs12-mac.patch | ||
| 0051-Support-different-R_BITS-lengths-for-KBKDF.patch | ||
| 0052-Allow-SHA1-in-seclevel-2-if-rh-allow-sha1-signatures.patch | ||
| 0053-CVE-2022-0778.patch | ||
| 0054-Replace-size-check-with-more-meaningful-pubkey-check.patch | ||
| 0055-nonlegacy-fetch-null-deref.patch | ||
| 0056-strcasecmp.patch | ||
| 0057-strcasecmp-fix.patch | ||
| 0058-FIPS-limit-rsa-encrypt.patch | ||
| 0060-FIPS-KAT-signature-tests.patch | ||
| 0061-Deny-SHA-1-signature-verification-in-FIPS-provider.patch | ||
| 0062-Disable-EVP_PKEY_-sign-verify-in-FIPS-provider.patch | ||
| configuration-prefix.h | ||
| configuration-switch.h | ||
| ec_curve.c | ||
| ectest.c | ||
| gating.yaml | ||
| genpatches | ||
| hobble-openssl | ||
| make-dummy-cert | ||
| Makefile.certificate | ||
| openssl.spec | ||
| renew-dummy-cert | ||
| rpminspect.yaml | ||
| sources | ||