File project.diff of Package openssl-3
--- openssl-3.changes.orig
+++ openssl-3.changes
@@ -1,4 +1,43 @@
-------------------------------------------------------------------
+Fri Sep 12 13:59:56 UTC 2025 - Pedro Monreal <pmonreal@suse.com>
+
+- Update to 3.6.0:
+ * Added PCT for key import for SLH-DSA when in FIPS mode.
+ * Added FIPS 140-3 PCT on DH key generation.
+ * Added NIST security categories for PKEY objects.
+ * Added support for EVP_SKEY opaque symmetric key objects to the key
+ * derivation and key exchange provider methods. Added EVP_KDF_CTX_set_SKEY(),
+ * EVP_KDF_derive_SKEY(), and EVP_PKEY_derive_SKEY() functions.
+ * The FIPS provider now performs a PCT on key import for RSA, EC and ECX.
+ * This is mandated by FIPS 140-3 IG 10.3.A additional comment 1.
+ * Added LMS signature verification support as per [SP 800-208]. This
+ * support is present in both the FIPS and default providers.
+ * An ANSI-C toolchain is no longer sufficient for building OpenSSL. The code
+ * should build on compilers supporting C-99 features.
+ * The VxWorks platforms have been removed.
+ * Added an openssl configutl utility for processing the openssl
+ * configuration file and dumping the equal configuration file.
+ * Added support for FIPS 186-5 deterministic ECDSA signature
+ * generation to the FIPS provider.
+ * Deprecated EVP_PKEY_ASN1_METHOD related functions.
+ * Rebase patches:
+ - openssl-Add-changes-to-ectest-and-eccurve.patch
+ - openssl-Add-support-for-PROFILE-SYSTEM-system-default-cipher.patch
+ - openssl-Disable-explicit-ec.patch
+ - openssl-FIPS-140-3-keychecks.patch
+ - openssl-FIPS-limit-rsa-encrypt.patch
+ - openssl-pbkdf2-Set-minimum-password-length-of-8-bytes.patch
+ - openssl-FIPS-RSA-encapsulate.patch
+ - openssl-DH-Disable-FIPS-186-4-type-parameters-in-FIPS-mode.patch
+ - openssl-FIPS-NO-DSA-Support.patch
+ - openssl-FIPS-NO-DES-support.patch
+ - openssl-Allow-disabling-of-SHA1-signatures.patch
+ - openssl-FIPS-Deny-SHA-1-sigver-in-FIPS-provider.patch
+ - openssl-FIPS-Allow-SHA1-in-seclevel-2-if-rh-allow-sha1-signatures.patch
+ * Remove patches fixed upstream:
+ - openssl-rand-Forbid-truncated-hashes-SHA-3-in-FIPS-prov.patch
+
+-------------------------------------------------------------------
Tue Aug 5 16:34:57 UTC 2025 - Lucas Mulling <lucas.mulling@suse.com>
- Update to 3.5.2:
--- openssl-3.spec.orig
+++ openssl-3.spec
@@ -38,13 +38,13 @@
%define livepatchable 1
Name: openssl-3
-Version: 3.5.2
+Version: 3.6.0
Release: 0
Summary: Secure Sockets and Transport Layer Security
License: Apache-2.0
URL: https://www.openssl.org/
-Source: https://www.%{_rname}.org/source/%{_rname}-%{version}.tar.gz
-Source1: https://www.%{_rname}.org/source/%{_rname}-%{version}.tar.gz.asc
+Source: https://www.%{_rname}.org/source/%{_rname}-%{version}-alpha1.tar.gz
+Source1: https://www.%{_rname}.org/source/%{_rname}-%{version}-alpha1.tar.gz.asc
# https://keys.openpgp.org/search?q=openssl@openssl.org
# BA54 73A2 B058 7B07 FB27 CF2D 2160 94DF D0CB 81EF
Source2: %{_rname}.keyring
@@ -85,11 +85,10 @@ Patch19: openssl-FIPS-limit-rsa-e
Patch20: openssl-FIPS-Expose-a-FIPS-indicator.patch
# PATCH-FIX-FEDORA bsc#1221760 FIPS: Execute KATS before HMAC verification
Patch21: openssl-FIPS-Use-OAEP-in-KATs-support-fixed-OAEP-seed.patch
-Patch22: openssl-rand-Forbid-truncated-hashes-SHA-3-in-FIPS-prov.patch
# PATCH-FIX-FEDORA bsc#1221365 bsc#1221365 FIPS: Service Level Indicator is needed
Patch23: openssl-FIPS-Remove-X9.31-padding-from-FIPS-prov.patch
# PATCH-FIX-FEDORA bsc#1221827 FIPS: Recommendation for Password-Based Key Derivation
-Patch24: openssl-pbkdf2-Set-minimum-password-length-of-8-bytes.patch
+# Patch24: openssl-pbkdf2-Set-minimum-password-length-of-8-bytes.patch
# PATCH-FIX-FEDORA bsc#1221365 FIPS: Service Level Indicator is needed
Patch25: openssl-FIPS-RSA-disable-shake.patch
# PATCH-FIX-FEDORA bsc#1221824 FIPS: NIST SP 800-56Brev2 Section 6.4.1.2.1
@@ -217,7 +216,7 @@ This package contains optional documenta
this package's base documentation.
%prep
-%autosetup -p1 -n %{_rname}-%{version}
+%autosetup -p1 -n %{_rname}-%{version}-alpha1
%build
%ifarch armv5el armv5tel
--- openssl-Add-changes-to-ectest-and-eccurve.patch.orig
+++ openssl-Add-changes-to-ectest-and-eccurve.patch
@@ -26,10 +26,10 @@ From-dist-git-commit: 4334bc837fbc64d148
test/recipes/15-test_genec.t | 27 --
7 files changed, 9 insertions(+), 1157 deletions(-)
-Index: openssl-3.5.0-beta1/apps/speed.c
+Index: openssl-3.6.0-alpha1/apps/speed.c
===================================================================
---- openssl-3.5.0-beta1.orig/apps/speed.c
-+++ openssl-3.5.0-beta1/apps/speed.c
+--- openssl-3.6.0-alpha1.orig/apps/speed.c
++++ openssl-3.6.0-alpha1/apps/speed.c
@@ -405,7 +405,7 @@ static double ffdh_results[FFDH_NUM][1];
#endif /* OPENSSL_NO_DH */
@@ -66,10 +66,10 @@ Index: openssl-3.5.0-beta1/apps/speed.c
{"nistp224", NID_secp224r1, 224},
{"nistp256", NID_X9_62_prime256v1, 256},
{"nistp384", NID_secp384r1, 384},
-Index: openssl-3.5.0-beta1/crypto/ec/ec_curve.c
+Index: openssl-3.6.0-alpha1/crypto/ec/ec_curve.c
===================================================================
---- openssl-3.5.0-beta1.orig/crypto/ec/ec_curve.c
-+++ openssl-3.5.0-beta1/crypto/ec/ec_curve.c
+--- openssl-3.6.0-alpha1.orig/crypto/ec/ec_curve.c
++++ openssl-3.6.0-alpha1/crypto/ec/ec_curve.c
@@ -32,38 +32,6 @@ typedef struct {
/* the nist prime curves */
static const struct {
@@ -990,10 +990,10 @@ Index: openssl-3.5.0-beta1/crypto/ec/ec_
{NID_brainpoolP256r1, &_EC_brainpoolP256r1.h, 0,
"RFC 5639 curve over a 256 bit prime field"},
{NID_brainpoolP256t1, &_EC_brainpoolP256t1.h, 0,
-Index: openssl-3.5.0-beta1/crypto/evp/ec_support.c
+Index: openssl-3.6.0-alpha1/crypto/evp/ec_support.c
===================================================================
---- openssl-3.5.0-beta1.orig/crypto/evp/ec_support.c
-+++ openssl-3.5.0-beta1/crypto/evp/ec_support.c
+--- openssl-3.6.0-alpha1.orig/crypto/evp/ec_support.c
++++ openssl-3.6.0-alpha1/crypto/evp/ec_support.c
@@ -20,89 +20,15 @@ typedef struct ec_name2nid_st {
static const EC_NAME2NID curve_list[] = {
/* prime field curves */
@@ -1102,10 +1102,10 @@ Index: openssl-3.5.0-beta1/crypto/evp/ec
{"P-224", NID_secp224r1},
{"P-256", NID_X9_62_prime256v1},
{"P-384", NID_secp384r1},
-Index: openssl-3.5.0-beta1/test/acvp_test.inc
+Index: openssl-3.6.0-alpha1/test/acvp_test.inc
===================================================================
---- openssl-3.5.0-beta1.orig/test/acvp_test.inc
-+++ openssl-3.5.0-beta1/test/acvp_test.inc
+--- openssl-3.6.0-alpha1.orig/test/acvp_test.inc
++++ openssl-3.6.0-alpha1/test/acvp_test.inc
@@ -218,15 +218,6 @@ static const unsigned char ecdsa_sigver_
};
static const struct ecdsa_sigver_st ecdsa_sigver_data[] = {
@@ -1122,10 +1122,10 @@ Index: openssl-3.5.0-beta1/test/acvp_tes
"SHA2-512",
"P-521",
ITM(ecdsa_sigver_msg1),
-Index: openssl-3.5.0-beta1/test/ecdsatest.h
+Index: openssl-3.6.0-alpha1/test/ecdsatest.h
===================================================================
---- openssl-3.5.0-beta1.orig/test/ecdsatest.h
-+++ openssl-3.5.0-beta1/test/ecdsatest.h
+--- openssl-3.6.0-alpha1.orig/test/ecdsatest.h
++++ openssl-3.6.0-alpha1/test/ecdsatest.h
@@ -32,23 +32,6 @@ typedef struct {
} ecdsa_cavs_kat_t;
@@ -1150,10 +1150,10 @@ Index: openssl-3.5.0-beta1/test/ecdsates
/* prime KATs from NIST CAVP */
{NID_secp224r1, NID_sha224,
"699325d6fc8fbbb4981a6ded3c3a54ad2e4e3db8a5669201912064c64e700c139248cdc1"
-Index: openssl-3.5.0-beta1/test/ectest.c
+Index: openssl-3.6.0-alpha1/test/ectest.c
===================================================================
---- openssl-3.5.0-beta1.orig/test/ectest.c
-+++ openssl-3.5.0-beta1/test/ectest.c
+--- openssl-3.6.0-alpha1.orig/test/ectest.c
++++ openssl-3.6.0-alpha1/test/ectest.c
@@ -175,184 +175,26 @@ static int prime_field_tests(void)
|| !TEST_ptr(p = BN_new())
|| !TEST_ptr(a = BN_new())
@@ -1346,19 +1346,19 @@ Index: openssl-3.5.0-beta1/test/ectest.c
"FFFFFFFF000000000000000000000001"))
|| !TEST_int_eq(1, BN_check_prime(p, ctx, NULL))
|| !TEST_true(BN_hex2bn(&a, "FFFFFFFFFFFFFFFFFFFFFFFF"
-@@ -3128,7 +2970,7 @@ int setup_tests(void)
+@@ -3147,7 +2989,7 @@ int setup_tests(void)
ADD_TEST(parameter_test);
ADD_TEST(ossl_parameter_test);
- ADD_TEST(cofactor_range_test);
+ /* ADD_TEST(cofactor_range_test); */
- ADD_ALL_TESTS(cardinality_test, crv_len);
+ ADD_ALL_TESTS(cardinality_test, (int)crv_len);
ADD_TEST(prime_field_tests);
#ifndef OPENSSL_NO_EC2M
-Index: openssl-3.5.0-beta1/test/recipes/15-test_genec.t
+Index: openssl-3.6.0-alpha1/test/recipes/15-test_genec.t
===================================================================
---- openssl-3.5.0-beta1.orig/test/recipes/15-test_genec.t
-+++ openssl-3.5.0-beta1/test/recipes/15-test_genec.t
+--- openssl-3.6.0-alpha1.orig/test/recipes/15-test_genec.t
++++ openssl-3.6.0-alpha1/test/recipes/15-test_genec.t
@@ -41,37 +41,11 @@ plan skip_all => "This test is unsupport
if disabled("ec");
--- openssl-Add-support-for-PROFILE-SYSTEM-system-default-cipher.patch.orig
+++ openssl-Add-support-for-PROFILE-SYSTEM-system-default-cipher.patch
@@ -15,10 +15,10 @@ Subject: Add support for PROFILE=SYSTEM
util/libcrypto.num | 1
8 files changed, 110 insertions(+), 14 deletions(-)
-Index: openssl-3.5.0-beta1/Configurations/unix-Makefile.tmpl
+Index: openssl-3.6.0-alpha1/Configurations/unix-Makefile.tmpl
===================================================================
---- openssl-3.5.0-beta1.orig/Configurations/unix-Makefile.tmpl
-+++ openssl-3.5.0-beta1/Configurations/unix-Makefile.tmpl
+--- openssl-3.6.0-alpha1.orig/Configurations/unix-Makefile.tmpl
++++ openssl-3.6.0-alpha1/Configurations/unix-Makefile.tmpl
@@ -344,6 +344,10 @@ MANDIR=$(INSTALLTOP)/share/man
DOCDIR=$(INSTALLTOP)/share/doc/$(BASENAME)
HTMLDIR=$(DOCDIR)/html
@@ -38,16 +38,16 @@ Index: openssl-3.5.0-beta1/Configuration
(map { "-I".$_} @{$config{CPPINCLUDES}}),
@{$config{CPPFLAGS}}) -}
CFLAGS={- join(' ', @{$config{CFLAGS}}) -}
-Index: openssl-3.5.0-beta1/Configure
+Index: openssl-3.6.0-alpha1/Configure
===================================================================
---- openssl-3.5.0-beta1.orig/Configure
-+++ openssl-3.5.0-beta1/Configure
+--- openssl-3.6.0-alpha1.orig/Configure
++++ openssl-3.6.0-alpha1/Configure
@@ -27,7 +27,7 @@ use OpenSSL::config;
my $orig_death_handler = $SIG{__DIE__};
$SIG{__DIE__} = \&death_handler;
--my $usage="Usage: Configure [no-<feature> ...] [enable-<feature> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]thread-pool] [[no-]default-thread-pool] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]\n";
-+my $usage="Usage: Configure [no-<feature> ...] [enable-<feature> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]thread-pool] [[no-]default-thread-pool] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--system-ciphers-file=SYSTEMCIPHERFILE] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]\n";
+-my $usage="Usage: Configure [no-<feature> ...] [enable-<feature> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]thread-pool] [[no-]default-thread-pool] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] [--help] os/compiler[:flags]\n";
++my $usage="Usage: Configure [no-<feature> ...] [enable-<feature> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]thread-pool] [[no-]default-thread-pool] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--system-ciphers-file=SYSTEMCIPHERFILE] [--with-xxx[=vvv]] [--config=FILE] [--help] os/compiler[:flags]\n";
my $banner = <<"EOF";
@@ -62,7 +62,7 @@ Index: openssl-3.5.0-beta1/Configure
# --banner=".." Output specified text instead of default completion banner
#
# -w Don't wait after showing a Configure warning
-@@ -408,6 +412,7 @@ $config{prefix}="";
+@@ -409,6 +413,7 @@ $config{prefix}="";
$config{openssldir}="";
$config{processor}="";
$config{libdir}="";
@@ -70,7 +70,7 @@ Index: openssl-3.5.0-beta1/Configure
my $auto_threads=1; # enable threads automatically? true by default
my $default_ranlib;
-@@ -1104,6 +1109,10 @@ while (@argvcopy)
+@@ -1113,6 +1118,10 @@ while (@argvcopy)
die "FIPS key too long (64 bytes max)\n"
if length $1 > 64;
}
@@ -81,11 +81,11 @@ Index: openssl-3.5.0-beta1/Configure
elsif (/^--banner=(.*)$/)
{
$banner = $1 . "\n";
-Index: openssl-3.5.0-beta1/doc/man1/openssl-ciphers.pod.in
+Index: openssl-3.6.0-alpha1/doc/man1/openssl-ciphers.pod.in
===================================================================
---- openssl-3.5.0-beta1.orig/doc/man1/openssl-ciphers.pod.in
-+++ openssl-3.5.0-beta1/doc/man1/openssl-ciphers.pod.in
-@@ -190,6 +190,15 @@ As of OpenSSL 1.0.0, the B<ALL> cipher s
+--- openssl-3.6.0-alpha1.orig/doc/man1/openssl-ciphers.pod.in
++++ openssl-3.6.0-alpha1/doc/man1/openssl-ciphers.pod.in
+@@ -189,6 +189,15 @@ As of OpenSSL 1.0.0, the B<ALL> cipher s
The cipher suites not enabled by B<ALL>, currently B<eNULL>.
@@ -101,10 +101,10 @@ Index: openssl-3.5.0-beta1/doc/man1/open
=item B<HIGH>
"High" encryption cipher suites. This currently means those with key lengths
-Index: openssl-3.5.0-beta1/include/openssl/ssl.h.in
+Index: openssl-3.6.0-alpha1/include/openssl/ssl.h.in
===================================================================
---- openssl-3.5.0-beta1.orig/include/openssl/ssl.h.in
-+++ openssl-3.5.0-beta1/include/openssl/ssl.h.in
+--- openssl-3.6.0-alpha1.orig/include/openssl/ssl.h.in
++++ openssl-3.6.0-alpha1/include/openssl/ssl.h.in
@@ -209,6 +209,11 @@ extern "C" {
* throwing out anonymous and unencrypted ciphersuites! (The latter are not
* actually enabled by ALL, but "ALL:RSA" would enable some of them.)
@@ -117,11 +117,11 @@ Index: openssl-3.5.0-beta1/include/opens
/* Used in SSL_set_shutdown()/SSL_get_shutdown(); */
# define SSL_SENT_SHUTDOWN 1
-Index: openssl-3.5.0-beta1/ssl/ssl_ciph.c
+Index: openssl-3.6.0-alpha1/ssl/ssl_ciph.c
===================================================================
---- openssl-3.5.0-beta1.orig/ssl/ssl_ciph.c
-+++ openssl-3.5.0-beta1/ssl/ssl_ciph.c
-@@ -1421,6 +1421,53 @@ int SSL_set_ciphersuites(SSL *s, const c
+--- openssl-3.6.0-alpha1.orig/ssl/ssl_ciph.c
++++ openssl-3.6.0-alpha1/ssl/ssl_ciph.c
+@@ -1433,6 +1433,53 @@ int SSL_set_ciphersuites(SSL *s, const c
return ret;
}
@@ -175,7 +175,7 @@ Index: openssl-3.5.0-beta1/ssl/ssl_ciph.
STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(SSL_CTX *ctx,
STACK_OF(SSL_CIPHER) *tls13_ciphersuites,
STACK_OF(SSL_CIPHER) **cipher_list,
-@@ -1435,15 +1482,25 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
+@@ -1447,15 +1494,25 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
CIPHER_ORDER *co_list = NULL, *head = NULL, *tail = NULL, *curr;
const SSL_CIPHER **ca_list = NULL;
const SSL_METHOD *ssl_method = ctx->method;
@@ -203,16 +203,16 @@ Index: openssl-3.5.0-beta1/ssl/ssl_ciph.
/*
* To reduce the work to do we only want to process the compiled
-@@ -1465,7 +1522,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
+@@ -1477,7 +1534,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
if (num_of_ciphers > 0) {
- co_list = OPENSSL_malloc(sizeof(*co_list) * num_of_ciphers);
+ co_list = OPENSSL_malloc_array(num_of_ciphers, sizeof(*co_list));
if (co_list == NULL)
- return NULL; /* Failure */
+ goto err;
}
ssl_cipher_collect_ciphers(ssl_method, num_of_ciphers,
-@@ -1531,8 +1588,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
+@@ -1543,8 +1600,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
* in force within each class
*/
if (!ssl_cipher_strength_sort(&head, &tail)) {
@@ -222,9 +222,9 @@ Index: openssl-3.5.0-beta1/ssl/ssl_ciph.
}
/*
-@@ -1576,8 +1632,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
+@@ -1588,8 +1644,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
num_of_alias_max = num_of_ciphers + num_of_group_aliases + 1;
- ca_list = OPENSSL_malloc(sizeof(*ca_list) * num_of_alias_max);
+ ca_list = OPENSSL_malloc_array(num_of_alias_max, sizeof(*ca_list));
if (ca_list == NULL) {
- OPENSSL_free(co_list);
- return NULL; /* Failure */
@@ -232,7 +232,7 @@ Index: openssl-3.5.0-beta1/ssl/ssl_ciph.
}
ssl_cipher_collect_aliases(ca_list, num_of_group_aliases,
disabled_mkey, disabled_auth, disabled_enc,
-@@ -1603,8 +1658,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
+@@ -1615,8 +1670,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
OPENSSL_free(ca_list); /* Not needed anymore */
if (!ok) { /* Rule processing failure */
@@ -242,7 +242,7 @@ Index: openssl-3.5.0-beta1/ssl/ssl_ciph.
}
/*
-@@ -1612,10 +1666,13 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
+@@ -1624,10 +1678,13 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
* if we cannot get one.
*/
if ((cipherstack = sk_SSL_CIPHER_new_null()) == NULL) {
@@ -258,7 +258,7 @@ Index: openssl-3.5.0-beta1/ssl/ssl_ciph.
/* Add TLSv1.3 ciphers first - we always prefer those if possible */
for (i = 0; i < sk_SSL_CIPHER_num(tls13_ciphersuites); i++) {
const SSL_CIPHER *sslc = sk_SSL_CIPHER_value(tls13_ciphersuites, i);
-@@ -1667,6 +1724,14 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
+@@ -1679,6 +1736,14 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_
*cipher_list = cipherstack;
return cipherstack;
@@ -273,11 +273,11 @@ Index: openssl-3.5.0-beta1/ssl/ssl_ciph.
}
char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len)
-Index: openssl-3.5.0-beta1/ssl/ssl_lib.c
+Index: openssl-3.6.0-alpha1/ssl/ssl_lib.c
===================================================================
---- openssl-3.5.0-beta1.orig/ssl/ssl_lib.c
-+++ openssl-3.5.0-beta1/ssl/ssl_lib.c
-@@ -679,7 +679,7 @@ int SSL_CTX_set_ssl_version(SSL_CTX *ctx
+--- openssl-3.6.0-alpha1.orig/ssl/ssl_lib.c
++++ openssl-3.6.0-alpha1/ssl/ssl_lib.c
+@@ -686,7 +686,7 @@ int SSL_CTX_set_ssl_version(SSL_CTX *ctx
ctx->tls13_ciphersuites,
&(ctx->cipher_list),
&(ctx->cipher_list_by_id),
@@ -286,7 +286,7 @@ Index: openssl-3.5.0-beta1/ssl/ssl_lib.c
if ((sk == NULL) || (sk_SSL_CIPHER_num(sk) <= 0)) {
ERR_raise(ERR_LIB_SSL, SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS);
return 0;
-@@ -4099,7 +4099,7 @@ SSL_CTX *SSL_CTX_new_ex(OSSL_LIB_CTX *li
+@@ -4143,7 +4143,7 @@ SSL_CTX *SSL_CTX_new_ex(OSSL_LIB_CTX *li
if (!ssl_create_cipher_list(ret,
ret->tls13_ciphersuites,
&ret->cipher_list, &ret->cipher_list_by_id,
@@ -295,10 +295,10 @@ Index: openssl-3.5.0-beta1/ssl/ssl_lib.c
|| sk_SSL_CIPHER_num(ret->cipher_list) <= 0) {
ERR_raise(ERR_LIB_SSL, SSL_R_LIBRARY_HAS_NO_CIPHERS);
goto err;
-Index: openssl-3.5.0-beta1/test/cipherlist_test.c
+Index: openssl-3.6.0-alpha1/test/cipherlist_test.c
===================================================================
---- openssl-3.5.0-beta1.orig/test/cipherlist_test.c
-+++ openssl-3.5.0-beta1/test/cipherlist_test.c
+--- openssl-3.6.0-alpha1.orig/test/cipherlist_test.c
++++ openssl-3.6.0-alpha1/test/cipherlist_test.c
@@ -261,7 +261,9 @@ end:
int setup_tests(void)
@@ -309,10 +309,10 @@ Index: openssl-3.5.0-beta1/test/cipherli
ADD_TEST(test_default_cipherlist_explicit);
ADD_TEST(test_default_cipherlist_clear);
ADD_TEST(test_stdname_cipherlist);
-Index: openssl-3.5.0-beta1/util/libcrypto.num
+Index: openssl-3.6.0-alpha1/util/libcrypto.num
===================================================================
---- openssl-3.5.0-beta1.orig/util/libcrypto.num
-+++ openssl-3.5.0-beta1/util/libcrypto.num
+--- openssl-3.6.0-alpha1.orig/util/libcrypto.num
++++ openssl-3.6.0-alpha1/util/libcrypto.num
@@ -5536,6 +5536,7 @@ X509_STORE_CTX_set_get_crl
X509_STORE_CTX_set_current_reasons 5664 3_2_0 EXIST::FUNCTION:
OSSL_STORE_delete 5665 3_2_0 EXIST::FUNCTION:
@@ -321,10 +321,10 @@ Index: openssl-3.5.0-beta1/util/libcrypt
OSSL_CMP_CTX_get0_geninfo_ITAVs 5667 3_3_0 EXIST::FUNCTION:CMP
OSSL_CMP_HDR_get0_geninfo_ITAVs 5668 3_3_0 EXIST::FUNCTION:CMP
OSSL_CMP_ITAV_new0_certProfile 5669 3_3_0 EXIST::FUNCTION:CMP
-Index: openssl-3.5.0-beta1/apps/openssl.cnf
+Index: openssl-3.6.0-alpha1/apps/openssl.cnf
===================================================================
---- openssl-3.5.0-beta1.orig/apps/openssl.cnf
-+++ openssl-3.5.0-beta1/apps/openssl.cnf
+--- openssl-3.6.0-alpha1.orig/apps/openssl.cnf
++++ openssl-3.6.0-alpha1/apps/openssl.cnf
@@ -52,6 +52,12 @@ tsa_policy3 = 1.2.3.4.5.7
[openssl_init]
--- openssl-Allow-disabling-of-SHA1-signatures.patch.orig
+++ openssl-Allow-disabling-of-SHA1-signatures.patch
@@ -1,8 +1,8 @@
-Index: openssl-3.5.1/crypto/context.c
+Index: openssl-3.6.0-alpha1/crypto/context.c
===================================================================
---- openssl-3.5.1.orig/crypto/context.c
-+++ openssl-3.5.1/crypto/context.c
-@@ -85,6 +85,8 @@ struct ossl_lib_ctx_st {
+--- openssl-3.6.0-alpha1.orig/crypto/context.c
++++ openssl-3.6.0-alpha1/crypto/context.c
+@@ -84,6 +84,8 @@ struct ossl_lib_ctx_st {
#endif
STACK_OF(SSL_COMP) *comp_methods;
@@ -11,7 +11,7 @@ Index: openssl-3.5.1/crypto/context.c
int ischild;
int conf_diagnostics;
};
-@@ -119,6 +121,23 @@ int ossl_lib_ctx_is_child(OSSL_LIB_CTX *
+@@ -118,6 +120,23 @@ int ossl_lib_ctx_is_child(OSSL_LIB_CTX *
return ctx->ischild;
}
@@ -35,7 +35,7 @@ Index: openssl-3.5.1/crypto/context.c
static void context_deinit_objs(OSSL_LIB_CTX *ctx);
static int context_init(OSSL_LIB_CTX *ctx)
-@@ -235,6 +254,10 @@ static int context_init(OSSL_LIB_CTX *ct
+@@ -230,6 +249,10 @@ static int context_init(OSSL_LIB_CTX *ct
goto err;
#endif
@@ -46,7 +46,7 @@ Index: openssl-3.5.1/crypto/context.c
/* Low priority. */
#ifndef FIPS_MODULE
ctx->child_provider = ossl_child_prov_ctx_new(ctx);
-@@ -382,6 +405,11 @@ static void context_deinit_objs(OSSL_LIB
+@@ -373,6 +396,11 @@ static void context_deinit_objs(OSSL_LIB
}
#endif
@@ -58,7 +58,7 @@ Index: openssl-3.5.1/crypto/context.c
/* Low priority. */
#ifndef FIPS_MODULE
if (ctx->child_provider != NULL) {
-@@ -660,6 +688,9 @@ void *ossl_lib_ctx_get_data(OSSL_LIB_CTX
+@@ -647,6 +675,9 @@ void *ossl_lib_ctx_get_data(OSSL_LIB_CTX
case OSSL_LIB_CTX_COMP_METHODS:
return (void *)&ctx->comp_methods;
@@ -68,7 +68,7 @@ Index: openssl-3.5.1/crypto/context.c
default:
return NULL;
}
-@@ -714,3 +745,44 @@ void OSSL_LIB_CTX_set_conf_diagnostics(O
+@@ -693,3 +724,44 @@ void OSSL_LIB_CTX_set_conf_diagnostics(O
return;
libctx->conf_diagnostics = value;
}
@@ -113,10 +113,10 @@ Index: openssl-3.5.1/crypto/context.c
+ ldsigs->allowed = allow;
+ return 1;
+}
-Index: openssl-3.5.1/crypto/evp/evp_cnf.c
+Index: openssl-3.6.0-alpha1/crypto/evp/evp_cnf.c
===================================================================
---- openssl-3.5.1.orig/crypto/evp/evp_cnf.c
-+++ openssl-3.5.1/crypto/evp/evp_cnf.c
+--- openssl-3.6.0-alpha1.orig/crypto/evp/evp_cnf.c
++++ openssl-3.6.0-alpha1/crypto/evp/evp_cnf.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <openssl/crypto.h>
@@ -144,10 +144,10 @@ Index: openssl-3.5.1/crypto/evp/evp_cnf.
} else {
ERR_raise_data(ERR_LIB_EVP, EVP_R_UNKNOWN_OPTION,
"name=%s, value=%s", oval->name, oval->value);
-Index: openssl-3.5.1/crypto/evp/m_sigver.c
+Index: openssl-3.6.0-alpha1/crypto/evp/m_sigver.c
===================================================================
---- openssl-3.5.1.orig/crypto/evp/m_sigver.c
-+++ openssl-3.5.1/crypto/evp/m_sigver.c
+--- openssl-3.6.0-alpha1.orig/crypto/evp/m_sigver.c
++++ openssl-3.6.0-alpha1/crypto/evp/m_sigver.c
@@ -15,6 +15,7 @@
#include "internal/provider.h"
#include "internal/numbers.h" /* includes SIZE_MAX */
@@ -175,10 +175,10 @@ Index: openssl-3.5.1/crypto/evp/m_sigver
if (ver) {
if (ctx->pctx->pmeth->verifyctx_init) {
if (ctx->pctx->pmeth->verifyctx_init(ctx->pctx, ctx) <= 0)
-Index: openssl-3.5.1/crypto/evp/pmeth_lib.c
+Index: openssl-3.6.0-alpha1/crypto/evp/pmeth_lib.c
===================================================================
---- openssl-3.5.1.orig/crypto/evp/pmeth_lib.c
-+++ openssl-3.5.1/crypto/evp/pmeth_lib.c
+--- openssl-3.6.0-alpha1.orig/crypto/evp/pmeth_lib.c
++++ openssl-3.6.0-alpha1/crypto/evp/pmeth_lib.c
@@ -33,6 +33,7 @@
#include "internal/ffc.h"
#include "internal/numbers.h"
@@ -208,10 +208,10 @@ Index: openssl-3.5.1/crypto/evp/pmeth_li
if (fallback)
return EVP_PKEY_CTX_ctrl(ctx, -1, op, ctrl, 0, (void *)(md));
-Index: openssl-3.5.1/doc/man5/config.pod
+Index: openssl-3.6.0-alpha1/doc/man5/config.pod
===================================================================
---- openssl-3.5.1.orig/doc/man5/config.pod
-+++ openssl-3.5.1/doc/man5/config.pod
+--- openssl-3.6.0-alpha1.orig/doc/man5/config.pod
++++ openssl-3.6.0-alpha1/doc/man5/config.pod
@@ -315,6 +315,21 @@ Within the algorithm properties section,
The value may be anything that is acceptable as a property query
string for EVP_set_default_properties().
@@ -234,10 +234,10 @@ Index: openssl-3.5.1/doc/man5/config.pod
=item B<fips_mode> (deprecated)
The value is a boolean that can be B<yes> or B<no>. If the value is
-Index: openssl-3.5.1/include/crypto/context.h
+Index: openssl-3.6.0-alpha1/include/crypto/context.h
===================================================================
---- openssl-3.5.1.orig/include/crypto/context.h
-+++ openssl-3.5.1/include/crypto/context.h
+--- openssl-3.6.0-alpha1.orig/include/crypto/context.h
++++ openssl-3.6.0-alpha1/include/crypto/context.h
@@ -48,3 +48,11 @@ void ossl_release_default_drbg_ctx(void)
#if defined(OPENSSL_THREADS)
void ossl_threads_ctx_free(void *);
@@ -250,10 +250,10 @@ Index: openssl-3.5.1/include/crypto/cont
+} OSSL_LEGACY_DIGEST_SIGNATURES;
+#endif
+
-Index: openssl-3.5.1/include/internal/cryptlib.h
+Index: openssl-3.6.0-alpha1/include/internal/cryptlib.h
===================================================================
---- openssl-3.5.1.orig/include/internal/cryptlib.h
-+++ openssl-3.5.1/include/internal/cryptlib.h
+--- openssl-3.6.0-alpha1.orig/include/internal/cryptlib.h
++++ openssl-3.6.0-alpha1/include/internal/cryptlib.h
@@ -120,7 +120,8 @@ typedef struct ossl_ex_data_global_st {
# define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
# define OSSL_LIB_CTX_COMP_METHODS 21
@@ -264,10 +264,10 @@ Index: openssl-3.5.1/include/internal/cr
OSSL_LIB_CTX *ossl_lib_ctx_get_concrete(OSSL_LIB_CTX *ctx);
int ossl_lib_ctx_is_default(OSSL_LIB_CTX *ctx);
-Index: openssl-3.5.1/include/internal/sslconf.h
+Index: openssl-3.6.0-alpha1/include/internal/sslconf.h
===================================================================
---- openssl-3.5.1.orig/include/internal/sslconf.h
-+++ openssl-3.5.1/include/internal/sslconf.h
+--- openssl-3.6.0-alpha1.orig/include/internal/sslconf.h
++++ openssl-3.6.0-alpha1/include/internal/sslconf.h
@@ -18,4 +18,8 @@ int conf_ssl_name_find(const char *name,
void conf_ssl_get_cmd(const SSL_CONF_CMD *cmd, size_t idx, char **cmdstr,
char **arg);
@@ -277,20 +277,20 @@ Index: openssl-3.5.1/include/internal/ss
+int ossl_ctx_legacy_digest_signatures_allowed_set(OSSL_LIB_CTX *libctx, int allow,
+ int loadconfig);
#endif
-Index: openssl-3.5.1/providers/common/include/prov/securitycheck.h
+Index: openssl-3.6.0-alpha1/providers/common/include/prov/securitycheck.h
===================================================================
---- openssl-3.5.1.orig/providers/common/include/prov/securitycheck.h
-+++ openssl-3.5.1/providers/common/include/prov/securitycheck.h
+--- openssl-3.6.0-alpha1.orig/providers/common/include/prov/securitycheck.h
++++ openssl-3.6.0-alpha1/providers/common/include/prov/securitycheck.h
@@ -37,3 +37,5 @@ int ossl_digest_get_approved_nid(const E
/* Functions that have different implementations for the FIPS_MODULE */
int ossl_digest_rsa_sign_get_md_nid(const EVP_MD *md);
int ossl_fips_config_securitycheck_enabled(OSSL_LIB_CTX *libctx);
+
+int rh_digest_signatures_allowed(OSSL_LIB_CTX *libctx, int mdnid);
-Index: openssl-3.5.1/providers/common/securitycheck.c
+Index: openssl-3.6.0-alpha1/providers/common/securitycheck.c
===================================================================
---- openssl-3.5.1.orig/providers/common/securitycheck.c
-+++ openssl-3.5.1/providers/common/securitycheck.c
+--- openssl-3.6.0-alpha1.orig/providers/common/securitycheck.c
++++ openssl-3.6.0-alpha1/providers/common/securitycheck.c
@@ -19,6 +19,7 @@
#include <openssl/core_names.h>
#include <openssl/obj_mac.h>
@@ -316,10 +316,10 @@ Index: openssl-3.5.1/providers/common/se
+
+ return mdnid;
+}
-Index: openssl-3.5.1/providers/common/securitycheck_default.c
+Index: openssl-3.6.0-alpha1/providers/common/securitycheck_default.c
===================================================================
---- openssl-3.5.1.orig/providers/common/securitycheck_default.c
-+++ openssl-3.5.1/providers/common/securitycheck_default.c
+--- openssl-3.6.0-alpha1.orig/providers/common/securitycheck_default.c
++++ openssl-3.6.0-alpha1/providers/common/securitycheck_default.c
@@ -15,6 +15,7 @@
#include <openssl/obj_mac.h>
#include "prov/securitycheck.h"
@@ -328,11 +328,11 @@ Index: openssl-3.5.1/providers/common/se
/* Disable the security checks in the default provider */
int ossl_fips_config_securitycheck_enabled(OSSL_LIB_CTX *libctx)
-Index: openssl-3.5.1/providers/implementations/signature/dsa_sig.c
+Index: openssl-3.6.0-alpha1/providers/implementations/signature/dsa_sig.c.in
===================================================================
---- openssl-3.5.1.orig/providers/implementations/signature/dsa_sig.c
-+++ openssl-3.5.1/providers/implementations/signature/dsa_sig.c
-@@ -163,6 +163,7 @@ static int dsa_setup_md(PROV_DSA_CTX *ct
+--- openssl-3.6.0-alpha1.orig/providers/implementations/signature/dsa_sig.c.in
++++ openssl-3.6.0-alpha1/providers/implementations/signature/dsa_sig.c.in
+@@ -166,6 +166,7 @@ static int dsa_setup_md(PROV_DSA_CTX *ct
md = EVP_MD_fetch(ctx->libctx, mdname, mdprops);
md_nid = ossl_digest_get_approved_nid(md);
@@ -340,11 +340,11 @@ Index: openssl-3.5.1/providers/implement
if (md == NULL) {
ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_DIGEST,
-Index: openssl-3.5.1/providers/implementations/signature/ecdsa_sig.c
+Index: openssl-3.6.0-alpha1/providers/implementations/signature/ecdsa_sig.c.in
===================================================================
---- openssl-3.5.1.orig/providers/implementations/signature/ecdsa_sig.c
-+++ openssl-3.5.1/providers/implementations/signature/ecdsa_sig.c
-@@ -197,13 +197,16 @@ static int ecdsa_setup_md(PROV_ECDSA_CTX
+--- openssl-3.6.0-alpha1.orig/providers/implementations/signature/ecdsa_sig.c.in
++++ openssl-3.6.0-alpha1/providers/implementations/signature/ecdsa_sig.c.in
+@@ -200,13 +200,16 @@ static int ecdsa_setup_md(PROV_ECDSA_CTX
goto err;
}
md_nid = ossl_digest_get_approved_nid(md);
@@ -362,11 +362,11 @@ Index: openssl-3.5.1/providers/implement
/* XOF digests don't work */
if (EVP_MD_xof(md)) {
ERR_raise(ERR_LIB_PROV, PROV_R_XOF_DIGESTS_NOT_ALLOWED);
-Index: openssl-3.5.1/providers/implementations/signature/rsa_sig.c
+Index: openssl-3.6.0-alpha1/providers/implementations/signature/rsa_sig.c.in
===================================================================
---- openssl-3.5.1.orig/providers/implementations/signature/rsa_sig.c
-+++ openssl-3.5.1/providers/implementations/signature/rsa_sig.c
-@@ -26,6 +26,7 @@
+--- openssl-3.6.0-alpha1.orig/providers/implementations/signature/rsa_sig.c.in
++++ openssl-3.6.0-alpha1/providers/implementations/signature/rsa_sig.c.in
+@@ -29,6 +29,7 @@ use OpenSSL::paramnames qw(produce_param
#include "internal/cryptlib.h"
#include "internal/nelem.h"
#include "internal/sizes.h"
@@ -374,7 +374,7 @@ Index: openssl-3.5.1/providers/implement
#include "crypto/rsa.h"
#include "prov/providercommon.h"
#include "prov/implementations.h"
-@@ -34,6 +35,7 @@
+@@ -37,6 +38,7 @@ use OpenSSL::paramnames qw(produce_param
#include "prov/securitycheck.h"
#define RSA_DEFAULT_DIGEST_NAME OSSL_DIGEST_NAME_SHA1
@@ -382,7 +382,7 @@ Index: openssl-3.5.1/providers/implement
OSSL_FUNC_signature_newctx_fn rsa_newctx;
static OSSL_FUNC_signature_sign_init_fn rsa_sign_init;
-@@ -387,7 +389,8 @@ static int rsa_setup_md(PROV_RSA_CTX *ct
+@@ -390,7 +392,8 @@ static int rsa_setup_md(PROV_RSA_CTX *ct
goto err;
}
md_nid = ossl_digest_rsa_sign_get_md_nid(md);
@@ -392,7 +392,7 @@ Index: openssl-3.5.1/providers/implement
ERR_raise_data(ERR_LIB_PROV, PROV_R_DIGEST_NOT_ALLOWED,
"digest=%s", mdname);
goto err;
-@@ -475,8 +478,9 @@ static int rsa_setup_mgf1_md(PROV_RSA_CT
+@@ -478,8 +481,9 @@ static int rsa_setup_mgf1_md(PROV_RSA_CT
"%s could not be fetched", mdname);
return 0;
}
@@ -403,7 +403,7 @@ Index: openssl-3.5.1/providers/implement
|| !rsa_check_padding(ctx, NULL, mdname, mdnid)) {
if (mdnid <= 0)
ERR_raise_data(ERR_LIB_PROV, PROV_R_DIGEST_NOT_ALLOWED,
-@@ -1765,8 +1769,13 @@ static int rsa_set_ctx_params(void *vprs
+@@ -1772,8 +1776,13 @@ static int rsa_set_ctx_params(void *vprs
prsactx->pad_mode = pad_mode;
if (prsactx->md == NULL && pmdname == NULL
@@ -419,10 +419,10 @@ Index: openssl-3.5.1/providers/implement
if (pmgf1mdname != NULL
&& !rsa_setup_mgf1_md(prsactx, pmgf1mdname, pmgf1mdprops))
-Index: openssl-3.5.1/ssl/t1_lib.c
+Index: openssl-3.6.0-alpha1/ssl/t1_lib.c
===================================================================
---- openssl-3.5.1.orig/ssl/t1_lib.c
-+++ openssl-3.5.1/ssl/t1_lib.c
+--- openssl-3.6.0-alpha1.orig/ssl/t1_lib.c
++++ openssl-3.6.0-alpha1/ssl/t1_lib.c
@@ -21,6 +21,7 @@
#include <openssl/bn.h>
#include <openssl/provider.h>
@@ -431,7 +431,7 @@ Index: openssl-3.5.1/ssl/t1_lib.c
#include "internal/nelem.h"
#include "internal/sizes.h"
#include "internal/tlsgroups.h"
-@@ -2178,6 +2179,7 @@ int ssl_setup_sigalgs(SSL_CTX *ctx)
+@@ -2189,6 +2190,7 @@ int ssl_setup_sigalgs(SSL_CTX *ctx)
EVP_PKEY *tmpkey = EVP_PKEY_new();
int istls;
int ret = 0;
@@ -439,7 +439,7 @@ Index: openssl-3.5.1/ssl/t1_lib.c
if (ctx == NULL)
goto err;
-@@ -2195,6 +2197,7 @@ int ssl_setup_sigalgs(SSL_CTX *ctx)
+@@ -2206,6 +2208,7 @@ int ssl_setup_sigalgs(SSL_CTX *ctx)
goto err;
ERR_set_mark();
@@ -447,7 +447,7 @@ Index: openssl-3.5.1/ssl/t1_lib.c
/* First fill cache and tls12_sigalgs list from legacy algorithm list */
for (i = 0, lu = sigalg_lookup_tbl;
i < OSSL_NELEM(sigalg_lookup_tbl); lu++, i++) {
-@@ -2215,6 +2218,11 @@ int ssl_setup_sigalgs(SSL_CTX *ctx)
+@@ -2226,6 +2229,11 @@ int ssl_setup_sigalgs(SSL_CTX *ctx)
cache[i].available = 0;
continue;
}
@@ -459,13 +459,13 @@ Index: openssl-3.5.1/ssl/t1_lib.c
if (!EVP_PKEY_set_type(tmpkey, lu->sig)) {
cache[i].available = 0;
-Index: openssl-3.5.1/util/libcrypto.num
+Index: openssl-3.6.0-alpha1/util/libcrypto.num
===================================================================
---- openssl-3.5.1.orig/util/libcrypto.num
-+++ openssl-3.5.1/util/libcrypto.num
-@@ -5925,3 +5925,5 @@ OSSL_AA_DIST_POINT_free
- OSSL_AA_DIST_POINT_new 6052 3_5_0 EXIST::FUNCTION:
- OSSL_AA_DIST_POINT_it 6053 3_5_0 EXIST::FUNCTION:
- PEM_ASN1_write_bio_ctx 6054 3_5_0 EXIST::FUNCTION:
+--- openssl-3.6.0-alpha1.orig/util/libcrypto.num
++++ openssl-3.6.0-alpha1/util/libcrypto.num
+@@ -5948,3 +5948,5 @@ CRYPTO_realloc_array
+ CRYPTO_clear_realloc_array ? 3_6_0 EXIST::FUNCTION:
+ CRYPTO_secure_malloc_array ? 3_6_0 EXIST::FUNCTION:
+ CRYPTO_secure_calloc ? 3_6_0 EXIST::FUNCTION:
+ossl_ctx_legacy_digest_signatures_allowed ? 3_0_1 EXIST::FUNCTION:
+ossl_ctx_legacy_digest_signatures_allowed_set ? 3_0_1 EXIST::FUNCTION:
--- openssl-DH-Disable-FIPS-186-4-type-parameters-in-FIPS-mode.patch.orig
+++ openssl-DH-Disable-FIPS-186-4-type-parameters-in-FIPS-mode.patch
@@ -38,10 +38,10 @@ NOTE: Dropped changes in test/recipes/80
test/recipes/80-test_ssl_old.t | 3 +
11 files changed, 116 insertions(+), 18 deletions(-)
-Index: openssl-3.5.0-beta1/crypto/dh/dh_backend.c
+Index: openssl-3.6.0-alpha1/crypto/dh/dh_backend.c
===================================================================
---- openssl-3.5.0-beta1.orig/crypto/dh/dh_backend.c
-+++ openssl-3.5.0-beta1/crypto/dh/dh_backend.c
+--- openssl-3.6.0-alpha1.orig/crypto/dh/dh_backend.c
++++ openssl-3.6.0-alpha1/crypto/dh/dh_backend.c
@@ -47,6 +47,16 @@ int ossl_dh_params_fromdata(DH *dh, cons
if (!dh_ffc_params_fromdata(dh, params))
return 0;
@@ -59,11 +59,11 @@ Index: openssl-3.5.0-beta1/crypto/dh/dh_
param_priv_len =
OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_DH_PRIV_LEN);
if (param_priv_len != NULL
-Index: openssl-3.5.0-beta1/crypto/dh/dh_check.c
+Index: openssl-3.6.0-alpha1/crypto/dh/dh_check.c
===================================================================
---- openssl-3.5.0-beta1.orig/crypto/dh/dh_check.c
-+++ openssl-3.5.0-beta1/crypto/dh/dh_check.c
-@@ -57,13 +57,15 @@ int DH_check_params(const DH *dh, int *r
+--- openssl-3.6.0-alpha1.orig/crypto/dh/dh_check.c
++++ openssl-3.6.0-alpha1/crypto/dh/dh_check.c
+@@ -58,13 +58,15 @@ int DH_check_params(const DH *dh, int *r
nid = DH_get_nid((DH *)dh);
if (nid != NID_undef)
return 1;
@@ -84,10 +84,10 @@ Index: openssl-3.5.0-beta1/crypto/dh/dh_
}
#else
int DH_check_params(const DH *dh, int *ret)
-Index: openssl-3.5.0-beta1/crypto/dh/dh_gen.c
+Index: openssl-3.6.0-alpha1/crypto/dh/dh_gen.c
===================================================================
---- openssl-3.5.0-beta1.orig/crypto/dh/dh_gen.c
-+++ openssl-3.5.0-beta1/crypto/dh/dh_gen.c
+--- openssl-3.6.0-alpha1.orig/crypto/dh/dh_gen.c
++++ openssl-3.6.0-alpha1/crypto/dh/dh_gen.c
@@ -39,18 +39,26 @@ static int dh_builtin_genparams(DH *ret,
int ossl_dh_generate_ffc_parameters(DH *dh, int type, int pbits, int qbits,
BN_GENCB *cb)
@@ -117,10 +117,10 @@ Index: openssl-3.5.0-beta1/crypto/dh/dh_
if (ret > 0)
dh->dirty_cnt++;
return ret;
-Index: openssl-3.5.0-beta1/crypto/dh/dh_key.c
+Index: openssl-3.6.0-alpha1/crypto/dh/dh_key.c
===================================================================
---- openssl-3.5.0-beta1.orig/crypto/dh/dh_key.c
-+++ openssl-3.5.0-beta1/crypto/dh/dh_key.c
+--- openssl-3.6.0-alpha1.orig/crypto/dh/dh_key.c
++++ openssl-3.6.0-alpha1/crypto/dh/dh_key.c
@@ -336,8 +336,12 @@ static int generate_key(DH *dh)
goto err;
} else {
@@ -135,8 +135,8 @@ Index: openssl-3.5.0-beta1/crypto/dh/dh_
+ goto err;
#else
if (dh->params.q == NULL) {
- /* secret exponent length, must satisfy 2^(l-1) <= p */
-@@ -358,9 +362,7 @@ static int generate_key(DH *dh)
+ /* secret exponent length, must satisfy 2^l < (p-1)/2 */
+@@ -360,9 +364,7 @@ static int generate_key(DH *dh)
if (!BN_clear_bit(priv_key, 0))
goto err;
}
@@ -147,7 +147,7 @@ Index: openssl-3.5.0-beta1/crypto/dh/dh_
/* Do a partial check for invalid p, q, g */
if (!ossl_ffc_params_simple_validate(dh->libctx, &dh->params,
FFC_PARAM_TYPE_DH, NULL))
-@@ -376,6 +378,7 @@ static int generate_key(DH *dh)
+@@ -378,6 +380,7 @@ static int generate_key(DH *dh)
priv_key))
goto err;
}
@@ -155,10 +155,10 @@ Index: openssl-3.5.0-beta1/crypto/dh/dh_
}
}
-Index: openssl-3.5.0-beta1/crypto/dh/dh_pmeth.c
+Index: openssl-3.6.0-alpha1/crypto/dh/dh_pmeth.c
===================================================================
---- openssl-3.5.0-beta1.orig/crypto/dh/dh_pmeth.c
-+++ openssl-3.5.0-beta1/crypto/dh/dh_pmeth.c
+--- openssl-3.6.0-alpha1.orig/crypto/dh/dh_pmeth.c
++++ openssl-3.6.0-alpha1/crypto/dh/dh_pmeth.c
@@ -303,13 +303,17 @@ static DH *ffc_params_generate(OSSL_LIB_
prime_len, subprime_len, &res,
pcb);
@@ -180,11 +180,11 @@ Index: openssl-3.5.0-beta1/crypto/dh/dh_
if (rv <= 0) {
DH_free(ret);
return NULL;
-Index: openssl-3.5.0-beta1/providers/implementations/keymgmt/dh_kmgmt.c
+Index: openssl-3.6.0-alpha1/providers/implementations/keymgmt/dh_kmgmt.c
===================================================================
---- openssl-3.5.0-beta1.orig/providers/implementations/keymgmt/dh_kmgmt.c
-+++ openssl-3.5.0-beta1/providers/implementations/keymgmt/dh_kmgmt.c
-@@ -420,6 +420,11 @@ static int dh_validate(const void *keyda
+--- openssl-3.6.0-alpha1.orig/providers/implementations/keymgmt/dh_kmgmt.c
++++ openssl-3.6.0-alpha1/providers/implementations/keymgmt/dh_kmgmt.c
+@@ -438,6 +438,11 @@ static int dh_validate(const void *keyda
if ((selection & DH_POSSIBLE_SELECTIONS) == 0)
return 1; /* nothing to validate */
@@ -196,10 +196,10 @@ Index: openssl-3.5.0-beta1/providers/imp
if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0) {
/*
* Both of these functions check parameters. DH_check_params_ex()
-Index: openssl-3.5.0-beta1/test/endecode_test.c
+Index: openssl-3.6.0-alpha1/test/endecode_test.c
===================================================================
---- openssl-3.5.0-beta1.orig/test/endecode_test.c
-+++ openssl-3.5.0-beta1/test/endecode_test.c
+--- openssl-3.6.0-alpha1.orig/test/endecode_test.c
++++ openssl-3.6.0-alpha1/test/endecode_test.c
@@ -85,10 +85,10 @@ static EVP_PKEY *make_template(const cha
* for testing only. Use a minimum key size of 2048 for security purposes.
*/
@@ -213,10 +213,10 @@ Index: openssl-3.5.0-beta1/test/endecode
# endif
/*
-Index: openssl-3.5.0-beta1/test/evp_libctx_test.c
+Index: openssl-3.6.0-alpha1/test/evp_libctx_test.c
===================================================================
---- openssl-3.5.0-beta1.orig/test/evp_libctx_test.c
-+++ openssl-3.5.0-beta1/test/evp_libctx_test.c
+--- openssl-3.6.0-alpha1.orig/test/evp_libctx_test.c
++++ openssl-3.6.0-alpha1/test/evp_libctx_test.c
@@ -222,7 +222,7 @@ static int do_dh_param_keygen(int tstid,
if (!TEST_ptr(gen_ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey_parm, NULL))
@@ -226,10 +226,10 @@ Index: openssl-3.5.0-beta1/test/evp_libc
goto err;
if (expected) {
-Index: openssl-3.5.0-beta1/test/helpers/predefined_dhparams.c
+Index: openssl-3.6.0-alpha1/test/helpers/predefined_dhparams.c
===================================================================
---- openssl-3.5.0-beta1.orig/test/helpers/predefined_dhparams.c
-+++ openssl-3.5.0-beta1/test/helpers/predefined_dhparams.c
+--- openssl-3.6.0-alpha1.orig/test/helpers/predefined_dhparams.c
++++ openssl-3.6.0-alpha1/test/helpers/predefined_dhparams.c
@@ -116,6 +116,68 @@ EVP_PKEY *get_dhx512(OSSL_LIB_CTX *libct
dhx512_q, sizeof(dhx512_q));
}
@@ -299,10 +299,10 @@ Index: openssl-3.5.0-beta1/test/helpers/
EVP_PKEY *get_dh1024dsa(OSSL_LIB_CTX *libctx)
{
static unsigned char dh1024_p[] = {
-Index: openssl-3.5.0-beta1/test/helpers/predefined_dhparams.h
+Index: openssl-3.6.0-alpha1/test/helpers/predefined_dhparams.h
===================================================================
---- openssl-3.5.0-beta1.orig/test/helpers/predefined_dhparams.h
-+++ openssl-3.5.0-beta1/test/helpers/predefined_dhparams.h
+--- openssl-3.6.0-alpha1.orig/test/helpers/predefined_dhparams.h
++++ openssl-3.6.0-alpha1/test/helpers/predefined_dhparams.h
@@ -12,6 +12,7 @@
#ifndef OPENSSL_NO_DH
EVP_PKEY *get_dh512(OSSL_LIB_CTX *libctx);
@@ -311,10 +311,10 @@ Index: openssl-3.5.0-beta1/test/helpers/
EVP_PKEY *get_dh1024dsa(OSSL_LIB_CTX *libct);
EVP_PKEY *get_dh2048(OSSL_LIB_CTX *libctx);
EVP_PKEY *get_dh4096(OSSL_LIB_CTX *libctx);
-Index: openssl-3.5.0-beta1/test/recipes/80-test_ssl_old.t
+Index: openssl-3.6.0-alpha1/test/recipes/80-test_ssl_old.t
===================================================================
---- openssl-3.5.0-beta1.orig/test/recipes/80-test_ssl_old.t
-+++ openssl-3.5.0-beta1/test/recipes/80-test_ssl_old.t
+--- openssl-3.6.0-alpha1.orig/test/recipes/80-test_ssl_old.t
++++ openssl-3.6.0-alpha1/test/recipes/80-test_ssl_old.t
@@ -458,6 +458,9 @@ sub testssl {
skip "skipping dhe1024dsa test", 1
if ($no_dh);
--- openssl-Disable-explicit-ec.patch.orig
+++ openssl-Disable-explicit-ec.patch
@@ -17,11 +17,11 @@ From-dist-git-commit: 4334bc837fbc64d148
.../30-test_evp_data/evppkey_ecdsa.txt | 12 ----------
5 files changed, 39 insertions(+), 32 deletions(-)
-diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c
-index 643d2d8d7b..5895606176 100644
---- a/crypto/ec/ec_asn1.c
-+++ b/crypto/ec/ec_asn1.c
-@@ -901,6 +901,12 @@ EC_GROUP *d2i_ECPKParameters(EC_GROUP **a, const unsigned char **in, long len)
+Index: openssl-3.6.0-alpha1/crypto/ec/ec_asn1.c
+===================================================================
+--- openssl-3.6.0-alpha1.orig/crypto/ec/ec_asn1.c
++++ openssl-3.6.0-alpha1/crypto/ec/ec_asn1.c
+@@ -901,6 +901,12 @@ EC_GROUP *d2i_ECPKParameters(EC_GROUP **
if (params->type == ECPKPARAMETERS_TYPE_EXPLICIT)
group->decoded_from_explicit_params = 1;
@@ -34,7 +34,7 @@ index 643d2d8d7b..5895606176 100644
if (a) {
EC_GROUP_free(*a);
*a = group;
-@@ -960,6 +966,11 @@ EC_KEY *d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len)
+@@ -960,6 +966,11 @@ EC_KEY *d2i_ECPrivateKey(EC_KEY **a, con
goto err;
}
@@ -46,11 +46,11 @@ index 643d2d8d7b..5895606176 100644
ret->version = priv_key->version;
if (priv_key->privateKey) {
-diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c
-index b55677fb1f..dcfdef408e 100644
---- a/crypto/ec/ec_lib.c
-+++ b/crypto/ec/ec_lib.c
-@@ -1728,6 +1728,11 @@ EC_GROUP *EC_GROUP_new_from_params(const OSSL_PARAM params[],
+Index: openssl-3.6.0-alpha1/crypto/ec/ec_lib.c
+===================================================================
+--- openssl-3.6.0-alpha1.orig/crypto/ec/ec_lib.c
++++ openssl-3.6.0-alpha1/crypto/ec/ec_lib.c
+@@ -1728,6 +1728,11 @@ EC_GROUP *EC_GROUP_new_from_params(const
goto err;
}
if (named_group == group) {
@@ -62,7 +62,7 @@ index b55677fb1f..dcfdef408e 100644
/*
* If we did not find a named group then the encoding should be explicit
* if it was specified
-@@ -1743,6 +1748,7 @@ EC_GROUP *EC_GROUP_new_from_params(const OSSL_PARAM params[],
+@@ -1743,6 +1748,7 @@ EC_GROUP *EC_GROUP_new_from_params(const
goto err;
}
EC_GROUP_set_asn1_flag(group, OPENSSL_EC_EXPLICIT_CURVE);
@@ -70,11 +70,11 @@ index b55677fb1f..dcfdef408e 100644
} else {
EC_GROUP_free(group);
group = named_group;
-diff --git a/test/ectest.c b/test/ectest.c
-index 0ddbba3b98..f736d13feb 100644
---- a/test/ectest.c
-+++ b/test/ectest.c
-@@ -2413,10 +2413,11 @@ static int do_test_custom_explicit_fromdata(EC_GROUP *group, BN_CTX *ctx,
+Index: openssl-3.6.0-alpha1/test/ectest.c
+===================================================================
+--- openssl-3.6.0-alpha1.orig/test/ectest.c
++++ openssl-3.6.0-alpha1/test/ectest.c
+@@ -2413,10 +2413,11 @@ static int do_test_custom_explicit_fromd
if (!TEST_ptr(params = OSSL_PARAM_BLD_to_param(bld))
|| !TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(NULL, "EC", NULL))
|| !TEST_int_gt(EVP_PKEY_fromdata_init(pctx), 0)
@@ -88,7 +88,7 @@ index 0ddbba3b98..f736d13feb 100644
/*- Check that all the set values are retrievable -*/
/* There should be no match to a group name since the generator changed */
-@@ -2545,6 +2546,7 @@ static int do_test_custom_explicit_fromdata(EC_GROUP *group, BN_CTX *ctx,
+@@ -2545,6 +2546,7 @@ static int do_test_custom_explicit_fromd
#endif
)
goto err;
@@ -96,16 +96,16 @@ index 0ddbba3b98..f736d13feb 100644
ret = 1;
err:
BN_free(order_out);
-@@ -2826,21 +2828,21 @@ static int custom_params_test(int id)
+@@ -2830,21 +2832,22 @@ static int custom_params_test(int id)
/* Compute keyexchange in both directions */
if (!TEST_ptr(pctx1 = EVP_PKEY_CTX_new(pkey1, NULL))
- || !TEST_int_eq(EVP_PKEY_derive_init(pctx1), 1)
- || !TEST_int_eq(EVP_PKEY_derive_set_peer(pctx1, pkey2), 1)
+ || !TEST_int_le(EVP_PKEY_derive_init(pctx1), 0)
-+/* || !TEST_int_eq(EVP_PKEY_derive_set_peer(pctx1, pkey2), 1)
++ /* || !TEST_int_eq(EVP_PKEY_derive_set_peer(pctx1, pkey2), 1)
|| !TEST_int_eq(EVP_PKEY_derive(pctx1, NULL, &sslen), 1)
- || !TEST_int_gt(bsize, sslen)
+ || !TEST_size_t_gt(bsize, sslen)
- || !TEST_int_eq(EVP_PKEY_derive(pctx1, buf1, &sslen), 1))
+ || !TEST_int_eq(EVP_PKEY_derive(pctx1, buf1, &sslen), 1)*/)
goto err;
@@ -113,31 +113,31 @@ index 0ddbba3b98..f736d13feb 100644
- || !TEST_int_eq(EVP_PKEY_derive_init(pctx2), 1)
- || !TEST_int_eq(EVP_PKEY_derive_set_peer(pctx2, pkey1), 1)
+ || !TEST_int_le(EVP_PKEY_derive_init(pctx2), 1)
-+/* || !TEST_int_eq(EVP_PKEY_derive_set_peer(pctx2, pkey1), 1)
++ /* || !TEST_int_eq(EVP_PKEY_derive_set_peer(pctx2, pkey1), 1)
|| !TEST_int_eq(EVP_PKEY_derive(pctx2, NULL, &t), 1)
- || !TEST_int_gt(bsize, t)
- || !TEST_int_le(sslen, t)
+ || !TEST_size_t_gt(bsize, t)
+ || !TEST_size_t_le(sslen, t)
- || !TEST_int_eq(EVP_PKEY_derive(pctx2, buf2, &t), 1))
-+ || !TEST_int_eq(EVP_PKEY_derive(pctx2, buf2, &t), 1) */)
++ || !TEST_int_eq(EVP_PKEY_derive(pctx2, buf2, &t), 1)*/)
goto err;
--
+
+#if 0
/* Both sides should expect the same shared secret */
if (!TEST_mem_eq(buf1, sslen, buf2, t))
goto err;
-@@ -2892,7 +2894,7 @@ static int custom_params_test(int id)
+@@ -2909,7 +2912,7 @@ static int custom_params_test(int id)
/* compare with previous result */
- || !TEST_mem_eq(buf1, t, buf2, sslen))
+ || !TEST_mem_eq(export, export_size, buf2, sslen))
goto err;
-
+#endif
ret = 1;
err:
-diff --git a/test/endecode_test.c b/test/endecode_test.c
-index 028deb4ed1..85c84f6592 100644
---- a/test/endecode_test.c
-+++ b/test/endecode_test.c
+Index: openssl-3.6.0-alpha1/test/endecode_test.c
+===================================================================
+--- openssl-3.6.0-alpha1.orig/test/endecode_test.c
++++ openssl-3.6.0-alpha1/test/endecode_test.c
@@ -63,7 +63,7 @@ static BN_CTX *bnctx = NULL;
static OSSL_PARAM_BLD *bld_prime_nc = NULL;
static OSSL_PARAM_BLD *bld_prime = NULL;
@@ -147,7 +147,7 @@ index 028deb4ed1..85c84f6592 100644
# ifndef OPENSSL_NO_EC2M
static OSSL_PARAM_BLD *bld_tri_nc = NULL;
-@@ -1027,9 +1027,9 @@ IMPLEMENT_TEST_SUITE_LEGACY(EC, "EC")
+@@ -1073,9 +1073,9 @@ IMPLEMENT_TEST_SUITE_LEGACY(EC, "EC")
DOMAIN_KEYS(ECExplicitPrimeNamedCurve);
IMPLEMENT_TEST_SUITE(ECExplicitPrimeNamedCurve, "EC", 1)
IMPLEMENT_TEST_SUITE_LEGACY(ECExplicitPrimeNamedCurve, "EC")
@@ -160,7 +160,7 @@ index 028deb4ed1..85c84f6592 100644
# ifndef OPENSSL_NO_EC2M
DOMAIN_KEYS(ECExplicitTriNamedCurve);
IMPLEMENT_TEST_SUITE(ECExplicitTriNamedCurve, "EC", 1)
-@@ -1445,7 +1445,7 @@ int setup_tests(void)
+@@ -1491,7 +1491,7 @@ int setup_tests(void)
|| !create_ec_explicit_prime_params_namedcurve(bld_prime_nc)
|| !create_ec_explicit_prime_params(bld_prime)
|| !TEST_ptr(ec_explicit_prime_params_nc = OSSL_PARAM_BLD_to_param(bld_prime_nc))
@@ -169,7 +169,7 @@ index 028deb4ed1..85c84f6592 100644
# ifndef OPENSSL_NO_EC2M
|| !TEST_ptr(bld_tri_nc = OSSL_PARAM_BLD_new())
|| !TEST_ptr(bld_tri = OSSL_PARAM_BLD_new())
-@@ -1473,7 +1473,7 @@ int setup_tests(void)
+@@ -1519,7 +1519,7 @@ int setup_tests(void)
TEST_info("Generating EC keys...");
MAKE_DOMAIN_KEYS(EC, "EC", EC_params);
MAKE_DOMAIN_KEYS(ECExplicitPrimeNamedCurve, "EC", ec_explicit_prime_params_nc);
@@ -178,7 +178,7 @@ index 028deb4ed1..85c84f6592 100644
# ifndef OPENSSL_NO_EC2M
MAKE_DOMAIN_KEYS(ECExplicitTriNamedCurve, "EC", ec_explicit_tri_params_nc);
MAKE_DOMAIN_KEYS(ECExplicitTri2G, "EC", ec_explicit_tri_params_explicit);
-@@ -1553,8 +1553,8 @@ int setup_tests(void)
+@@ -1599,8 +1599,8 @@ int setup_tests(void)
ADD_TEST_SUITE_LEGACY(EC);
ADD_TEST_SUITE(ECExplicitPrimeNamedCurve);
ADD_TEST_SUITE_LEGACY(ECExplicitPrimeNamedCurve);
@@ -189,7 +189,7 @@ index 028deb4ed1..85c84f6592 100644
# ifndef OPENSSL_NO_EC2M
ADD_TEST_SUITE(ECExplicitTriNamedCurve);
ADD_TEST_SUITE_LEGACY(ECExplicitTriNamedCurve);
-@@ -1631,7 +1631,7 @@ void cleanup_tests(void)
+@@ -1677,7 +1677,7 @@ void cleanup_tests(void)
{
#ifndef OPENSSL_NO_EC
OSSL_PARAM_free(ec_explicit_prime_params_nc);
@@ -198,7 +198,7 @@ index 028deb4ed1..85c84f6592 100644
OSSL_PARAM_BLD_free(bld_prime_nc);
OSSL_PARAM_BLD_free(bld_prime);
# ifndef OPENSSL_NO_EC2M
-@@ -1653,7 +1653,7 @@ void cleanup_tests(void)
+@@ -1699,7 +1699,7 @@ void cleanup_tests(void)
#ifndef OPENSSL_NO_EC
FREE_DOMAIN_KEYS(EC);
FREE_DOMAIN_KEYS(ECExplicitPrimeNamedCurve);
@@ -207,11 +207,11 @@ index 028deb4ed1..85c84f6592 100644
# ifndef OPENSSL_NO_EC2M
FREE_DOMAIN_KEYS(ECExplicitTriNamedCurve);
FREE_DOMAIN_KEYS(ECExplicitTri2G);
-diff --git a/test/recipes/30-test_evp_data/evppkey_ecdsa.txt b/test/recipes/30-test_evp_data/evppkey_ecdsa.txt
-index 54b143bead..06ec905be0 100644
---- a/test/recipes/30-test_evp_data/evppkey_ecdsa.txt
-+++ b/test/recipes/30-test_evp_data/evppkey_ecdsa.txt
-@@ -133,18 +133,6 @@ AAAA//////////+85vqtpxeehPO5ysL8YyVRAgEBBG0wawIBAQQgiUTxtr5vLVjj
+Index: openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_ecdsa.txt
+===================================================================
+--- openssl-3.6.0-alpha1.orig/test/recipes/30-test_evp_data/evppkey_ecdsa.txt
++++ openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_ecdsa.txt
+@@ -140,18 +140,6 @@ AAAA//////////+85vqtpxeehPO5ysL8YyVRAgEB
3ev1gTwRBduzqqlwd54AUSgI+pjttW8zrWNitO8H1sf59MPWOESKxNtZ1+Nl
-----END PRIVATE KEY-----
@@ -230,6 +230,3 @@ index 54b143bead..06ec905be0 100644
PrivateKey = B-163
-----BEGIN PRIVATE KEY-----
MGMCAQAwEAYHKoZIzj0CAQYFK4EEAA8ETDBKAgEBBBUDnQW0mLiHVha/jqFznX/K
---
-2.49.0
-
--- openssl-FIPS-140-3-keychecks.patch.orig
+++ openssl-FIPS-140-3-keychecks.patch
@@ -9,11 +9,11 @@ Signed-off-by: Simo Sorce <simo@redhat.c
providers/implementations/signature/rsa_sig.c | 47 +++++++++++++++++--
2 files changed, 61 insertions(+), 4 deletions(-)
-Index: openssl-3.5.2/providers/implementations/keymgmt/rsa_kmgmt.c
+Index: openssl-3.6.0-alpha1/providers/implementations/keymgmt/rsa_kmgmt.c
===================================================================
---- openssl-3.5.2.orig/providers/implementations/keymgmt/rsa_kmgmt.c
-+++ openssl-3.5.2/providers/implementations/keymgmt/rsa_kmgmt.c
-@@ -451,6 +451,7 @@ struct rsa_gen_ctx {
+--- openssl-3.6.0-alpha1.orig/providers/implementations/keymgmt/rsa_kmgmt.c
++++ openssl-3.6.0-alpha1/providers/implementations/keymgmt/rsa_kmgmt.c
+@@ -455,6 +455,7 @@ struct rsa_gen_ctx {
#if defined(FIPS_MODULE) && !defined(OPENSSL_NO_ACVP_TESTS)
/* ACVP test parameters */
OSSL_PARAM *acvp_test_params;
@@ -21,7 +21,7 @@ Index: openssl-3.5.2/providers/implement
#endif
};
-@@ -464,6 +465,12 @@ static int rsa_gencb(int p, int n, BN_GE
+@@ -468,6 +469,12 @@ static int rsa_gencb(int p, int n, BN_GE
return gctx->cb(params, gctx->cbarg);
}
@@ -34,7 +34,7 @@ Index: openssl-3.5.2/providers/implement
static void *gen_init(void *provctx, int selection, int rsa_type,
const OSSL_PARAM params[])
{
-@@ -491,6 +498,10 @@ static void *gen_init(void *provctx, int
+@@ -495,6 +502,10 @@ static void *gen_init(void *provctx, int
if (!rsa_gen_set_params(gctx, params))
goto err;
@@ -45,7 +45,7 @@ Index: openssl-3.5.2/providers/implement
return gctx;
err:
-@@ -647,6 +658,11 @@ static void *rsa_gen(void *genctx, OSSL_
+@@ -651,6 +662,11 @@ static void *rsa_gen(void *genctx, OSSL_
rsa = rsa_tmp;
rsa_tmp = NULL;
@@ -57,7 +57,7 @@ Index: openssl-3.5.2/providers/implement
err:
BN_GENCB_free(gencb);
RSA_free(rsa_tmp);
-@@ -662,6 +678,8 @@ static void rsa_gen_cleanup(void *genctx
+@@ -666,6 +682,8 @@ static void rsa_gen_cleanup(void *genctx
#if defined(FIPS_MODULE) && !defined(OPENSSL_NO_ACVP_TESTS)
ossl_rsa_acvp_test_gen_params_free(gctx->acvp_test_params);
gctx->acvp_test_params = NULL;
@@ -66,96 +66,10 @@ Index: openssl-3.5.2/providers/implement
#endif
BN_clear_free(gctx->pub_exp);
OPENSSL_free(gctx);
-Index: openssl-3.5.2/providers/implementations/signature/rsa_sig.c
+Index: openssl-3.6.0-alpha1/crypto/dh/dh_key.c
===================================================================
---- openssl-3.5.2.orig/providers/implementations/signature/rsa_sig.c
-+++ openssl-3.5.2/providers/implementations/signature/rsa_sig.c
-@@ -35,7 +35,7 @@
-
- #define RSA_DEFAULT_DIGEST_NAME OSSL_DIGEST_NAME_SHA1
-
--static OSSL_FUNC_signature_newctx_fn rsa_newctx;
-+OSSL_FUNC_signature_newctx_fn rsa_newctx;
- static OSSL_FUNC_signature_sign_init_fn rsa_sign_init;
- static OSSL_FUNC_signature_verify_init_fn rsa_verify_init;
- static OSSL_FUNC_signature_verify_recover_init_fn rsa_verify_recover_init;
-@@ -52,7 +52,7 @@ static OSSL_FUNC_signature_digest_sign_f
- static OSSL_FUNC_signature_digest_verify_init_fn rsa_digest_verify_init;
- static OSSL_FUNC_signature_digest_verify_update_fn rsa_digest_verify_update;
- static OSSL_FUNC_signature_digest_verify_final_fn rsa_digest_verify_final;
--static OSSL_FUNC_signature_freectx_fn rsa_freectx;
-+OSSL_FUNC_signature_freectx_fn rsa_freectx;
- static OSSL_FUNC_signature_dupctx_fn rsa_dupctx;
- static OSSL_FUNC_signature_query_key_types_fn rsa_sigalg_query_key_types;
- static OSSL_FUNC_signature_get_ctx_params_fn rsa_get_ctx_params;
-@@ -224,7 +224,7 @@ static int rsa_check_parameters(PROV_RSA
- return 1;
- }
-
--static void *rsa_newctx(void *provctx, const char *propq)
-+void *rsa_newctx(void *provctx, const char *propq)
- {
- PROV_RSA_CTX *prsactx = NULL;
- char *propq_copy = NULL;
-@@ -1313,7 +1313,7 @@ int rsa_digest_verify_final(void *vprsac
- return ok;
- }
-
--static void rsa_freectx(void *vprsactx)
-+void rsa_freectx(void *vprsactx)
- {
- PROV_RSA_CTX *prsactx = (PROV_RSA_CTX *)vprsactx;
-
-@@ -1858,6 +1858,45 @@ static const OSSL_PARAM *rsa_settable_ct
- return EVP_MD_settable_ctx_params(prsactx->md);
- }
-
-+#ifdef FIPS_MODULE
-+int do_rsa_pct(void *vctx, const char *mdname, void *rsa)
-+{
-+ static const unsigned char data[32];
-+ unsigned char *sigbuf = NULL;
-+ size_t siglen = 0;
-+ int ret = 0;
-+
-+ if (rsa_digest_sign_init(vctx, mdname, rsa, NULL) <= 0)
-+ return 0;
-+
-+ if (rsa_digest_sign_update(vctx, data, sizeof(data)) <= 0)
-+ return 0;
-+
-+ if (rsa_digest_sign_final(vctx, NULL, &siglen, 0) <= 0)
-+ return 0;
-+
-+ if ((sigbuf = OPENSSL_malloc(siglen)) == NULL)
-+ return 0;
-+
-+ if (rsa_digest_sign_final(vctx, sigbuf, &siglen, siglen) <= 0)
-+ goto err;
-+
-+ if (rsa_digest_verify_init(vctx, mdname, rsa, NULL) <= 0)
-+ goto err;
-+
-+ if (rsa_digest_verify_update(vctx, data, sizeof(data)) <= 0)
-+ goto err;
-+
-+ if (rsa_digest_verify_final(vctx, sigbuf, siglen) <= 0)
-+ goto err;
-+ ret = 1;
-+
-+ err:
-+ OPENSSL_free(sigbuf);
-+ return ret;
-+}
-+#endif
-+
- const OSSL_DISPATCH ossl_rsa_signature_functions[] = {
- { OSSL_FUNC_SIGNATURE_NEWCTX, (void (*)(void))rsa_newctx },
- { OSSL_FUNC_SIGNATURE_SIGN_INIT, (void (*)(void))rsa_sign_init },
-Index: openssl-3.5.2/crypto/dh/dh_key.c
-===================================================================
---- openssl-3.5.2.orig/crypto/dh/dh_key.c
-+++ openssl-3.5.2/crypto/dh/dh_key.c
+--- openssl-3.6.0-alpha1.orig/crypto/dh/dh_key.c
++++ openssl-3.6.0-alpha1/crypto/dh/dh_key.c
@@ -43,6 +43,9 @@ int ossl_dh_compute_key(unsigned char *k
BN_MONT_CTX *mont = NULL;
BIGNUM *z = NULL, *pminus1;
@@ -190,7 +104,7 @@ Index: openssl-3.5.2/crypto/dh/dh_key.c
if (BN_num_bits(dh->params.p) > OPENSSL_DH_MAX_MODULUS_BITS) {
ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_LARGE);
-@@ -369,8 +382,21 @@ static int generate_key(DH *dh)
+@@ -371,8 +384,21 @@ static int generate_key(DH *dh)
if (!ossl_dh_generate_public_key(ctx, dh, priv_key, pub_key))
goto err;
@@ -212,41 +126,11 @@ Index: openssl-3.5.2/crypto/dh/dh_key.c
dh->dirty_cnt++;
ok = 1;
err:
-Index: openssl-3.5.2/providers/implementations/exchange/ecdh_exch.c
-===================================================================
---- openssl-3.5.2.orig/providers/implementations/exchange/ecdh_exch.c
-+++ openssl-3.5.2/providers/implementations/exchange/ecdh_exch.c
-@@ -560,6 +560,25 @@ int ecdh_plain_derive(void *vpecdhctx, u
- #endif
-
- ppubkey = EC_KEY_get0_public_key(pecdhctx->peerk);
-+#ifdef FIPS_MODULE
-+ {
-+ BN_CTX *bn_ctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(privk));
-+ int check = 0;
-+
-+ if (bn_ctx == NULL) {
-+ ERR_raise(ERR_LIB_PROV, ERR_R_MALLOC_FAILURE);
-+ goto end;
-+ }
-+
-+ check = ossl_ec_key_public_check(pecdhctx->peerk, bn_ctx);
-+ BN_CTX_free(bn_ctx);
-+
-+ if (check <= 0) {
-+ ERR_raise(ERR_LIB_PROV, EC_R_INVALID_PEER_KEY);
-+ goto end;
-+ }
-+ }
-+#endif
-
- retlen = ECDH_compute_key(secret, size, ppubkey, privk, NULL);
-
-Index: openssl-3.5.2/providers/implementations/keymgmt/ec_kmgmt.c
+Index: openssl-3.6.0-alpha1/providers/implementations/keymgmt/ec_kmgmt.c
===================================================================
---- openssl-3.5.2.orig/providers/implementations/keymgmt/ec_kmgmt.c
-+++ openssl-3.5.2/providers/implementations/keymgmt/ec_kmgmt.c
-@@ -1010,9 +1010,18 @@ struct ec_gen_ctx {
+--- openssl-3.6.0-alpha1.orig/providers/implementations/keymgmt/ec_kmgmt.c
++++ openssl-3.6.0-alpha1/providers/implementations/keymgmt/ec_kmgmt.c
+@@ -1014,9 +1014,18 @@ struct ec_gen_ctx {
EC_GROUP *gen_group;
unsigned char *dhkem_ikm;
size_t dhkem_ikmlen;
@@ -265,7 +149,7 @@ Index: openssl-3.5.2/providers/implement
static void *ec_gen_init(void *provctx, int selection,
const OSSL_PARAM params[])
{
-@@ -1032,6 +1041,10 @@ static void *ec_gen_init(void *provctx,
+@@ -1036,6 +1045,10 @@ static void *ec_gen_init(void *provctx,
gctx = NULL;
}
}
@@ -276,7 +160,7 @@ Index: openssl-3.5.2/providers/implement
return gctx;
}
-@@ -1343,6 +1356,12 @@ static void *ec_gen(void *genctx, OSSL_C
+@@ -1347,6 +1360,12 @@ static void *ec_gen(void *genctx, OSSL_C
if (gctx->ecdh_mode != -1)
ret = ret && ossl_ec_set_ecdh_cofactor_mode(ec, gctx->ecdh_mode);
@@ -289,7 +173,7 @@ Index: openssl-3.5.2/providers/implement
if (gctx->group_check != NULL)
ret = ret && ossl_ec_set_check_group_type_from_name(ec,
-@@ -1413,7 +1432,10 @@ static void ec_gen_cleanup(void *genctx)
+@@ -1432,7 +1451,10 @@ static void ec_gen_cleanup(void *genctx)
if (gctx == NULL)
return;
@@ -301,11 +185,41 @@ Index: openssl-3.5.2/providers/implement
OPENSSL_clear_free(gctx->dhkem_ikm, gctx->dhkem_ikmlen);
EC_GROUP_free(gctx->gen_group);
BN_free(gctx->p);
-Index: openssl-3.5.2/providers/implementations/signature/ecdsa_sig.c
+Index: openssl-3.6.0-alpha1/providers/implementations/exchange/ecdh_exch.c.in
===================================================================
---- openssl-3.5.2.orig/providers/implementations/signature/ecdsa_sig.c
-+++ openssl-3.5.2/providers/implementations/signature/ecdsa_sig.c
-@@ -33,7 +33,7 @@
+--- openssl-3.6.0-alpha1.orig/providers/implementations/exchange/ecdh_exch.c.in
++++ openssl-3.6.0-alpha1/providers/implementations/exchange/ecdh_exch.c.in
+@@ -545,6 +545,25 @@ int ecdh_plain_derive(void *vpecdhctx, u
+ #endif
+
+ ppubkey = EC_KEY_get0_public_key(pecdhctx->peerk);
++#ifdef FIPS_MODULE
++ {
++ BN_CTX *bn_ctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(privk));
++ int check = 0;
++
++ if (bn_ctx == NULL) {
++ ERR_raise(ERR_LIB_PROV, ERR_R_MALLOC_FAILURE);
++ goto end;
++ }
++
++ check = ossl_ec_key_public_check(pecdhctx->peerk, bn_ctx);
++ BN_CTX_free(bn_ctx);
++
++ if (check <= 0) {
++ ERR_raise(ERR_LIB_PROV, EC_R_INVALID_PEER_KEY);
++ goto end;
++ }
++ }
++#endif
+
+ retlen = ECDH_compute_key(secret, size, ppubkey, privk, NULL);
+
+Index: openssl-3.6.0-alpha1/providers/implementations/signature/ecdsa_sig.c.in
+===================================================================
+--- openssl-3.6.0-alpha1.orig/providers/implementations/signature/ecdsa_sig.c.in
++++ openssl-3.6.0-alpha1/providers/implementations/signature/ecdsa_sig.c.in
+@@ -36,7 +36,7 @@ use OpenSSL::paramnames qw(produce_param
#include "prov/der_ec.h"
#include "crypto/ec.h"
@@ -314,7 +228,7 @@ Index: openssl-3.5.2/providers/implement
static OSSL_FUNC_signature_sign_init_fn ecdsa_sign_init;
static OSSL_FUNC_signature_verify_init_fn ecdsa_verify_init;
static OSSL_FUNC_signature_sign_fn ecdsa_sign;
-@@ -48,7 +48,7 @@ static OSSL_FUNC_signature_digest_sign_f
+@@ -51,7 +51,7 @@ static OSSL_FUNC_signature_digest_sign_f
static OSSL_FUNC_signature_digest_verify_init_fn ecdsa_digest_verify_init;
static OSSL_FUNC_signature_digest_verify_update_fn ecdsa_digest_signverify_update;
static OSSL_FUNC_signature_digest_verify_final_fn ecdsa_digest_verify_final;
@@ -323,7 +237,7 @@ Index: openssl-3.5.2/providers/implement
static OSSL_FUNC_signature_dupctx_fn ecdsa_dupctx;
static OSSL_FUNC_signature_query_key_types_fn ecdsa_sigalg_query_key_types;
static OSSL_FUNC_signature_get_ctx_params_fn ecdsa_get_ctx_params;
-@@ -139,7 +139,7 @@ typedef struct {
+@@ -142,7 +142,7 @@ typedef struct {
OSSL_FIPS_IND_DECLARE
} PROV_ECDSA_CTX;
@@ -332,7 +246,7 @@ Index: openssl-3.5.2/providers/implement
{
PROV_ECDSA_CTX *ctx;
-@@ -612,7 +612,7 @@ int ecdsa_digest_verify_final(void *vctx
+@@ -615,7 +615,7 @@ int ecdsa_digest_verify_final(void *vctx
return ok;
}
@@ -341,7 +255,7 @@ Index: openssl-3.5.2/providers/implement
{
PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
-@@ -861,6 +861,35 @@ static const OSSL_PARAM *ecdsa_settable_
+@@ -860,6 +860,35 @@ static const OSSL_PARAM *ecdsa_settable_
return EVP_MD_settable_ctx_params(ctx->md);
}
@@ -377,3 +291,89 @@ Index: openssl-3.5.2/providers/implement
const OSSL_DISPATCH ossl_ecdsa_signature_functions[] = {
{ OSSL_FUNC_SIGNATURE_NEWCTX, (void (*)(void))ecdsa_newctx },
{ OSSL_FUNC_SIGNATURE_SIGN_INIT, (void (*)(void))ecdsa_sign_init },
+Index: openssl-3.6.0-alpha1/providers/implementations/signature/rsa_sig.c.in
+===================================================================
+--- openssl-3.6.0-alpha1.orig/providers/implementations/signature/rsa_sig.c.in
++++ openssl-3.6.0-alpha1/providers/implementations/signature/rsa_sig.c.in
+@@ -38,7 +38,7 @@ use OpenSSL::paramnames qw(produce_param
+
+ #define RSA_DEFAULT_DIGEST_NAME OSSL_DIGEST_NAME_SHA1
+
+-static OSSL_FUNC_signature_newctx_fn rsa_newctx;
++OSSL_FUNC_signature_newctx_fn rsa_newctx;
+ static OSSL_FUNC_signature_sign_init_fn rsa_sign_init;
+ static OSSL_FUNC_signature_verify_init_fn rsa_verify_init;
+ static OSSL_FUNC_signature_verify_recover_init_fn rsa_verify_recover_init;
+@@ -55,7 +55,7 @@ static OSSL_FUNC_signature_digest_sign_f
+ static OSSL_FUNC_signature_digest_verify_init_fn rsa_digest_verify_init;
+ static OSSL_FUNC_signature_digest_verify_update_fn rsa_digest_verify_update;
+ static OSSL_FUNC_signature_digest_verify_final_fn rsa_digest_verify_final;
+-static OSSL_FUNC_signature_freectx_fn rsa_freectx;
++OSSL_FUNC_signature_freectx_fn rsa_freectx;
+ static OSSL_FUNC_signature_dupctx_fn rsa_dupctx;
+ static OSSL_FUNC_signature_query_key_types_fn rsa_sigalg_query_key_types;
+ static OSSL_FUNC_signature_get_ctx_params_fn rsa_get_ctx_params;
+@@ -227,7 +227,7 @@ static int rsa_check_parameters(PROV_RSA
+ return 1;
+ }
+
+-static void *rsa_newctx(void *provctx, const char *propq)
++void *rsa_newctx(void *provctx, const char *propq)
+ {
+ PROV_RSA_CTX *prsactx = NULL;
+ char *propq_copy = NULL;
+@@ -1316,7 +1316,7 @@ int rsa_digest_verify_final(void *vprsac
+ return ok;
+ }
+
+-static void rsa_freectx(void *vprsactx)
++void rsa_freectx(void *vprsactx)
+ {
+ PROV_RSA_CTX *prsactx = (PROV_RSA_CTX *)vprsactx;
+
+@@ -1839,6 +1839,45 @@ static const OSSL_PARAM *rsa_settable_ct
+ return EVP_MD_settable_ctx_params(prsactx->md);
+ }
+
++#ifdef FIPS_MODULE
++int do_rsa_pct(void *vctx, const char *mdname, void *rsa)
++{
++ static const unsigned char data[32];
++ unsigned char *sigbuf = NULL;
++ size_t siglen = 0;
++ int ret = 0;
++
++ if (rsa_digest_sign_init(vctx, mdname, rsa, NULL) <= 0)
++ return 0;
++
++ if (rsa_digest_sign_update(vctx, data, sizeof(data)) <= 0)
++ return 0;
++
++ if (rsa_digest_sign_final(vctx, NULL, &siglen, 0) <= 0)
++ return 0;
++
++ if ((sigbuf = OPENSSL_malloc(siglen)) == NULL)
++ return 0;
++
++ if (rsa_digest_sign_final(vctx, sigbuf, &siglen, siglen) <= 0)
++ goto err;
++
++ if (rsa_digest_verify_init(vctx, mdname, rsa, NULL) <= 0)
++ goto err;
++
++ if (rsa_digest_verify_update(vctx, data, sizeof(data)) <= 0)
++ goto err;
++
++ if (rsa_digest_verify_final(vctx, sigbuf, siglen) <= 0)
++ goto err;
++ ret = 1;
++
++ err:
++ OPENSSL_free(sigbuf);
++ return ret;
++}
++#endif
++
+ const OSSL_DISPATCH ossl_rsa_signature_functions[] = {
+ { OSSL_FUNC_SIGNATURE_NEWCTX, (void (*)(void))rsa_newctx },
+ { OSSL_FUNC_SIGNATURE_SIGN_INIT, (void (*)(void))rsa_sign_init },
--- openssl-FIPS-Allow-SHA1-in-seclevel-2-if-rh-allow-sha1-signatures.patch.orig
+++ openssl-FIPS-Allow-SHA1-in-seclevel-2-if-rh-allow-sha1-signatures.patch
@@ -10,11 +10,11 @@ Subject: [PATCH] Allow SHA1 in seclevel
test/recipes/25-test_verify.t | 7 ++--
4 files changed, 79 insertions(+), 18 deletions(-)
-Index: openssl-3.5.1/crypto/x509/x509_vfy.c
+Index: openssl-3.6.0-alpha1/crypto/x509/x509_vfy.c
===================================================================
---- openssl-3.5.1.orig/crypto/x509/x509_vfy.c
-+++ openssl-3.5.1/crypto/x509/x509_vfy.c
-@@ -25,6 +25,7 @@
+--- openssl-3.6.0-alpha1.orig/crypto/x509/x509_vfy.c
++++ openssl-3.6.0-alpha1/crypto/x509/x509_vfy.c
+@@ -26,6 +26,7 @@
#include <openssl/objects.h>
#include <openssl/core_names.h>
#include "internal/dane.h"
@@ -22,7 +22,7 @@ Index: openssl-3.5.1/crypto/x509/x509_vf
#include "crypto/x509.h"
#include "x509_local.h"
-@@ -3745,14 +3746,30 @@ static int check_sig_level(X509_STORE_CT
+@@ -3957,14 +3958,30 @@ static int check_sig_level(X509_STORE_CT
{
int secbits = -1;
int level = ctx->param->auth_level;
@@ -54,10 +54,10 @@ Index: openssl-3.5.1/crypto/x509/x509_vf
+
return secbits >= minbits_table[level - 1];
}
-Index: openssl-3.5.1/ssl/t1_lib.c
+Index: openssl-3.6.0-alpha1/ssl/t1_lib.c
===================================================================
---- openssl-3.5.1.orig/ssl/t1_lib.c
-+++ openssl-3.5.1/ssl/t1_lib.c
+--- openssl-3.6.0-alpha1.orig/ssl/t1_lib.c
++++ openssl-3.6.0-alpha1/ssl/t1_lib.c
@@ -21,6 +21,7 @@
#include <openssl/bn.h>
#include <openssl/provider.h>
@@ -66,7 +66,7 @@ Index: openssl-3.5.1/ssl/t1_lib.c
#include "internal/sslconf.h"
#include "internal/nelem.h"
#include "internal/sizes.h"
-@@ -2809,19 +2810,27 @@ int tls12_check_peer_sigalg(SSL_CONNECTI
+@@ -2820,19 +2821,27 @@ int tls12_check_peer_sigalg(SSL_CONNECTI
SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_UNKNOWN_DIGEST);
return 0;
}
@@ -107,7 +107,7 @@ Index: openssl-3.5.1/ssl/t1_lib.c
}
/* Store the sigalg the peer uses */
s->s3.tmp.peer_sigalg = lu;
-@@ -3393,6 +3402,14 @@ static int tls12_sigalg_allowed(const SS
+@@ -3406,6 +3415,14 @@ static int tls12_sigalg_allowed(const SS
}
}
@@ -122,7 +122,7 @@ Index: openssl-3.5.1/ssl/t1_lib.c
/* Finally see if security callback allows it */
secbits = sigalg_security_bits(SSL_CONNECTION_GET_CTX(s), lu);
sigalgstr[0] = (lu->sigalg >> 8) & 0xff;
-@@ -4383,6 +4400,8 @@ static int ssl_security_cert_sig(SSL_CON
+@@ -4396,6 +4413,8 @@ static int ssl_security_cert_sig(SSL_CON
{
/* Lookup signature algorithm digest */
int secbits, nid, pknid;
@@ -131,7 +131,7 @@ Index: openssl-3.5.1/ssl/t1_lib.c
/* Don't check signature if self signed */
if ((X509_get_extension_flags(x) & EXFLAG_SS) != 0)
-@@ -4392,6 +4411,25 @@ static int ssl_security_cert_sig(SSL_CON
+@@ -4405,6 +4424,25 @@ static int ssl_security_cert_sig(SSL_CON
/* If digest NID not defined use signature NID */
if (nid == NID_undef)
nid = pknid;
@@ -157,16 +157,16 @@ Index: openssl-3.5.1/ssl/t1_lib.c
if (s != NULL)
return ssl_security(s, op, secbits, nid, x);
else
-Index: openssl-3.5.1/test/recipes/25-test_verify.t
+Index: openssl-3.6.0-alpha1/test/recipes/25-test_verify.t
===================================================================
---- openssl-3.5.1.orig/test/recipes/25-test_verify.t
-+++ openssl-3.5.1/test/recipes/25-test_verify.t
+--- openssl-3.6.0-alpha1.orig/test/recipes/25-test_verify.t
++++ openssl-3.6.0-alpha1/test/recipes/25-test_verify.t
@@ -30,7 +30,7 @@ sub verify {
run(app([@args]));
}
--plan tests => 203;
-+plan tests => 202;
+-plan tests => 205;
++plan tests => 204;
# Canonical success
ok(verify("ee-cert", "sslserver", ["root-cert"], ["ca-cert"]),
--- openssl-FIPS-Deny-SHA-1-sigver-in-FIPS-provider.patch.orig
+++ openssl-FIPS-Deny-SHA-1-sigver-in-FIPS-provider.patch
@@ -1,8 +1,8 @@
-Index: openssl-3.5.0/providers/implementations/signature/dsa_sig.c
+Index: openssl-3.6.0-alpha1/providers/implementations/signature/dsa_sig.c.in
===================================================================
---- openssl-3.5.0.orig/providers/implementations/signature/dsa_sig.c
-+++ openssl-3.5.0/providers/implementations/signature/dsa_sig.c
-@@ -187,9 +187,7 @@ static int dsa_setup_md(PROV_DSA_CTX *ct
+--- openssl-3.6.0-alpha1.orig/providers/implementations/signature/dsa_sig.c.in
++++ openssl-3.6.0-alpha1/providers/implementations/signature/dsa_sig.c.in
+@@ -190,9 +190,7 @@ static int dsa_setup_md(PROV_DSA_CTX *ct
}
#ifdef FIPS_MODULE
{
@@ -13,11 +13,11 @@ Index: openssl-3.5.0/providers/implement
if (!ossl_fips_ind_digest_sign_check(OSSL_FIPS_IND_GET(ctx),
OSSL_FIPS_IND_SETTABLE1,
-Index: openssl-3.5.0/providers/implementations/signature/ecdsa_sig.c
+Index: openssl-3.6.0-alpha1/providers/implementations/signature/ecdsa_sig.c.in
===================================================================
---- openssl-3.5.0.orig/providers/implementations/signature/ecdsa_sig.c
-+++ openssl-3.5.0/providers/implementations/signature/ecdsa_sig.c
-@@ -215,9 +215,7 @@ static int ecdsa_setup_md(PROV_ECDSA_CTX
+--- openssl-3.6.0-alpha1.orig/providers/implementations/signature/ecdsa_sig.c.in
++++ openssl-3.6.0-alpha1/providers/implementations/signature/ecdsa_sig.c.in
+@@ -218,9 +218,7 @@ static int ecdsa_setup_md(PROV_ECDSA_CTX
#ifdef FIPS_MODULE
{
@@ -28,11 +28,11 @@ Index: openssl-3.5.0/providers/implement
if (!ossl_fips_ind_digest_sign_check(OSSL_FIPS_IND_GET(ctx),
OSSL_FIPS_IND_SETTABLE1,
-Index: openssl-3.5.0/providers/implementations/signature/rsa_sig.c
+Index: openssl-3.6.0-alpha1/providers/implementations/signature/rsa_sig.c.in
===================================================================
---- openssl-3.5.0.orig/providers/implementations/signature/rsa_sig.c
-+++ openssl-3.5.0/providers/implementations/signature/rsa_sig.c
-@@ -407,9 +407,7 @@ static int rsa_setup_md(PROV_RSA_CTX *ct
+--- openssl-3.6.0-alpha1.orig/providers/implementations/signature/rsa_sig.c.in
++++ openssl-3.6.0-alpha1/providers/implementations/signature/rsa_sig.c.in
+@@ -410,9 +410,7 @@ static int rsa_setup_md(PROV_RSA_CTX *ct
}
#ifdef FIPS_MODULE
{
@@ -43,7 +43,7 @@ Index: openssl-3.5.0/providers/implement
if (!ossl_fips_ind_digest_sign_check(OSSL_FIPS_IND_GET(ctx),
OSSL_FIPS_IND_SETTABLE1,
-@@ -1770,11 +1768,15 @@ static int rsa_set_ctx_params(void *vprs
+@@ -1777,11 +1775,15 @@ static int rsa_set_ctx_params(void *vprs
if (prsactx->md == NULL && pmdname == NULL
&& pad_mode == RSA_PKCS1_PSS_PADDING) {
@@ -59,11 +59,11 @@ Index: openssl-3.5.0/providers/implement
}
if (pmgf1mdname != NULL
-Index: openssl-3.5.0/test/recipes/30-test_evp_data/evppkey_ecdsa.txt
+Index: openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_ecdsa.txt
===================================================================
---- openssl-3.5.0.orig/test/recipes/30-test_evp_data/evppkey_ecdsa.txt
-+++ openssl-3.5.0/test/recipes/30-test_evp_data/evppkey_ecdsa.txt
-@@ -37,12 +37,14 @@ PrivPubKeyPair = P-256:P-256-PUBLIC
+--- openssl-3.6.0-alpha1.orig/test/recipes/30-test_evp_data/evppkey_ecdsa.txt
++++ openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_ecdsa.txt
+@@ -37,11 +37,13 @@ PrivPubKeyPair = P-256:P-256-PUBLIC
Title = ECDSA tests
@@ -73,12 +73,19 @@ Index: openssl-3.5.0/test/recipes/30-tes
Input = "0123456789ABCDEF1234"
Output = 3045022100b1d1cb1a577035bccdd5a86c6148c2cc7c633cd42b7234139b593076d041e15202201898cdd52b41ca502098184b409cf83a21bc945006746e3b7cea52234e043ec8
++Availablein = default
+ FIPSversion = >=3.6.0
+ Verify = P-256-PUBLIC
+ Ctrl = digest:SHA1
+@@ -50,6 +52,7 @@ Output = 3045022100b1d1cb1a577035bccdd5a
+ Security-Category = 0
+
# Digest too long
+Availablein = default
Verify = P-256-PUBLIC
Ctrl = digest:SHA1
Input = "0123456789ABCDEF12345"
-@@ -50,6 +52,7 @@ Output = 3045022100b1d1cb1a577035bccdd5a
+@@ -57,6 +60,7 @@ Output = 3045022100b1d1cb1a577035bccdd5a
Result = VERIFY_ERROR
# Digest too short
@@ -86,7 +93,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = P-256-PUBLIC
Ctrl = digest:SHA1
Input = "0123456789ABCDEF123"
-@@ -57,6 +60,7 @@ Output = 3045022100b1d1cb1a577035bccdd5a
+@@ -64,6 +68,7 @@ Output = 3045022100b1d1cb1a577035bccdd5a
Result = VERIFY_ERROR
# Digest invalid
@@ -94,7 +101,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = P-256-PUBLIC
Ctrl = digest:SHA1
Input = "0123456789ABCDEF1235"
-@@ -64,6 +68,7 @@ Output = 3045022100b1d1cb1a577035bccdd5a
+@@ -71,6 +76,7 @@ Output = 3045022100b1d1cb1a577035bccdd5a
Result = VERIFY_ERROR
# Invalid signature
@@ -102,7 +109,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = P-256-PUBLIC
Ctrl = digest:SHA1
Input = "0123456789ABCDEF1234"
-@@ -79,12 +84,14 @@ Output = 3045022100b1d1cb1a577035bccdd5a
+@@ -86,12 +92,14 @@ Output = 3045022100b1d1cb1a577035bccdd5a
Result = VERIFY_ERROR
# BER signature
@@ -117,7 +124,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = P-256-PUBLIC
Ctrl = digest:SHA1
Input = "0123456789ABCDEF1234"
-@@ -237,7 +244,7 @@ Unapproved = 1
+@@ -244,7 +252,7 @@ Unapproved = 1
CtrlInit = digest-check:0
Key = P-256
Input = "Hello World"
@@ -126,7 +133,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
# Test that SHA1 is not allowed in fips mode for signing
FIPSversion = >=3.4.0
-@@ -247,7 +254,7 @@ Unapproved = 1
+@@ -254,7 +262,7 @@ Unapproved = 1
CtrlInit = digest-check:0
Ctrl = digest:SHA1
Input = "0123456789ABCDEF1234"
@@ -135,10 +142,10 @@ Index: openssl-3.5.0/test/recipes/30-tes
Title = XOF disallowed
-Index: openssl-3.5.0/test/recipes/30-test_evp_data/evppkey_ecdsa_sigalg.txt
+Index: openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_ecdsa_sigalg.txt
===================================================================
---- openssl-3.5.0.orig/test/recipes/30-test_evp_data/evppkey_ecdsa_sigalg.txt
-+++ openssl-3.5.0/test/recipes/30-test_evp_data/evppkey_ecdsa_sigalg.txt
+--- openssl-3.6.0-alpha1.orig/test/recipes/30-test_evp_data/evppkey_ecdsa_sigalg.txt
++++ openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_ecdsa_sigalg.txt
@@ -37,34 +37,34 @@ PrivPubKeyPair = P-256:P-256-PUBLIC
Title = ECDSA tests
@@ -260,10 +267,10 @@ Index: openssl-3.5.0/test/recipes/30-tes
Input = "0123456789ABCDEF1234"
-Result = KEYOP_MISMATCH
+Result = KEYOP_INIT_ERROR
-Index: openssl-3.5.0/test/recipes/30-test_evp_data/evppkey_rsa_common.txt
+Index: openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_rsa_common.txt
===================================================================
---- openssl-3.5.0.orig/test/recipes/30-test_evp_data/evppkey_rsa_common.txt
-+++ openssl-3.5.0/test/recipes/30-test_evp_data/evppkey_rsa_common.txt
+--- openssl-3.6.0-alpha1.orig/test/recipes/30-test_evp_data/evppkey_rsa_common.txt
++++ openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_rsa_common.txt
@@ -96,6 +96,7 @@ NDL6WCBbets=
Title = RSA tests
@@ -272,7 +279,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = RSA-2048
Ctrl = digest:SHA1
Input = "0123456789ABCDEF1234"
-@@ -112,24 +113,28 @@ Ctrl = digest:SHA512-224
+@@ -119,24 +120,28 @@ Ctrl = digest:SHA512-224
Input = "0123456789ABCDEF123456789ABC"
Output = 5f720e9488139bb21e1c2f027fd5ce5993e6d31c5a8faaee833487b3a944d66891178868ace8070cad3ee2ffbe54aa4885a15fd1a7cc5166970fe1fd8c0423e72bd3e3b56fc4a53ed80aaaeca42497f0ec3c62113edc05cd006608f5eef7ce3ad4cba1069f68731dd28a524a1f93fcdc5547112d48d45586dd943ba0d443be9635720d8a61697c54c96627f0d85c5fbeaa3b4af86a65cf2fc3800dd5de34c046985f25d0efc0bb6edccc1d08b3a4fb9c8faffe181c7e68b31e374ad1440a4a664eec9ca0dc53a9d2f5bc7d9940d866f64201bcbc63612754df45727ea24b531d7de83d1bb707444859fa35521320c33bf6f4dbeb6fb56e653adbf7af15843f17
@@ -301,7 +308,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = RSA-2048
Ctrl = digest:SHA1
Input = "0123456789ABCDEF1233"
-@@ -137,6 +142,7 @@ Output = c09d402423cbf233d26cae21f954547
+@@ -144,6 +149,7 @@ Output = c09d402423cbf233d26cae21f954547
Result = VERIFY_ERROR
# Corrupted signature
@@ -309,7 +316,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = RSA-2048
Ctrl = digest:SHA1
Input = "0123456789ABCDEF1233"
-@@ -144,6 +150,7 @@ Output = c09d402423cbf233d26cae21f954547
+@@ -151,6 +157,7 @@ Output = c09d402423cbf233d26cae21f954547
Result = VERIFY_ERROR
# parameter is not NULLt
@@ -317,7 +324,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = RSA-2048
Ctrl = digest:sha1
Input = "0123456789ABCDEF1234"
-@@ -151,42 +158,49 @@ Output = 3ec3fc29eb6e122bd7aa361cd09fe1b
+@@ -158,42 +165,49 @@ Output = 3ec3fc29eb6e122bd7aa361cd09fe1b
Result = VERIFY_ERROR
# embedded digest too long
@@ -367,7 +374,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = RSA-2048
Ctrl = digest:sha1
Input = "0123456789ABCDEF1234"
-@@ -195,6 +209,7 @@ Result = VERIFY_ERROR
+@@ -202,6 +216,7 @@ Result = VERIFY_ERROR
# Verify using public key
@@ -375,7 +382,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = RSA-2048-PUBLIC
Ctrl = digest:SHA1
Input = "0123456789ABCDEF1234"
-@@ -939,7 +954,8 @@ Input="0123456789ABCDEF0123456789ABCDEF"
+@@ -952,7 +967,8 @@ Input="0123456789ABCDEF0123456789ABCDEF"
Output=4DE433D5844043EF08D354DA03CB29068780D52706D7D1E4D50EFB7D58C9D547D83A747DDD0635A96B28F854E50145518482CB49E963054621B53C60C498D07C16E9C2789C893CF38D4D86900DE71BDE463BD2761D1271E358C7480A1AC0BAB930DDF39602AD1BC165B5D7436B516B7A7858E8EB7AB1C420EEB482F4D207F0E462B1724959320A084E13848D11D10FB593E66BF680BF6D3F345FC3E9C3DE60ABBAC37E1C6EC80A268C8D9FC49626C679097AA690BC1AA662B95EB8DB70390861AA0898229F9349B4B5FDD030D4928C47084708A933144BE23BD3C6E661B85B2C0EF9ED36D498D5B7320E8194D363D4AD478C059BAE804181965E0B81B663158A
# Verify using salt length auto detect
@@ -385,7 +392,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = RSA-2048-PUBLIC
Ctrl = rsa_padding_mode:pss
Ctrl = rsa_pss_saltlen:auto
-@@ -974,6 +990,10 @@ Output=4DE433D5844043EF08D354DA03CB29068
+@@ -987,6 +1003,10 @@ Output=4DE433D5844043EF08D354DA03CB29068
Result = VERIFY_ERROR
# Verify using default parameters, explicitly setting parameters
@@ -396,7 +403,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = RSA-PSS-DEFAULT
Ctrl = rsa_padding_mode:pss
Ctrl = rsa_pss_saltlen:20
-@@ -982,6 +1002,7 @@ Input="0123456789ABCDEF0123"
+@@ -995,6 +1015,7 @@ Input="0123456789ABCDEF0123"
Output = 3EFE09D88509027D837BFA5F8471CF7B69E6DF395DD999BB9CA42021F15722D9AC76670507C6BCFB73F64FB2211B611B8F140E76EBDB064BD762FDBA89D019E304A0D6B274E1C2FE1DF50005598A0306AF805416094E2A5BA60BC72BDE38CE061E853ED40F14967A8B9CA4DC739B462F89558F12FDF2D8D19FBEF16AD66FE2DDDA8BEE983ECBD873064244849D8D94B5B33F45E076871A47ED653E73257A2BE2DB3C0878094B0D2B6B682C8007DFD989425FB39A1FEEC9EED5876414601A49176EC344F5E3EDEE81CA2DDD29B7364F4638112CB3A547E2BC170E28CB66BDABE863754BE8AD5BA230567B575266F4B6B4CF81F28310ABF05351CC9E2DB85D00BF
# Verify explicitly setting parameters "digest" salt length
@@ -404,7 +411,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = RSA-PSS-DEFAULT
Ctrl = rsa_padding_mode:pss
Ctrl = rsa_pss_saltlen:digest
-@@ -990,20 +1011,21 @@ Input="0123456789ABCDEF0123"
+@@ -1003,20 +1024,21 @@ Input="0123456789ABCDEF0123"
Output = 3EFE09D88509027D837BFA5F8471CF7B69E6DF395DD999BB9CA42021F15722D9AC76670507C6BCFB73F64FB2211B611B8F140E76EBDB064BD762FDBA89D019E304A0D6B274E1C2FE1DF50005598A0306AF805416094E2A5BA60BC72BDE38CE061E853ED40F14967A8B9CA4DC739B462F89558F12FDF2D8D19FBEF16AD66FE2DDDA8BEE983ECBD873064244849D8D94B5B33F45E076871A47ED653E73257A2BE2DB3C0878094B0D2B6B682C8007DFD989425FB39A1FEEC9EED5876414601A49176EC344F5E3EDEE81CA2DDD29B7364F4638112CB3A547E2BC170E28CB66BDABE863754BE8AD5BA230567B575266F4B6B4CF81F28310ABF05351CC9E2DB85D00BF
# Verify using salt length larger than minimum
@@ -428,7 +435,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = RSA-PSS-DEFAULT
Ctrl = rsa_pss_saltlen:0
Result = PKEY_CTRL_ERROR
-@@ -1011,21 +1033,25 @@ Result = PKEY_CTRL_ERROR
+@@ -1024,21 +1046,25 @@ Result = PKEY_CTRL_ERROR
# Attempt to change padding mode
# Note this used to return PKEY_CTRL_INVALID
# but it is limited because setparams only returns 0 or 1.
@@ -454,7 +461,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify = RSA-PSS-BAD2
Result = KEYOP_INIT_ERROR
Reason = invalid salt length
-@@ -1081,36 +1107,42 @@ CAltWyuLbfXWce9jd8CSHLI8Jwpw4lmOb/idGfEF
+@@ -1094,36 +1120,42 @@ CAltWyuLbfXWce9jd8CSHLI8Jwpw4lmOb/idGfEF
4fINDOjP+yJJvZohNwIDAQAB
-----END PUBLIC KEY-----
@@ -497,7 +504,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify=RSA-PSS-1
Ctrl = rsa_padding_mode:pss
Ctrl = rsa_mgf1_md:sha1
-@@ -1126,36 +1158,42 @@ swU7R97S7NSkyu/WFIM9yLtiLzF+0Ha4BX/o3j+E
+@@ -1139,36 +1171,42 @@ swU7R97S7NSkyu/WFIM9yLtiLzF+0Ha4BX/o3j+E
0w5GMTmBXG/U/VrFuBcqRSMOy2MYoE8UVdhOWosCAwEAAQ==
-----END PUBLIC KEY-----
@@ -540,7 +547,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify=RSA-PSS-9
Ctrl = rsa_padding_mode:pss
Ctrl = rsa_mgf1_md:sha1
-@@ -1173,36 +1211,42 @@ F7jfF3jbOB3OCctK0FilEQAac4GY7ifPVaE7dUU5
+@@ -1186,36 +1224,42 @@ F7jfF3jbOB3OCctK0FilEQAac4GY7ifPVaE7dUU5
BQIDAQAB
-----END PUBLIC KEY-----
@@ -583,7 +590,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify=RSA-PSS-10
Ctrl = rsa_padding_mode:pss
Ctrl = rsa_mgf1_md:sha1
-@@ -1999,11 +2043,13 @@ Securitycheck = 1
+@@ -2012,11 +2056,13 @@ Securitycheck = 1
Input = 550AF55A2904E7B9762352F8FB7FA235A9CB053AACB2D5FCB8CA48453CB2EE3619746C701ABF2D4CC67003471A187900B05AA812BD25ED05C675DFC8C97A24A7BF49BD6214992CAD766D05A9A2B57B74F26A737E0237B8B76C45F1F226A836D7CFBC75BA999BDBE48DBC09227AA46C88F21DCCBA7840141AD5A5D71FD122E6BD6AC3E564780DFE623FC1CA9B995A6037BF0BBD43B205A84AC5444F34202C05CE9113087176432476576DE6FFFF9A52EA57C08BE3EC2F49676CB8E12F762AC71FA3C321E00AC988910C85FF52F93825666CE0D40FFAA0592078919D4493F46D95CCF76364C6D57760DD0B64805F9AFC76A2365A5575CA301D5103F0EA76CB9A78
Result = KEYOP_INIT_ERROR
@@ -598,7 +605,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
# Verifying with a 1024 bit key is permitted in fips mode for older applications
DigestVerify = SHA256
-@@ -2019,7 +2065,7 @@ Securitycheck = 1
+@@ -2032,7 +2078,7 @@ Securitycheck = 1
Key = RSA-2048
Input = "Hello"
Result = DIGESTSIGNINIT_ERROR
@@ -607,7 +614,7 @@ Index: openssl-3.5.0/test/recipes/30-tes
# Signing with a 1024 bit key is not allowed in fips mode
Availablein = fips
-@@ -2085,7 +2131,7 @@ Unapproved = 1
+@@ -2098,7 +2144,7 @@ Unapproved = 1
CtrlInit = digest-check:0
Key = RSA-2048
Input = "Hello"
@@ -616,10 +623,10 @@ Index: openssl-3.5.0/test/recipes/30-tes
Availablein = fips
FIPSversion = >=3.4.0
-Index: openssl-3.5.0/test/recipes/30-test_evp_data/evppkey_rsa.txt
+Index: openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_rsa.txt
===================================================================
---- openssl-3.5.0.orig/test/recipes/30-test_evp_data/evppkey_rsa.txt
-+++ openssl-3.5.0/test/recipes/30-test_evp_data/evppkey_rsa.txt
+--- openssl-3.6.0-alpha1.orig/test/recipes/30-test_evp_data/evppkey_rsa.txt
++++ openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_rsa.txt
@@ -268,8 +268,8 @@ TwIDAQAB
PrivPubKeyPair = RSA-PSS:RSA-PSS-DEFAULT
@@ -933,11 +940,11 @@ Index: openssl-3.5.0/test/recipes/30-tes
Verify=RSA-PSS-8
Ctrl = rsa_padding_mode:pss
Ctrl = rsa_mgf1_md:sha1
-Index: openssl-3.5.0/test/recipes/80-test_cms.t
+Index: openssl-3.6.0-alpha1/test/recipes/80-test_cms.t
===================================================================
---- openssl-3.5.0.orig/test/recipes/80-test_cms.t
-+++ openssl-3.5.0/test/recipes/80-test_cms.t
-@@ -174,7 +174,7 @@ my @smime_pkcs7_tests = (
+--- openssl-3.6.0-alpha1.orig/test/recipes/80-test_cms.t
++++ openssl-3.6.0-alpha1/test/recipes/80-test_cms.t
+@@ -186,7 +186,7 @@ my @smime_pkcs7_tests = (
[ "{cmd1}", @defaultprov, "-sign", "-in", $smcont, "-md", "sha1",
"-certfile", $smroot,
"-signer", $smrsa1, "-out", "{output}.cms" ],
@@ -946,7 +953,7 @@ Index: openssl-3.5.0/test/recipes/80-tes
"-CAfile", $smroot, "-out", "{output}.txt" ],
\&final_compare
],
-@@ -182,7 +182,7 @@ my @smime_pkcs7_tests = (
+@@ -194,7 +194,7 @@ my @smime_pkcs7_tests = (
[ "signed zero-length content S/MIME format, RSA key SHA1",
[ "{cmd1}", @defaultprov, "-sign", "-in", $smcont_zero, "-md", "sha1",
"-certfile", $smroot, "-signer", $smrsa1, "-out", "{output}.cms" ],
@@ -955,10 +962,10 @@ Index: openssl-3.5.0/test/recipes/80-tes
"-CAfile", $smroot, "-out", "{output}.txt" ],
\&zero_compare
],
-Index: openssl-3.5.0/test/recipes/80-test_ssl_old.t
+Index: openssl-3.6.0-alpha1/test/recipes/80-test_ssl_old.t
===================================================================
---- openssl-3.5.0.orig/test/recipes/80-test_ssl_old.t
-+++ openssl-3.5.0/test/recipes/80-test_ssl_old.t
+--- openssl-3.6.0-alpha1.orig/test/recipes/80-test_ssl_old.t
++++ openssl-3.6.0-alpha1/test/recipes/80-test_ssl_old.t
@@ -465,6 +465,9 @@ sub testssl {
'test sslv2/sslv3 with 1024bit DHE via BIO pair');
}
@@ -977,10 +984,10 @@ Index: openssl-3.5.0/test/recipes/80-tes
SKIP: {
skip "No IPv4 available on this machine", 4
-Index: openssl-3.5.0/apps/openssl.cnf
+Index: openssl-3.6.0-alpha1/apps/openssl.cnf
===================================================================
---- openssl-3.5.0.orig/apps/openssl.cnf
-+++ openssl-3.5.0/apps/openssl.cnf
+--- openssl-3.6.0-alpha1.orig/apps/openssl.cnf
++++ openssl-3.6.0-alpha1/apps/openssl.cnf
@@ -119,7 +119,7 @@ cert_opt = ca_default # Certificate fi
default_days = 365 # how long to certify for
--- openssl-FIPS-NO-DES-support.patch.orig
+++ openssl-FIPS-NO-DES-support.patch
@@ -12,25 +12,25 @@ Signed-off-by: Simo Sorce <simo@redhat.c
test/recipes/80-test_cms.t | 2 +-
5 files changed, 14 insertions(+), 13 deletions(-)
-Index: openssl-3.5.2/providers/fips/fipsprov.c
+Index: openssl-3.6.0-alpha1/providers/fips/fipsprov.c
===================================================================
---- openssl-3.5.2.orig/providers/fips/fipsprov.c
-+++ openssl-3.5.2/providers/fips/fipsprov.c
-@@ -360,7 +360,8 @@ static const OSSL_ALGORITHM_CAPABLE fips
- ossl_cipher_capable_aes_cbc_hmac_sha256),
- ALGC(PROV_NAMES_AES_256_CBC_HMAC_SHA256, ossl_aes256cbc_hmac_sha256_functions,
- ossl_cipher_capable_aes_cbc_hmac_sha256),
+--- openssl-3.6.0-alpha1.orig/providers/fips/fipsprov.c
++++ openssl-3.6.0-alpha1/providers/fips/fipsprov.c
+@@ -384,7 +384,8 @@ static const OSSL_ALGORITHM_CAPABLE fips
+ ossl_cipher_capable_aes_cbc_hmac_sha512_etm),
+ ALGC(PROV_NAMES_AES_256_CBC_HMAC_SHA512_ETM, ossl_aes256cbc_hmac_sha512_etm_functions,
+ ossl_cipher_capable_aes_cbc_hmac_sha512_etm),
-#ifndef OPENSSL_NO_DES
+/* We don't certify 3DES in our FIPS provider */
+#if 0 /* ifndef OPENSSL_NO_DES */
ALG(PROV_NAMES_DES_EDE3_ECB, ossl_tdes_ede3_ecb_functions),
ALG(PROV_NAMES_DES_EDE3_CBC, ossl_tdes_ede3_cbc_functions),
#endif /* OPENSSL_NO_DES */
-Index: openssl-3.5.2/providers/fips/self_test_data.inc
+Index: openssl-3.6.0-alpha1/providers/fips/self_test_data.inc
===================================================================
---- openssl-3.5.2.orig/providers/fips/self_test_data.inc
-+++ openssl-3.5.2/providers/fips/self_test_data.inc
-@@ -293,6 +293,7 @@ static const ST_KAT_CIPHER st_kat_cipher
+--- openssl-3.6.0-alpha1.orig/providers/fips/self_test_data.inc
++++ openssl-3.6.0-alpha1/providers/fips/self_test_data.inc
+@@ -305,6 +305,7 @@ static const ST_KAT_CIPHER st_kat_cipher
CIPHER_MODE_DECRYPT,
ITM(aes_128_ecb_key)
},
@@ -38,19 +38,19 @@ Index: openssl-3.5.2/providers/fips/self
#ifndef OPENSSL_NO_DES
{
{
-@@ -305,6 +306,7 @@ static const ST_KAT_CIPHER st_kat_cipher
+@@ -317,6 +318,7 @@ static const ST_KAT_CIPHER st_kat_cipher
ITM(tdes_key)
}
#endif
+#endif
};
- static const char hkdf_digest[] = "SHA256";
-Index: openssl-3.5.2/test/evp_libctx_test.c
+ #ifndef OPENSSL_NO_LMS
+Index: openssl-3.6.0-alpha1/test/evp_libctx_test.c
===================================================================
---- openssl-3.5.2.orig/test/evp_libctx_test.c
-+++ openssl-3.5.2/test/evp_libctx_test.c
-@@ -831,7 +831,9 @@ int setup_tests(void)
+--- openssl-3.6.0-alpha1.orig/test/evp_libctx_test.c
++++ openssl-3.6.0-alpha1/test/evp_libctx_test.c
+@@ -832,7 +832,9 @@ int setup_tests(void)
ADD_TEST(kem_invalid_keytype);
#endif
#ifndef OPENSSL_NO_DES
@@ -61,10 +61,10 @@ Index: openssl-3.5.2/test/evp_libctx_tes
#endif
return 1;
}
-Index: openssl-3.5.2/test/recipes/30-test_evp_data/evpciph_des3_common.txt
+Index: openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evpciph_des3_common.txt
===================================================================
---- openssl-3.5.2.orig/test/recipes/30-test_evp_data/evpciph_des3_common.txt
-+++ openssl-3.5.2/test/recipes/30-test_evp_data/evpciph_des3_common.txt
+--- openssl-3.6.0-alpha1.orig/test/recipes/30-test_evp_data/evpciph_des3_common.txt
++++ openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evpciph_des3_common.txt
@@ -14,7 +14,7 @@
Title = DES3 Tests
@@ -120,11 +120,11 @@ Index: openssl-3.5.2/test/recipes/30-tes
Cipher = DES-EDE3-ECB
Operation = ENCRYPT
Unapproved = 1
-Index: openssl-3.5.2/test/recipes/80-test_cms.t
+Index: openssl-3.6.0-alpha1/test/recipes/80-test_cms.t
===================================================================
---- openssl-3.5.2.orig/test/recipes/80-test_cms.t
-+++ openssl-3.5.2/test/recipes/80-test_cms.t
-@@ -398,7 +398,7 @@ my @smime_cms_tests = (
+--- openssl-3.6.0-alpha1.orig/test/recipes/80-test_cms.t
++++ openssl-3.6.0-alpha1/test/recipes/80-test_cms.t
+@@ -429,7 +429,7 @@ my @smime_cms_tests = (
\&final_compare
],
--- openssl-FIPS-NO-DSA-Support.patch.orig
+++ openssl-FIPS-NO-DSA-Support.patch
@@ -16,11 +16,11 @@ Signed-off-by: Simo Sorce <simo@redhat.c
test/recipes/80-test_cms.t | 20 +++++++++----------
9 files changed, 43 insertions(+), 19 deletions(-)
-Index: openssl-3.5.0-beta1/providers/fips/fipsprov.c
+Index: openssl-3.6.0-alpha1/providers/fips/fipsprov.c
===================================================================
---- openssl-3.5.0-beta1.orig/providers/fips/fipsprov.c
-+++ openssl-3.5.0-beta1/providers/fips/fipsprov.c
-@@ -434,7 +434,8 @@ static const OSSL_ALGORITHM fips_keyexch
+--- openssl-3.6.0-alpha1.orig/providers/fips/fipsprov.c
++++ openssl-3.6.0-alpha1/providers/fips/fipsprov.c
+@@ -473,7 +473,8 @@ static const OSSL_ALGORITHM fips_keyexch
};
static const OSSL_ALGORITHM fips_signature[] = {
@@ -30,7 +30,7 @@ Index: openssl-3.5.0-beta1/providers/fip
{ PROV_NAMES_DSA, FIPS_DEFAULT_PROPERTIES, ossl_dsa_signature_functions },
{ PROV_NAMES_DSA_SHA1, FIPS_DEFAULT_PROPERTIES, ossl_dsa_sha1_signature_functions },
{ PROV_NAMES_DSA_SHA224, FIPS_DEFAULT_PROPERTIES, ossl_dsa_sha224_signature_functions },
-@@ -626,8 +627,9 @@ static const OSSL_ALGORITHM fips_keymgmt
+@@ -668,8 +669,9 @@ static const OSSL_ALGORITHM fips_keymgmt
PROV_DESCS_DHX },
#endif
#ifndef OPENSSL_NO_DSA
@@ -42,11 +42,11 @@ Index: openssl-3.5.0-beta1/providers/fip
#endif
{ PROV_NAMES_RSA, FIPS_DEFAULT_PROPERTIES, ossl_rsa_keymgmt_functions,
PROV_DESCS_RSA },
-Index: openssl-3.5.0-beta1/providers/fips/self_test_data.inc
+Index: openssl-3.6.0-alpha1/providers/fips/self_test_data.inc
===================================================================
---- openssl-3.5.0-beta1.orig/providers/fips/self_test_data.inc
-+++ openssl-3.5.0-beta1/providers/fips/self_test_data.inc
-@@ -1522,8 +1522,9 @@ static const unsigned char ed448_expecte
+--- openssl-3.6.0-alpha1.orig/providers/fips/self_test_data.inc
++++ openssl-3.6.0-alpha1/providers/fips/self_test_data.inc
+@@ -1693,8 +1693,9 @@ static const unsigned char ed448_expecte
# endif /* OPENSSL_NO_ECX */
#endif /* OPENSSL_NO_EC */
@@ -57,7 +57,7 @@ Index: openssl-3.5.0-beta1/providers/fip
static const unsigned char dsa_p[] = {
0xa2, 0x9b, 0x88, 0x72, 0xce, 0x8b, 0x84, 0x23,
0xb7, 0xd5, 0xd2, 0x1d, 0x4b, 0x02, 0xf5, 0x7e,
-@@ -1651,6 +1652,7 @@ static const ST_KAT_PARAM dsa_key[] = {
+@@ -1822,6 +1823,7 @@ static const ST_KAT_PARAM dsa_key[] = {
ST_KAT_PARAM_END()
};
#endif /* OPENSSL_NO_DSA */
@@ -65,7 +65,7 @@ Index: openssl-3.5.0-beta1/providers/fip
#ifndef OPENSSL_NO_ML_DSA
static const unsigned char ml_dsa_65_pub_key[] = {
-@@ -3013,6 +3015,7 @@ static const ST_KAT_SIGN st_kat_sign_tes
+@@ -3193,6 +3195,7 @@ static const ST_KAT_SIGN st_kat_sign_tes
},
# endif /* OPENSSL_NO_ECX */
#endif /* OPENSSL_NO_EC */
@@ -73,7 +73,7 @@ Index: openssl-3.5.0-beta1/providers/fip
#ifndef OPENSSL_NO_DSA
{
OSSL_SELF_TEST_DESC_SIGN_DSA,
-@@ -3025,6 +3028,7 @@ static const ST_KAT_SIGN st_kat_sign_tes
+@@ -3205,6 +3208,7 @@ static const ST_KAT_SIGN st_kat_sign_tes
ITM(dsa_expected_sig)
},
#endif /* OPENSSL_NO_DSA */
@@ -81,10 +81,10 @@ Index: openssl-3.5.0-beta1/providers/fip
#ifndef OPENSSL_NO_ML_DSA
{
-Index: openssl-3.5.0-beta1/test/acvp_test.c
+Index: openssl-3.6.0-alpha1/test/acvp_test.c
===================================================================
---- openssl-3.5.0-beta1.orig/test/acvp_test.c
-+++ openssl-3.5.0-beta1/test/acvp_test.c
+--- openssl-3.6.0-alpha1.orig/test/acvp_test.c
++++ openssl-3.6.0-alpha1/test/acvp_test.c
@@ -1735,6 +1735,7 @@ int setup_tests(void)
OSSL_NELEM(dh_safe_prime_keyver_data));
#endif /* OPENSSL_NO_DH */
@@ -101,11 +101,11 @@ Index: openssl-3.5.0-beta1/test/acvp_tes
#ifndef OPENSSL_NO_EC
ec_cofactors = fips_provider_version_ge(libctx, 3, 4, 0);
-Index: openssl-3.5.0-beta1/test/endecode_test.c
+Index: openssl-3.6.0-alpha1/test/endecode_test.c
===================================================================
---- openssl-3.5.0-beta1.orig/test/endecode_test.c
-+++ openssl-3.5.0-beta1/test/endecode_test.c
-@@ -1536,6 +1536,7 @@ int setup_tests(void)
+--- openssl-3.6.0-alpha1.orig/test/endecode_test.c
++++ openssl-3.6.0-alpha1/test/endecode_test.c
+@@ -1582,6 +1582,7 @@ int setup_tests(void)
* so no legacy tests.
*/
#endif
@@ -113,7 +113,7 @@ Index: openssl-3.5.0-beta1/test/endecode
#ifndef OPENSSL_NO_DSA
ADD_TEST_SUITE(DSA);
ADD_TEST_SUITE_PARAMS(DSA);
-@@ -1546,6 +1547,7 @@ int setup_tests(void)
+@@ -1592,6 +1593,7 @@ int setup_tests(void)
ADD_TEST_SUITE_PROTECTED_PVK(DSA);
# endif
#endif
@@ -121,10 +121,10 @@ Index: openssl-3.5.0-beta1/test/endecode
#ifndef OPENSSL_NO_EC
ADD_TEST(ec_encode_to_data_multi);
ADD_TEST_SUITE(EC);
-Index: openssl-3.5.0-beta1/test/recipes/15-test_gendsa.t
+Index: openssl-3.6.0-alpha1/test/recipes/15-test_gendsa.t
===================================================================
---- openssl-3.5.0-beta1.orig/test/recipes/15-test_gendsa.t
-+++ openssl-3.5.0-beta1/test/recipes/15-test_gendsa.t
+--- openssl-3.6.0-alpha1.orig/test/recipes/15-test_gendsa.t
++++ openssl-3.6.0-alpha1/test/recipes/15-test_gendsa.t
@@ -24,7 +24,7 @@ use lib bldtop_dir('.');
plan skip_all => "This test is unsupported in a no-dsa build"
if disabled("dsa");
@@ -134,10 +134,10 @@ Index: openssl-3.5.0-beta1/test/recipes/
plan tests =>
($no_fips ? 0 : 2) # FIPS related tests
-Index: openssl-3.5.0-beta1/test/recipes/20-test_cli_fips.t
+Index: openssl-3.6.0-alpha1/test/recipes/20-test_cli_fips.t
===================================================================
---- openssl-3.5.0-beta1.orig/test/recipes/20-test_cli_fips.t
-+++ openssl-3.5.0-beta1/test/recipes/20-test_cli_fips.t
+--- openssl-3.6.0-alpha1.orig/test/recipes/20-test_cli_fips.t
++++ openssl-3.6.0-alpha1/test/recipes/20-test_cli_fips.t
@@ -283,8 +283,7 @@ SKIP: {
}
@@ -148,22 +148,22 @@ Index: openssl-3.5.0-beta1/test/recipes/
subtest DSA => sub {
my $testtext_prefix = 'DSA';
-Index: openssl-3.5.0-beta1/test/recipes/30-test_evp.t
+Index: openssl-3.6.0-alpha1/test/recipes/30-test_evp.t
===================================================================
---- openssl-3.5.0-beta1.orig/test/recipes/30-test_evp.t
-+++ openssl-3.5.0-beta1/test/recipes/30-test_evp.t
-@@ -166,7 +166,6 @@ my @defltfiles = qw(
+--- openssl-3.6.0-alpha1.orig/test/recipes/30-test_evp.t
++++ openssl-3.6.0-alpha1/test/recipes/30-test_evp.t
+@@ -172,7 +172,6 @@ my @defltfiles = qw(
+ );
push @defltfiles, qw(evppkey_brainpool.txt) unless $no_ec;
- push @defltfiles, qw(evppkey_ecdsa_rfc6979.txt) unless $no_ec;
push @defltfiles, qw(evppkey_ecx_kem.txt) unless $no_ecx;
-push @defltfiles, qw(evppkey_dsa_rfc6979.txt) unless $no_dsa;
push @defltfiles, qw(evppkey_sm2.txt) unless $no_sm2;
push @defltfiles, qw(evpciph_aes_gcm_siv.txt) unless $no_siv;
push @defltfiles, qw(evpciph_aes_siv.txt) unless $no_siv;
-Index: openssl-3.5.0-beta1/test/recipes/30-test_evp_data/evppkey_dsa.txt
+Index: openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_dsa.txt
===================================================================
---- openssl-3.5.0-beta1.orig/test/recipes/30-test_evp_data/evppkey_dsa.txt
-+++ openssl-3.5.0-beta1/test/recipes/30-test_evp_data/evppkey_dsa.txt
+--- openssl-3.6.0-alpha1.orig/test/recipes/30-test_evp_data/evppkey_dsa.txt
++++ openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_dsa.txt
@@ -44,17 +44,22 @@ PrivPubKeyPair = DSA-1024:DSA-1024-PUBLI
Title = DSA tests
@@ -281,11 +281,11 @@ Index: openssl-3.5.0-beta1/test/recipes/
DigestVerify = SHA256
Key = DSA-2048-160
Input = "Hello"
-Index: openssl-3.5.0-beta1/test/recipes/80-test_cms.t
+Index: openssl-3.6.0-alpha1/test/recipes/80-test_cms.t
===================================================================
---- openssl-3.5.0-beta1.orig/test/recipes/80-test_cms.t
-+++ openssl-3.5.0-beta1/test/recipes/80-test_cms.t
-@@ -107,7 +107,7 @@ my @smime_pkcs7_tests = (
+--- openssl-3.6.0-alpha1.orig/test/recipes/80-test_cms.t
++++ openssl-3.6.0-alpha1/test/recipes/80-test_cms.t
+@@ -119,7 +119,7 @@ my @smime_pkcs7_tests = (
\&final_compare
],
@@ -294,7 +294,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
[ "{cmd1}", @prov, "-sign", "-in", $smcont, "-outform", "DER", "-nodetach",
"-signer", catfile($smdir, "smdsa1.pem"), "-out", "{output}.cms" ],
[ "{cmd2}", @prov, "-verify", "-in", "{output}.cms", "-inform", "DER",
-@@ -115,7 +115,7 @@ my @smime_pkcs7_tests = (
+@@ -127,7 +127,7 @@ my @smime_pkcs7_tests = (
\&final_compare
],
@@ -303,7 +303,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
[ "{cmd1}", @prov, "-sign", "-in", $smcont, "-outform", "DER",
"-signer", catfile($smdir, "smdsa1.pem"), "-out", "{output}.cms" ],
[ "{cmd2}", @prov, "-verify", "-in", "{output}.cms", "-inform", "DER",
-@@ -124,7 +124,7 @@ my @smime_pkcs7_tests = (
+@@ -136,7 +136,7 @@ my @smime_pkcs7_tests = (
\&final_compare
],
@@ -312,7 +312,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
[ "{cmd1}", @prov, "-sign", "-in", $smcont, "-outform", "DER",
"-signer", catfile($smdir, "smdsa1.pem"), "-out", "{output}.cms" ],
[ "{cmd1}", @prov, "-resign", "-in", "{output}.cms", "-inform", "DER", "-outform", "DER",
-@@ -135,7 +135,7 @@ my @smime_pkcs7_tests = (
+@@ -147,7 +147,7 @@ my @smime_pkcs7_tests = (
\&final_compare
],
@@ -321,7 +321,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
[ "{cmd1}", @prov, "-sign", "-in", $smcont, "-outform", "DER",
"-nodetach", "-stream",
"-signer", catfile($smdir, "smdsa1.pem"), "-out", "{output}.cms" ],
-@@ -144,7 +144,7 @@ my @smime_pkcs7_tests = (
+@@ -156,7 +156,7 @@ my @smime_pkcs7_tests = (
\&final_compare
],
@@ -330,7 +330,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
[ "{cmd1}", @prov, "-sign", "-in", $smcont, "-outform", "DER",
"-nodetach", "-stream",
"-signer", $smrsa1,
-@@ -157,7 +157,7 @@ my @smime_pkcs7_tests = (
+@@ -169,7 +169,7 @@ my @smime_pkcs7_tests = (
\&final_compare
],
@@ -339,7 +339,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
[ "{cmd1}", @prov, "-sign", "-in", $smcont, "-outform", "DER",
"-noattr", "-nodetach", "-stream",
"-signer", $smrsa1,
-@@ -187,7 +187,7 @@ my @smime_pkcs7_tests = (
+@@ -199,7 +199,7 @@ my @smime_pkcs7_tests = (
\&zero_compare
],
@@ -348,7 +348,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
[ "{cmd1}", @prov, "-sign", "-in", $smcont, "-nodetach",
"-signer", $smrsa1,
"-signer", catfile($smdir, "smrsa2.pem"),
-@@ -199,7 +199,7 @@ my @smime_pkcs7_tests = (
+@@ -211,7 +211,7 @@ my @smime_pkcs7_tests = (
\&final_compare
],
@@ -357,7 +357,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
[ "{cmd1}", @prov, "-sign", "-in", $smcont,
"-signer", $smrsa1,
"-signer", catfile($smdir, "smrsa2.pem"),
-@@ -265,7 +265,7 @@ if ($no_fips || $old_fips) {
+@@ -285,7 +285,7 @@ if ($no_fips || $old_fips) {
my @smime_cms_tests = (
@@ -366,7 +366,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
[ "{cmd1}", @prov, "-sign", "-in", $smcont, "-outform", "DER",
"-nodetach", "-keyid",
"-signer", $smrsa1,
-@@ -278,7 +278,7 @@ my @smime_cms_tests = (
+@@ -298,7 +298,7 @@ my @smime_cms_tests = (
\&final_compare
],
--- openssl-FIPS-RSA-encapsulate.patch.orig
+++ openssl-FIPS-RSA-encapsulate.patch
@@ -6,13 +6,13 @@ Subject: [PATCH 42/48] 0091-FIPS-RSA-enc
Patch-name: 0091-FIPS-RSA-encapsulate.patch
Patch-id: 91
---
- providers/implementations/kem/rsa_kem.c | 15 +++++++++++++++
+ providers/implementations/kem/rsa_kem.c.in | 15 +++++++++++++++
1 file changed, 15 insertions(+)
-Index: openssl-3.2.4/providers/implementations/kem/rsa_kem.c
+Index: openssl-3.2.4/providers/implementations/kem/rsa_kem.c.in
===================================================================
---- openssl-3.2.4.orig/providers/implementations/kem/rsa_kem.c
-+++ openssl-3.2.4/providers/implementations/kem/rsa_kem.c
+--- openssl-3.2.4.orig/providers/implementations/kem/rsa_kem.c.in
++++ openssl-3.2.4/providers/implementations/kem/rsa_kem.c.in
@@ -276,6 +276,13 @@ static int rsasve_generate(PROV_RSA_CTX
return 0;
}
--- openssl-FIPS-limit-rsa-encrypt.patch.orig
+++ openssl-FIPS-limit-rsa-encrypt.patch
@@ -18,10 +18,10 @@ From-dist-git-commit: 4334bc837fbc64d148
6 files changed, 164 insertions(+), 43 deletions(-)
mode change 100644 => 100755 test/recipes/80-test_ssl_old.t
-Index: openssl-3.5.0-beta1/providers/common/securitycheck.c
+Index: openssl-3.6.0-alpha1/providers/common/securitycheck.c
===================================================================
---- openssl-3.5.0-beta1.orig/providers/common/securitycheck.c
-+++ openssl-3.5.0-beta1/providers/common/securitycheck.c
+--- openssl-3.6.0-alpha1.orig/providers/common/securitycheck.c
++++ openssl-3.6.0-alpha1/providers/common/securitycheck.c
@@ -64,6 +64,7 @@ int ossl_rsa_key_op_get_protect(const RS
* Set protect = 1 for encryption or signing operations, or 0 otherwise. See
* https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf.
@@ -30,10 +30,10 @@ Index: openssl-3.5.0-beta1/providers/com
int ossl_rsa_check_key_size(const RSA *rsa, int protect)
{
int sz = RSA_bits(rsa);
-Index: openssl-3.5.0-beta1/providers/fips/include/fips_indicator_params.inc
+Index: openssl-3.6.0-alpha1/providers/fips/include/fips_indicator_params.inc
===================================================================
---- openssl-3.5.0-beta1.orig/providers/fips/include/fips_indicator_params.inc
-+++ openssl-3.5.0-beta1/providers/fips/include/fips_indicator_params.inc
+--- openssl-3.6.0-alpha1.orig/providers/fips/include/fips_indicator_params.inc
++++ openssl-3.6.0-alpha1/providers/fips/include/fips_indicator_params.inc
@@ -13,7 +13,7 @@ OSSL_FIPS_PARAM(sskdf_digest_check, SSKD
OSSL_FIPS_PARAM(x963kdf_digest_check, X963KDF_DIGEST_CHECK, 0)
OSSL_FIPS_PARAM(dsa_sign_disallowed, DSA_SIGN_DISABLED, 0)
@@ -43,55 +43,11 @@ Index: openssl-3.5.0-beta1/providers/fip
OSSL_FIPS_PARAM(rsa_pss_saltlen_check, RSA_PSS_SALTLEN_CHECK, 0)
OSSL_FIPS_PARAM(rsa_sign_x931_disallowed, RSA_SIGN_X931_PAD_DISABLED, 0)
OSSL_FIPS_PARAM(hkdf_key_check, HKDF_KEY_CHECK, 0)
-Index: openssl-3.5.0-beta1/providers/implementations/asymciphers/rsa_enc.c
+Index: openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_rsa_common.txt
===================================================================
---- openssl-3.5.0-beta1.orig/providers/implementations/asymciphers/rsa_enc.c
-+++ openssl-3.5.0-beta1/providers/implementations/asymciphers/rsa_enc.c
-@@ -168,6 +168,18 @@ static int rsa_encrypt(void *vprsactx, u
- }
- #endif
-
-+# ifdef FIPS_MODULE
-+ if (prsactx->pad_mode == RSA_NO_PADDING) {
-+ ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_PADDING_MODE);
-+ return 0;
-+ }
-+
-+ if (RSA_bits(prsactx->rsa) < OPENSSL_RSA_FIPS_MIN_MODULUS_BITS) {
-+ ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
-+ return 0;
-+ }
-+# endif
-+
- if (out == NULL) {
- size_t len = RSA_size(prsactx->rsa);
-
-@@ -230,6 +242,20 @@ static int rsa_decrypt(void *vprsactx, u
- if (!ossl_prov_is_running())
- return 0;
-
-+# ifdef FIPS_MODULE
-+ if ((prsactx->pad_mode == RSA_PKCS1_PADDING
-+ || prsactx->pad_mode == RSA_PKCS1_WITH_TLS_PADDING
-+ || prsactx->pad_mode == RSA_NO_PADDING)) {
-+ ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_PADDING_MODE);
-+ return 0;
-+ }
-+
-+ if (RSA_bits(prsactx->rsa) < OPENSSL_RSA_FIPS_MIN_MODULUS_BITS) {
-+ ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
-+ return 0;
-+ }
-+# endif
-+
- if (prsactx->pad_mode == RSA_PKCS1_WITH_TLS_PADDING) {
- if (out == NULL) {
- *outlen = SSL_MAX_MASTER_KEY_LENGTH;
-Index: openssl-3.5.0-beta1/test/recipes/30-test_evp_data/evppkey_rsa_common.txt
-===================================================================
---- openssl-3.5.0-beta1.orig/test/recipes/30-test_evp_data/evppkey_rsa_common.txt
-+++ openssl-3.5.0-beta1/test/recipes/30-test_evp_data/evppkey_rsa_common.txt
-@@ -248,13 +248,13 @@ Input = 64b0e9f9892371110c40ba5739dc0974
+--- openssl-3.6.0-alpha1.orig/test/recipes/30-test_evp_data/evppkey_rsa_common.txt
++++ openssl-3.6.0-alpha1/test/recipes/30-test_evp_data/evppkey_rsa_common.txt
+@@ -255,13 +255,13 @@ Input = 64b0e9f9892371110c40ba5739dc0974
Output = 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
# RSA decrypt
@@ -107,7 +63,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# Note: disable the Bleichenbacher workaround to see if it passes
Decrypt = RSA-2048
Ctrl = rsa_pkcs1_implicit_rejection:0
-@@ -262,7 +262,7 @@ Input = 550AF55A2904E7B9762352F8FB7FA235
+@@ -269,7 +269,7 @@ Input = 550AF55A2904E7B9762352F8FB7FA235
Output = "Hello World"
# The old FIPS provider doesn't include the workaround (#13817)
@@ -116,7 +72,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# Corrupted ciphertext
# Note: output is generated synthethically by the Bleichenbacher workaround
Decrypt = RSA-2048
-@@ -270,7 +270,7 @@ Input = 550AF55A2904E7B9762352F8FB7FA235
+@@ -277,7 +277,7 @@ Input = 550AF55A2904E7B9762352F8FB7FA235
Output = 4cbb988d6a46228379132b0b5f8c249b3860043848c93632fb982c807c7c82fffc7a9ef83f4908f890373ac181ffea6381e103bcaa27e65638b6ecebef38b59ed4226a9d12af675cfcb634d8c40e7a7aff
# The old FIPS provider doesn't include the workaround (#13817)
@@ -125,7 +81,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# Corrupted ciphertext
# Note: disable the Bleichenbacher workaround to see if it fails
Decrypt = RSA-2048
-@@ -296,13 +296,14 @@ Input = 00000000000000000000000000000000
+@@ -303,13 +303,14 @@ Input = 00000000000000000000000000000000
Result = KEYOP_ERROR
# RSADP Ciphertext = 2 should pass
@@ -141,7 +97,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
Decrypt = RSA-2048
Ctrl = rsa_padding_mode:none
Input = cd0081ea7b2ae1ea06d59f7c73d9ffb94a09615c2e4ba7c636cef08dd3533ec3185525b015c769b99a77d6725bf9c3532a9b6e5f6627d5fb85160768d3dda9cbd35974511717dc3d309d2fc47ee41f97e32adb7f9dd864a1c4767a666ecd71bc1aacf5e7517f4b38594fea9b05e42d5ada9912008013e45316a4d9bb8ed086b88d28758bacaf922d46a868b485d239c9baeb0e2b64592710f42b2d1ea0a4b4802c0becab328f8a68b0073bdb546feea9809d2849912b390c1532bc7e29c7658f8175fae46f34332ff87bcab3e40649b98577869da0ea718353f0722754886913648760d122be676e0fc483dd20ffc31bda96a31966c9aa2e75ad03de47e1c44d
-@@ -317,6 +318,7 @@ Input = cd0081ea7b2ae1ea06d59f7c73d9ffb9
+@@ -324,6 +325,7 @@ Input = cd0081ea7b2ae1ea06d59f7c73d9ffb9
Result = KEYOP_ERROR
# RSADP Ciphertext = n should fail
@@ -149,7 +105,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
Decrypt = RSA-2048
Ctrl = rsa_padding_mode:none
Input = cd0081ea7b2ae1ea06d59f7c73d9ffb94a09615c2e4ba7c636cef08dd3533ec3185525b015c769b99a77d6725bf9c3532a9b6e5f6627d5fb85160768d3dda9cbd35974511717dc3d309d2fc47ee41f97e32adb7f9dd864a1c4767a666ecd71bc1aacf5e7517f4b38594fea9b05e42d5ada9912008013e45316a4d9bb8ed086b88d28758bacaf922d46a868b485d239c9baeb0e2b64592710f42b2d1ea0a4b4802c0becab328f8a68b0073bdb546feea9809d2849912b390c1532bc7e29c7658f8175fae46f34332ff87bcab3e40649b98577869da0ea718353f0722754886913648760d122be676e0fc483dd20ffc31bda96a31966c9aa2e75ad03de47e1c44f
-@@ -406,82 +408,90 @@ PrivPubKeyPair = RSA-2048-2:RSA-2048-2-P
+@@ -413,82 +415,90 @@ PrivPubKeyPair = RSA-2048-2:RSA-2048-2-P
# RSA decrypt
# a random positive test case
@@ -246,7 +202,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# an otherwise correct plaintext, but with wrong first byte
# (0x01 instead of 0x00), generates a random 11 byte long plaintext
Decrypt = RSA-2048-2
-@@ -489,7 +499,7 @@ Input = 9b2ec9c0c917c98f1ad3d0119aec6be5
+@@ -496,7 +506,7 @@ Input = 9b2ec9c0c917c98f1ad3d0119aec6be5
Output = a1f8c9255c35cfba403ccc
# The old FIPS provider doesn't include the workaround (#13817)
@@ -255,7 +211,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# an otherwise correct plaintext, but with wrong second byte
# (0x01 instead of 0x02), generates a random 11 byte long plaintext
Decrypt = RSA-2048-2
-@@ -497,7 +507,7 @@ Input = 782c2b59a21a511243820acedd567c13
+@@ -504,7 +514,7 @@ Input = 782c2b59a21a511243820acedd567c13
Output = e6d700309ca0ed62452254
# The old FIPS provider doesn't include the workaround (#13817)
@@ -264,7 +220,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# an invalid ciphertext, with a zero byte in first byte of
# ciphertext, decrypts to a random 11 byte long synthetic
# plaintext
-@@ -506,7 +516,7 @@ Input = 0096136621faf36d5290b16bd26295de
+@@ -513,7 +523,7 @@ Input = 0096136621faf36d5290b16bd26295de
Output = ba27b1842e7c21c0e7ef6a
# The old FIPS provider doesn't include the workaround (#13817)
@@ -273,7 +229,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# an invalid ciphertext, with a zero byte removed from first byte of
# ciphertext, decrypts to a random 11 byte long synthetic
# plaintext
-@@ -515,7 +525,7 @@ Input = 96136621faf36d5290b16bd26295de27
+@@ -522,7 +532,7 @@ Input = 96136621faf36d5290b16bd26295de27
Output = ba27b1842e7c21c0e7ef6a
# The old FIPS provider doesn't include the workaround (#13817)
@@ -282,7 +238,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# an invalid ciphertext, with two zero bytes in first bytes of
# ciphertext, decrypts to a random 11 byte long synthetic
# plaintext
-@@ -524,7 +534,7 @@ Input = 0000587cccc6b264bdfe0dc2149a9880
+@@ -531,7 +541,7 @@ Input = 0000587cccc6b264bdfe0dc2149a9880
Output = d5cf555b1d6151029a429a
# The old FIPS provider doesn't include the workaround (#13817)
@@ -291,7 +247,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# an invalid ciphertext, with two zero bytes removed from first bytes of
# ciphertext, decrypts to a random 11 byte long synthetic
# plaintext
-@@ -533,7 +543,7 @@ Input = 587cccc6b264bdfe0dc2149a988047fa
+@@ -540,7 +550,7 @@ Input = 587cccc6b264bdfe0dc2149a988047fa
Output = d5cf555b1d6151029a429a
# The old FIPS provider doesn't include the workaround (#13817)
@@ -300,7 +256,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# and invalid ciphertext, otherwise valid but starting with 000002, decrypts
# to random 11 byte long synthetic plaintext
Decrypt = RSA-2048-2
-@@ -541,7 +551,7 @@ Input = 1786550ce8d8433052e01ecba8b76d30
+@@ -548,7 +558,7 @@ Input = 1786550ce8d8433052e01ecba8b76d30
Output = 3d4a054d9358209e9cbbb9
# The old FIPS provider doesn't include the workaround (#13817)
@@ -309,7 +265,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# negative test with otherwise valid padding but a zero byte in first byte
# of padding
Decrypt = RSA-2048-2
-@@ -549,7 +559,7 @@ Input = 179598823812d2c58a7eb50521150a48
+@@ -556,7 +566,7 @@ Input = 179598823812d2c58a7eb50521150a48
Output = 1f037dd717b07d3e7f7359
# The old FIPS provider doesn't include the workaround (#13817)
@@ -318,7 +274,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# negative test with otherwise valid padding but a zero byte at the eighth
# byte of padding
Decrypt = RSA-2048-2
-@@ -557,7 +567,7 @@ Input = a7a340675a82c30e22219a55bc07cdf3
+@@ -564,7 +574,7 @@ Input = a7a340675a82c30e22219a55bc07cdf3
Output = 63cb0bf65fc8255dd29e17
# The old FIPS provider doesn't include the workaround (#13817)
@@ -327,7 +283,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# negative test with an otherwise valid plaintext but with missing separator
# byte
Decrypt = RSA-2048-2
-@@ -612,53 +622,58 @@ PrivPubKeyPair = RSA-2049:RSA-2049-PUBLI
+@@ -619,53 +629,58 @@ PrivPubKeyPair = RSA-2049:RSA-2049-PUBLI
# RSA decrypt
# The old FIPS provider doesn't include the workaround (#13817)
@@ -390,7 +346,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# otherwise correct plaintext, but with wrong second byte (0x01 instead of 0x02)
Decrypt = RSA-2049
Input = 00c5d77826c1ab7a34d6390f9d342d5dbe848942e2618287952ba0350d7de6726112e9cebc391a0fae1839e2bf168229e3e0d71d4161801509f1f28f6e1487ca52df05c466b6b0a6fbbe57a3268a970610ec0beac39ec0fa67babce1ef2a86bf77466dc127d7d0d2962c20e66593126f276863cd38dc6351428f884c1384f67cad0a0ffdbc2af16711fb68dc559b96b37b4f04cd133ffc7d79c43c42ca4948fa895b9daeb853150c8a5169849b730cc77d68b0217d6c0e3dbf38d751a1998186633418367e7576530566c23d6d4e0da9b038d0bb5169ce40133ea076472d055001f0135645940fd08ea44269af2604c8b1ba225053d6db9ab43577689401bdc0f3
-@@ -722,14 +737,14 @@ ooCElYcob01/JWzoXl61Z5sdrMH5CVZJty5foHKu
+@@ -729,7 +744,7 @@ ooCElYcob01/JWzoXl61Z5sdrMH5CVZJty5foHKu
PrivPubKeyPair = RSA-3072:RSA-3072-PUBLIC
# The old FIPS provider doesn't include the workaround (#13817)
@@ -399,7 +355,8 @@ Index: openssl-3.5.0-beta1/test/recipes/
# a random invalid ciphertext that generates an empty synthetic one
Decrypt = RSA-3072
Input = 5e956cd9652f4a2ece902931013e09662b6a9257ad1e987fb75f73a0606df2a4b04789770820c2e02322c4e826f767bd895734a01e20609c3be4517a7a2a589ea1cdc137beb73eb38dac781b52e863de9620f79f9b90fd5b953651fcbfef4a9f1cc07421d511a87dd6942caab6a5a0f4df473e62defb529a7de1509ab99c596e1dff1320402298d8be73a896cc86c38ae3f2f576e9ea70cc28ad575cb0f854f0be43186baa9c18e29c47c6ca77135db79c811231b7c1730955887d321fdc06568382b86643cf089b10e35ab23e827d2e5aa7b4e99ff2e914f302351819eb4d1693243b35f8bf1d42d08f8ec4acafa35f747a4a975a28643ec630d8e4fa5be59d81995660a14bb64c1fea5146d6b11f92da6a3956dd5cb5e0d747cf2ea23f81617769185336263d46ef4c144b754de62a6337342d6c85a95f19f015724546ee3fc4823eca603dbc1dc01c2d5ed50bd72d8e96df2dc048edde0081284068283fc5e73a6139851abf2f29977d0b3d160c883a42a37efba1be05c1a0b1741d7ddf59
- Output =
+@@ -742,7 +757,7 @@ Output =
+ Security-Category = 0
# The old FIPS provider doesn't include the workaround (#13817)
-FIPSversion = >=3.2.0
@@ -407,7 +364,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# a random invalid that has PRF output with a length one byte too long
# in the last value
Decrypt = RSA-3072
-@@ -737,46 +752,51 @@ Input = 7db0390d75fcf9d4c59cf27b264190d8
+@@ -750,46 +765,51 @@ Input = 7db0390d75fcf9d4c59cf27b264190d8
Output = 56a3bea054e01338be9b7d7957539c
# The old FIPS provider doesn't include the workaround (#13817)
@@ -462,7 +419,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# a random negative test case that generates a 9 byte long message based on
# second to last value from PRF
Decrypt = RSA-3072
-@@ -784,7 +804,7 @@ Input = 758c215aa6acd61248062b88284bf43c
+@@ -797,7 +817,7 @@ Input = 758c215aa6acd61248062b88284bf43c
Output = 043383c929060374ed
# The old FIPS provider doesn't include the workaround (#13817)
@@ -471,7 +428,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# a random negative test that generates message based on 3rd last value from
# PRF
Decrypt = RSA-3072
-@@ -792,35 +812,35 @@ Input = 7b22d5e62d287968c6622171a1f75db4
+@@ -805,35 +825,35 @@ Input = 7b22d5e62d287968c6622171a1f75db4
Output = 70263fa6050534b9e0
# The old FIPS provider doesn't include the workaround (#13817)
@@ -512,7 +469,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
# an otherwise valid plaintext, but with null separator missing
Decrypt = RSA-3072
Input = a7a5c99e50da48769ecb779d9abe86ef9ec8c38c6f43f17c7f2d7af608a4a1bd6cf695b47e97c191c61fb5a27318d02f495a176b9fae5a55b5d3fabd1d8aae4957e3879cb0c60f037724e11be5f30f08fc51c033731f14b44b414d11278cd3dba7e1c8bfe208d2b2bb7ec36366dacb6c88b24cd79ab394adf19dbbc21dfa5788bacbadc6a62f79cf54fd8cf585c615b5c0eb94c35aa9de25321c8ffefb8916bbaa2697cb2dd82ee98939df9b6704cee77793edd2b4947d82e00e5749664970736c59a84197bd72b5c71e36aae29cd39af6ac73a368edbc1ca792e1309f442aafcd77c992c88f8e4863149f221695cb7b0236e75b2339a02c4ea114854372c306b9412d8eedb600a31532002f2cea07b4df963a093185e4607732e46d753b540974fb5a5c3f9432df22e85bb17611370966c5522fd23f2ad3484341ba7fd8885fc8e6d379a611d13a2aca784fba2073208faad2137bf1979a0fa146c1880d4337db3274269493bab44a1bcd0681f7227ffdf589c2e925ed9d36302509d1109ba4
-@@ -912,9 +932,9 @@ Output=4DE433D5844043EF08D354DA03CB29068
+@@ -925,9 +945,9 @@ Output=4DE433D5844043EF08D354DA03CB29068
# Verify of above signature
Verify = RSA-2048-PUBLIC
@@ -523,7 +480,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
Input="0123456789ABCDEF0123456789ABCDEF"
Output=4DE433D5844043EF08D354DA03CB29068780D52706D7D1E4D50EFB7D58C9D547D83A747DDD0635A96B28F854E50145518482CB49E963054621B53C60C498D07C16E9C2789C893CF38D4D86900DE71BDE463BD2761D1271E358C7480A1AC0BAB930DDF39602AD1BC165B5D7436B516B7A7858E8EB7AB1C420EEB482F4D207F0E462B1724959320A084E13848D11D10FB593E66BF680BF6D3F345FC3E9C3DE60ABBAC37E1C6EC80A268C8D9FC49626C679097AA690BC1AA662B95EB8DB70390861AA0898229F9349B4B5FDD030D4928C47084708A933144BE23BD3C6E661B85B2C0EF9ED36D498D5B7320E8194D363D4AD478C059BAE804181965E0B81B663158A
-@@ -1207,36 +1227,42 @@ vcDtKrdWo6btTWc1Kml9QhbpMhKxJ6Y9VBHOb6mN
+@@ -1220,36 +1240,42 @@ vcDtKrdWo6btTWc1Kml9QhbpMhKxJ6Y9VBHOb6mN
h90qjKHS9PvY4Q==
-----END PRIVATE KEY-----
@@ -566,7 +523,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
Decrypt=RSA-OAEP-1
Ctrl = rsa_padding_mode:oaep
Ctrl = rsa_mgf1_md:sha1
-@@ -1261,36 +1287,42 @@ SwGNdhGLJDiac1Dsg2sAY6IXISNv2O222JtR5+64
+@@ -1274,36 +1300,42 @@ SwGNdhGLJDiac1Dsg2sAY6IXISNv2O222JtR5+64
eG2e4XlBcKjI6A==
-----END PRIVATE KEY-----
@@ -609,7 +566,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
Decrypt=RSA-OAEP-2
Ctrl = rsa_padding_mode:oaep
Ctrl = rsa_mgf1_md:sha1
-@@ -1315,36 +1347,42 @@ iUGx07dw5a0x7jc7KKzaaf+bb0D+V4ufGvuFg2+W
+@@ -1328,36 +1360,42 @@ iUGx07dw5a0x7jc7KKzaaf+bb0D+V4ufGvuFg2+W
Ya4qnqZe1onjY5o=
-----END PRIVATE KEY-----
@@ -652,7 +609,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
Decrypt=RSA-OAEP-3
Ctrl = rsa_padding_mode:oaep
Ctrl = rsa_mgf1_md:sha1
-@@ -1369,36 +1407,42 @@ s/XkIiO6MDAcQabYfLtw4wy308Z9JUc9sfbL8D4/
+@@ -1382,36 +1420,42 @@ s/XkIiO6MDAcQabYfLtw4wy308Z9JUc9sfbL8D4/
aD0x7TDrmEvkEro=
-----END PRIVATE KEY-----
@@ -695,7 +652,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
Decrypt=RSA-OAEP-4
Ctrl = rsa_padding_mode:oaep
Ctrl = rsa_mgf1_md:sha1
-@@ -1423,36 +1467,42 @@ OPlAQGLrhaQpJFILOPW7iGoBlvSLuNzqYP2SzAJ/
+@@ -1436,36 +1480,42 @@ OPlAQGLrhaQpJFILOPW7iGoBlvSLuNzqYP2SzAJ/
MSwGUGLx60i3nRyDyw==
-----END PRIVATE KEY-----
@@ -738,7 +695,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
Decrypt=RSA-OAEP-5
Ctrl = rsa_padding_mode:oaep
Ctrl = rsa_mgf1_md:sha1
-@@ -1477,36 +1527,42 @@ xT1F29tenZbQ/s9Cdd8JdLxKBza0p0wyaQU++2hq
+@@ -1490,36 +1540,42 @@ xT1F29tenZbQ/s9Cdd8JdLxKBza0p0wyaQU++2hq
Yejn5Ly8mU2q+jBcRQ==
-----END PRIVATE KEY-----
@@ -781,7 +738,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
Decrypt=RSA-OAEP-6
Ctrl = rsa_padding_mode:oaep
Ctrl = rsa_mgf1_md:sha1
-@@ -1531,36 +1587,42 @@ tu4XIedy0DiaVZw9PN+VUNRXxGsDe3RkGx1SFmr4
+@@ -1544,36 +1600,42 @@ tu4XIedy0DiaVZw9PN+VUNRXxGsDe3RkGx1SFmr4
FMlxv0gq65dqc3DC
-----END PRIVATE KEY-----
@@ -824,7 +781,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
Decrypt=RSA-OAEP-7
Ctrl = rsa_padding_mode:oaep
Ctrl = rsa_mgf1_md:sha1
-@@ -1585,36 +1647,42 @@ njraT2MgdSwJ2AX/fR8a4NAXru7pzvoNfdf/d15E
+@@ -1598,36 +1660,42 @@ njraT2MgdSwJ2AX/fR8a4NAXru7pzvoNfdf/d15E
2MiPa249Z+lh3Luj0A==
-----END PRIVATE KEY-----
@@ -867,7 +824,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
Decrypt=RSA-OAEP-8
Ctrl = rsa_padding_mode:oaep
Ctrl = rsa_mgf1_md:sha1
-@@ -1645,36 +1713,42 @@ Z7CDuaemy2HkLbNiuMmJbbcGTgKtWuYVh9oVtGSc
+@@ -1658,36 +1726,42 @@ Z7CDuaemy2HkLbNiuMmJbbcGTgKtWuYVh9oVtGSc
tKo5Eb69iFQvBb4=
-----END PRIVATE KEY-----
@@ -910,11 +867,11 @@ Index: openssl-3.5.0-beta1/test/recipes/
Decrypt=RSA-OAEP-9
Ctrl = rsa_padding_mode:oaep
Ctrl = rsa_mgf1_md:sha1
-Index: openssl-3.5.0-beta1/test/recipes/80-test_cms.t
+Index: openssl-3.6.0-alpha1/test/recipes/80-test_cms.t
===================================================================
---- openssl-3.5.0-beta1.orig/test/recipes/80-test_cms.t
-+++ openssl-3.5.0-beta1/test/recipes/80-test_cms.t
-@@ -250,7 +250,7 @@ my @smime_pkcs7_tests = (
+--- openssl-3.6.0-alpha1.orig/test/recipes/80-test_cms.t
++++ openssl-3.6.0-alpha1/test/recipes/80-test_cms.t
+@@ -270,7 +270,7 @@ my @smime_pkcs7_tests = (
if ($no_fips || $old_fips) {
push(@smime_pkcs7_tests,
@@ -923,7 +880,7 @@ Index: openssl-3.5.0-beta1/test/recipes/
[ "{cmd1}", @prov, "-encrypt", "-in", $smcont,
"-aes256", "-stream", "-out", "{output}.cms",
$smrsa1,
-@@ -1267,6 +1267,9 @@ sub check_availability {
+@@ -1298,6 +1298,9 @@ sub check_availability {
return "$tnam: skipped, DSA disabled\n"
if ($no_dsa && $tnam =~ / DSA/);
@@ -933,10 +890,10 @@ Index: openssl-3.5.0-beta1/test/recipes/
return "";
}
-Index: openssl-3.5.0-beta1/test/recipes/80-test_ssl_old.t
+Index: openssl-3.6.0-alpha1/test/recipes/80-test_ssl_old.t
===================================================================
---- openssl-3.5.0-beta1.orig/test/recipes/80-test_ssl_old.t
-+++ openssl-3.5.0-beta1/test/recipes/80-test_ssl_old.t
+--- openssl-3.6.0-alpha1.orig/test/recipes/80-test_ssl_old.t
++++ openssl-3.6.0-alpha1/test/recipes/80-test_ssl_old.t
@@ -561,6 +561,18 @@ sub testssl {
# the default choice if TLSv1.3 enabled
my $flag = $protocol eq "-tls1_3" ? "" : $protocol;
@@ -978,3 +935,47 @@ Index: openssl-3.5.0-beta1/test/recipes/
}
}
next if $protocol eq "-tls1_3";
+Index: openssl-3.6.0-alpha1/providers/implementations/asymciphers/rsa_enc.c.in
+===================================================================
+--- openssl-3.6.0-alpha1.orig/providers/implementations/asymciphers/rsa_enc.c.in
++++ openssl-3.6.0-alpha1/providers/implementations/asymciphers/rsa_enc.c.in
+@@ -172,6 +172,18 @@ static int rsa_encrypt(void *vprsactx, u
+ }
+ #endif
+
++# ifdef FIPS_MODULE
++ if (prsactx->pad_mode == RSA_NO_PADDING) {
++ ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_PADDING_MODE);
++ return 0;
++ }
++
++ if (RSA_bits(prsactx->rsa) < OPENSSL_RSA_FIPS_MIN_MODULUS_BITS) {
++ ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
++ return 0;
++ }
++# endif
++
+ if (out == NULL) {
+ size_t len = RSA_size(prsactx->rsa);
+
+@@ -234,6 +246,20 @@ static int rsa_decrypt(void *vprsactx, u
+ if (!ossl_prov_is_running())
+ return 0;
+
++# ifdef FIPS_MODULE
++ if ((prsactx->pad_mode == RSA_PKCS1_PADDING
++ || prsactx->pad_mode == RSA_PKCS1_WITH_TLS_PADDING
++ || prsactx->pad_mode == RSA_NO_PADDING)) {
++ ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_PADDING_MODE);
++ return 0;
++ }
++
++ if (RSA_bits(prsactx->rsa) < OPENSSL_RSA_FIPS_MIN_MODULUS_BITS) {
++ ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
++ return 0;
++ }
++# endif
++
+ if (prsactx->pad_mode == RSA_PKCS1_WITH_TLS_PADDING) {
+ if (out == NULL) {
+ *outlen = SSL_MAX_MASTER_KEY_LENGTH;
--- openssl-pbkdf2-Set-minimum-password-length-of-8-bytes.patch.orig
+++ openssl-pbkdf2-Set-minimum-password-length-of-8-bytes.patch
@@ -7,14 +7,14 @@ Subject: [PATCH 39/48]
Patch-name: 0084-pbkdf2-Set-minimum-password-length-of-8-bytes.patch
Patch-id: 84
---
- providers/implementations/kdfs/pbkdf2.c | 27 ++++++++++++++++++++++++-
+ providers/implementations/kdfs/pbkdf2.c.in | 27 ++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
-Index: openssl-3.5.0-beta1/providers/implementations/kdfs/pbkdf2.c
+Index: openssl-3.6.0-alpha1/providers/implementations/kdfs/pbkdf2.c.in
===================================================================
---- openssl-3.5.0-beta1.orig/providers/implementations/kdfs/pbkdf2.c
-+++ openssl-3.5.0-beta1/providers/implementations/kdfs/pbkdf2.c
-@@ -36,6 +36,21 @@
+--- openssl-3.6.0-alpha1.orig/providers/implementations/kdfs/pbkdf2.c.in
++++ openssl-3.6.0-alpha1/providers/implementations/kdfs/pbkdf2.c.in
+@@ -38,6 +38,21 @@ use OpenSSL::paramnames qw(produce_param
#define KDF_PBKDF2_MAX_KEY_LEN_DIGEST_RATIO 0xFFFFFFFF
#define KDF_PBKDF2_MIN_ITERATIONS 1000
#define KDF_PBKDF2_MIN_SALT_LEN (128 / 8)
@@ -36,7 +36,7 @@ Index: openssl-3.5.0-beta1/providers/imp
static OSSL_FUNC_kdf_newctx_fn kdf_pbkdf2_new;
static OSSL_FUNC_kdf_dupctx_fn kdf_pbkdf2_dup;
-@@ -179,8 +194,8 @@ static int pbkdf2_set_membuf(unsigned ch
+@@ -185,8 +200,8 @@ static int pbkdf2_set_membuf(unsigned ch
}
static int pbkdf2_lower_bound_check_passed(int saltlen, uint64_t iter,
@@ -47,7 +47,7 @@ Index: openssl-3.5.0-beta1/providers/imp
{
if ((keylen * 8) < KDF_PBKDF2_MIN_KEY_LEN_BITS) {
*error = PROV_R_KEY_SIZE_TOO_SMALL;
-@@ -188,6 +203,12 @@ static int pbkdf2_lower_bound_check_pass
+@@ -194,6 +209,12 @@ static int pbkdf2_lower_bound_check_pass
*desc = "Key size";
return 0;
}
@@ -60,52 +60,50 @@ Index: openssl-3.5.0-beta1/providers/imp
if (saltlen < KDF_PBKDF2_MIN_SALT_LEN) {
*error = PROV_R_INVALID_SALT_LENGTH;
if (desc != NULL)
-@@ -205,13 +226,13 @@ static int pbkdf2_lower_bound_check_pass
- }
+@@ -212,12 +233,12 @@ static int pbkdf2_lower_bound_check_pass
#ifdef FIPS_MODULE
--static int fips_lower_bound_check_passed(KDF_PBKDF2 *ctx, size_t keylen)
-+static int fips_lower_bound_check_passed(KDF_PBKDF2 *ctx, size_t keylen, size_t passlen)
+ static int fips_lower_bound_check_passed(KDF_PBKDF2 *ctx, int saltlen,
+- uint64_t iter, size_t keylen)
++ uint64_t iter, size_t keylen, size_t passlen)
{
OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(ctx->provctx);
int error = 0;
const char *desc = NULL;
- int approved = pbkdf2_lower_bound_check_passed(ctx->salt_len, ctx->iter,
-- keylen, &error, &desc);
-+ keylen, passlen, &error, &desc);
+- int approved = pbkdf2_lower_bound_check_passed(saltlen, iter, keylen,
++ int approved = pbkdf2_lower_bound_check_passed(saltlen, iter, keylen, passlen,
+ &error, &desc);
if (!approved) {
- if (!OSSL_FIPS_IND_ON_UNAPPROVED(ctx, OSSL_FIPS_IND_SETTABLE0, libctx,
-@@ -283,9 +304,15 @@ static int kdf_pbkdf2_set_ctx_params(voi
+@@ -236,12 +257,12 @@ static int lower_bound_check_passed(KDF_
+ size_t keylen, int lower_bound_checks)
+ {
+ #ifdef FIPS_MODULE
+- if (!fips_lower_bound_check_passed(ctx, saltlen, iter, keylen))
++ if (!fips_lower_bound_check_passed(ctx, saltlen, iter, keylen, passlen))
+ return 0;
+ #else
+ if (lower_bound_checks) {
+ int error = 0;
+- int passed = pbkdf2_lower_bound_check_passed(saltlen, iter, keylen,
++ int passed = pbkdf2_lower_bound_check_passed(saltlen, iter, keylen, passlen,
+ &error, NULL);
+
+ if (!passed) {
+@@ -328,8 +349,15 @@ static int kdf_pbkdf2_set_ctx_params(voi
#endif
}
-- if ((p = OSSL_PARAM_locate_const(params, OSSL_KDF_PARAM_PASSWORD)) != NULL)
-+ if ((p = OSSL_PARAM_locate_const(params, OSSL_KDF_PARAM_PASSWORD)) != NULL) {
+- if (p.pw != NULL && !pbkdf2_set_membuf(&ctx->pass, &ctx->pass_len, p.pw))
++ if (p.pw != NULL) {
+ if (ctx->lower_bound_checks != 0
+ && p->data_size < KDF_PBKDF2_MIN_PASSWORD_LEN) {
+ ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
-+ return 0;
-+ }
- if (!pbkdf2_set_membuf(&ctx->pass, &ctx->pass_len, p))
return 0;
++ }
++ if (!pbkdf2_set_membuf(&ctx->pass, &ctx->pass_len, p.pw))
++ return 0;
+ }
- if ((p = OSSL_PARAM_locate_const(params, OSSL_KDF_PARAM_SALT)) != NULL) {
- if (ctx->lower_bound_checks != 0
-@@ -400,13 +427,13 @@ static int pbkdf2_derive(KDF_PBKDF2 *ctx
- }
-
- #ifdef FIPS_MODULE
-- if (!fips_lower_bound_check_passed(ctx, keylen))
-+ if (!fips_lower_bound_check_passed(ctx, keylen, passlen))
- return 0;
- #else
- if (lower_bound_checks) {
- int error = 0;
- int passed = pbkdf2_lower_bound_check_passed(saltlen, iter, keylen,
-- &error, NULL);
-+ passlen, &error, NULL);
-
- if (!passed) {
- ERR_raise(ERR_LIB_PROV, error);
+ if (p.salt != NULL) {
+ if (!lower_bound_check_passed(ctx, (int)p.salt->data_size, UINT64_MAX, SIZE_MAX,