]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
5 months agodemos: fix cert scripts
James Muir [Sat, 23 Dec 2023 22:03:21 +0000 (17:03 -0500)] 
demos: fix cert scripts

set LD_LIBRARY_PATH so the correct libs can be found.

Testing:

  cd demos/certs && sh mkcerts.sh
  cd demos/certs/apps && sh -x mkacerts.sh

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23142)

5 months agoparams: drop INT_MAX checks
James Muir [Sun, 24 Dec 2023 00:51:38 +0000 (19:51 -0500)] 
params: drop INT_MAX checks

The INT_MAX checks in param_build.c do not appear to be needed.  Drop
them.  This was noted during the discussion for PR #22967.  This makes
param_build.c more consistent with params.c.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23143)

5 months agoDisable building quicserver utility when configured with `no-apps` option
Vitalii Koshura [Mon, 25 Dec 2023 11:38:24 +0000 (12:38 +0100)] 
Disable building quicserver utility when configured with `no-apps` option

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23149)

5 months agoFix typos found by codespell in man pages
Dimitri Papadopoulos [Fri, 22 Dec 2023 13:06:24 +0000 (14:06 +0100)] 
Fix typos found by codespell in man pages

Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23131)

5 months agoFix new typos found by codespell
Dimitri Papadopoulos [Fri, 22 Dec 2023 13:37:12 +0000 (14:37 +0100)] 
Fix new typos found by codespell

Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23133)

5 months agomd5: add assembly implementation for loongarch64
Min Zhou [Wed, 13 Dec 2023 14:40:14 +0000 (22:40 +0800)] 
md5: add assembly implementation for loongarch64

This change can improve md5 performance by using a hand-optimized
assembly implementation of the inner loop of md5 calculation.
This implementation refered to md5-x86_64.pl and made more effort
to reorder instructions for separating data dependencies as much
as possible.

Test with:
$ openssl speed md5

3A5000
type             16 bytes    64 bytes     256 bytes    1024 bytes   8192 bytes   16384 bytes
md5              45061.04k   130440.75k   291105.28k   421101.23k   484639.27k   488320.43k
md5-modified     47179.95k   139015.57k   308836.69k   445963.26k   512540.67k   518215.00k
                   +5%         +7%          +6%          +6%          +6%          +6%

3A6000
type             16 bytes    64 bytes     256 bytes    1024 bytes   8192 bytes   16384 bytes
md5              60070.06k   161822.76k   325817.60k   438017.02k   486864.21k   492243.31k
md5-modified     62827.74k   170294.04k   343795.03k   463324.50k   515831.13k   520060.93k
                   +5%         +5%          +6%          +6%          +6%          +6%

Signed-off-by: Min Zhou <zhoumin@loongson.cn>
Co-authored-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21704)

5 months agoFix remaining provider config settings to be decisive in value
Neil Horman [Wed, 20 Dec 2023 18:00:57 +0000 (13:00 -0500)] 
Fix remaining provider config settings to be decisive in value

There is one remaining config setting for providers, soft_load, which is
enabled when provided in a config, regardless of its value.  Augment it
to require a decisive value 1/0, yes/no, on/off, true/false, as we've
recently done for the activate setting.

Also, since it wasn't previously documented, add docs for it.

Fixes #23105

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23111)

5 months agoIgnore OSSL_MAC_PARAM_DIGEST_NOINIT/OSSL_MAC_PARAM_DIGEST_ONESHOT
Neil Horman [Thu, 14 Dec 2023 17:15:21 +0000 (12:15 -0500)] 
Ignore OSSL_MAC_PARAM_DIGEST_NOINIT/OSSL_MAC_PARAM_DIGEST_ONESHOT

The hmac flags OSSL_MAC_PARAM_DIGEST_NOINIT and
OSSL_MAC_PARAM_DIGEST_ONESHOT dont add any real value to the provider,
and the former causes a segfault when the provider attempts to call
EVP_MAC_init on an EVP_MAC object that has been instructed not to be
initalized (as the update function will not have been set in the MAC
object, which is unilaterally called from EVP_MAC_init

Remove the tests for the above flags, and document them as being
deprecated and ignored.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23054)

5 months agoOptimize circular buffer to avoid modulo
Rose [Tue, 19 Dec 2023 16:19:38 +0000 (11:19 -0500)] 
Optimize circular buffer to avoid modulo

CLA: trivial

Avoid doing the division via modulo where possible.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23097)

5 months agoRemove uneeded cast to unsigned int
Rose [Tue, 19 Dec 2023 16:29:54 +0000 (11:29 -0500)] 
Remove uneeded cast to unsigned int

CLA: trivial

cipher_ctx->blocksize is already unsigned.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23098)

5 months agoAES: Document that the XTS, SIV, WRAP modes do not support streaming
Tomas Mraz [Wed, 13 Dec 2023 09:06:59 +0000 (10:06 +0100)] 
AES: Document that the XTS, SIV, WRAP modes do not support streaming

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23028)

5 months agoSM4: Document that the XTS mode does not support streaming
Tomas Mraz [Wed, 13 Dec 2023 09:03:07 +0000 (10:03 +0100)] 
SM4: Document that the XTS mode does not support streaming

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23028)

5 months agoImprove the documentation on TLS record compression
Matt Caswell [Wed, 20 Dec 2023 10:07:39 +0000 (10:07 +0000)] 
Improve the documentation on TLS record compression

TLS record compression is off by default. Even if you switch it on, it
cannot be used at security level 2 which is the default in OpenSSL 3.2 and
above. Update the docs to point this out.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23104)

5 months agocrypto/cmp: fix clash of OSSL_CMP_CERTREQID_NONE with error result of ossl_cmp_asn1_g...
Dr. David von Oheimb [Thu, 27 Jul 2023 18:03:16 +0000 (20:03 +0200)] 
crypto/cmp: fix clash of OSSL_CMP_CERTREQID_NONE with error result of ossl_cmp_asn1_get_int()

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/20727)

5 months agocmp_server.c,apps/lib/cmp_mock_srv.c: move polling state checks to cmp_server.c
Rajeev Ranjan [Wed, 3 May 2023 14:19:36 +0000 (16:19 +0200)] 
cmp_server.c,apps/lib/cmp_mock_srv.c: move polling state checks to cmp_server.c

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/20727)

5 months agocrypto/cmp/,apps/lib/cmp_mock_srv.c: various improvements on delayed delivery
Dr. David von Oheimb [Fri, 28 Apr 2023 11:45:21 +0000 (13:45 +0200)] 
crypto/cmp/,apps/lib/cmp_mock_srv.c: various improvements on delayed delivery

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/20727)

5 months agocrypto/cmp/,apps/lib/cmp_mock_srv.c: add delayed delivery for all types of responses
Rajeev Ranjan [Mon, 13 Mar 2023 08:16:57 +0000 (09:16 +0100)] 
crypto/cmp/,apps/lib/cmp_mock_srv.c: add delayed delivery for all types of responses

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/20727)

5 months agoDetect and prevent recursive config parsing
Neil Horman [Thu, 30 Nov 2023 19:28:09 +0000 (14:28 -0500)] 
Detect and prevent recursive config parsing

If a malformed config file is provided such as the following:

openssl_conf = openssl_init
[openssl_init]
providers = provider_sect
[provider_sect]
 = provider_sect

The config parsing library will crash overflowing the stack, as it
recursively parses the same provider_sect ad nauseum.

Prevent this by maintaing a list of visited nodes as we recurse through
referenced sections, and erroring out in the event we visit any given
section node more than once.

Note, adding the test for this revealed that our diagnostic code
inadvertently pops recorded errors off the error stack because
provider_conf_load returns success even in the event that a
configuration parse failed. The call path to provider_conf_load has been
updated in this commit to address that shortcoming, allowing recorded
errors to be visibile to calling applications.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22898)

5 months agoMake the activate setting more intuitive
Neil Horman [Fri, 1 Dec 2023 19:02:09 +0000 (14:02 -0500)] 
Make the activate setting more intuitive

Currently, a provider is activated from our config file using the
activate parameter.  However, the presence of the config parameter is
sufficient to trigger activation, leading to a counterintuitive
situation in which setting "activate = 0" still activates the provider

Make activation more intuitive by requiring that activate be set to one
of yes|true|1 to trigger activation.  Any other value, as well as
omitting the parameter entirely, prevents activation (and also maintains
backward compatibility.

It seems a bit heavyweight to create a test specifically to validate the
plurality of these settings.  Instead, modify the exiting openssl config
files in the test directory to use variants of these settings, and
augment the default.cnf file to include a provider section that is
explicitly disabled

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22906)

5 months agoUse GH action commands to group/collapse filtered output
Neil Horman [Tue, 19 Dec 2023 11:36:02 +0000 (06:36 -0500)] 
Use GH action commands to group/collapse filtered output

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22678)

5 months agoaugment test/run_tests.pl to filter indirect leaks
Neil Horman [Thu, 9 Nov 2023 14:12:51 +0000 (09:12 -0500)] 
augment test/run_tests.pl to filter indirect leaks

When verbosity isn't set to 1 or higher, suppress indirect leaks (i.e.
only print direct leaks) to make output more human-readable.  Setting
V=1 on make test produces all leaks (direct and indirect)

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22678)

5 months agoQUIC: Move CID generation to quic_types.c
Hugo Landau [Tue, 19 Dec 2023 16:09:04 +0000 (16:09 +0000)] 
QUIC: Move CID generation to quic_types.c

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoMinor updates
Hugo Landau [Tue, 19 Dec 2023 15:10:43 +0000 (15:10 +0000)] 
Minor updates

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Add explicit cast to get_time wrapper
Hugo Landau [Tue, 19 Dec 2023 07:34:59 +0000 (07:34 +0000)] 
QUIC PORT: Add explicit cast to get_time wrapper

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC: Add more glossary entries
Hugo Landau [Tue, 19 Dec 2023 07:33:24 +0000 (07:33 +0000)] 
QUIC: Add more glossary entries

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoMinor fixes
Hugo Landau [Mon, 18 Dec 2023 07:30:02 +0000 (07:30 +0000)] 
Minor fixes

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoMinor updates
Hugo Landau [Fri, 8 Dec 2023 07:51:16 +0000 (07:51 +0000)] 
Minor updates

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC APL, TSERVER: Start using a QUIC_ENGINE object
Hugo Landau [Fri, 10 Nov 2023 13:36:29 +0000 (13:36 +0000)] 
QUIC APL, TSERVER: Start using a QUIC_ENGINE object

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC ENGINE: Add unused QUIC_ENGINE object
Hugo Landau [Fri, 10 Nov 2023 12:53:39 +0000 (12:53 +0000)] 
QUIC ENGINE: Add unused QUIC_ENGINE object

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC CHANNEL: Remove obsolete SRT definitions
Hugo Landau [Fri, 10 Nov 2023 12:40:12 +0000 (12:40 +0000)] 
QUIC CHANNEL: Remove obsolete SRT definitions

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Add missing copyright header
Hugo Landau [Fri, 10 Nov 2023 12:34:56 +0000 (12:34 +0000)] 
QUIC PORT: Add missing copyright header

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoUpdate fuzz corpora
Hugo Landau [Fri, 10 Nov 2023 10:33:13 +0000 (10:33 +0000)] 
Update fuzz corpora

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Fix BIO_dgram usage under Winsock due to bind requirement
Hugo Landau [Thu, 9 Nov 2023 15:30:15 +0000 (15:30 +0000)] 
QUIC PORT: Fix BIO_dgram usage under Winsock due to bind requirement

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC Refactor: Fix ANSI - struct definition duplications
Hugo Landau [Thu, 9 Nov 2023 11:04:50 +0000 (11:04 +0000)] 
QUIC Refactor: Fix ANSI - struct definition duplications

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoMARKER: End of Phase 4: Finalization & SRT Handling
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
MARKER: End of Phase 4: Finalization & SRT Handling

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Allow errors to be tracked at port level
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC PORT: Allow errors to be tracked at port level

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC MULTISTREAM TEST: Make error tests non-mutating and restore error code test
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC MULTISTREAM TEST: Make error tests non-mutating and restore error code test

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC MULTISTREAM TEST: add OP_POP_ERR
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC MULTISTREAM TEST: add OP_POP_ERR

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoERR: Add ERR_pop()
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
ERR: Add ERR_pop()

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Formalise states of a port
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC PORT: Formalise states of a port

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Resolve TODOs
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC PORT: Resolve TODOs

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC DEMUX: Remove obsolete SRT handling code
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC DEMUX: Remove obsolete SRT handling code

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC CHANNEL, LCIDM: Factor duplicate CID generation function
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC CHANNEL, LCIDM: Factor duplicate CID generation function

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC CHANNEL: Finish cleanup of LCIDM integration
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC CHANNEL: Finish cleanup of LCIDM integration

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC CHANNEL: Finish moving SRT handling to SRTM
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC CHANNEL: Finish moving SRT handling to SRTM

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoMARKER: End of Phase 3: Legacy Cleanup
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
MARKER: End of Phase 3: Legacy Cleanup

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC DEMUX: Remove legacy routing code
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC DEMUX: Remove legacy routing code

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC QRX: Remove legacy DEMUX-QRX routing code
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC QRX: Remove legacy DEMUX-QRX routing code

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC QRL TEST: Remove dependency on legacy DEMUX-QRX routing
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC QRL TEST: Remove dependency on legacy DEMUX-QRX routing

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC TXP TEST: Remove dependency on legacy DEMUX-QRX routing
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC TXP TEST: Remove dependency on legacy DEMUX-QRX routing

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC DEMUX, QRX: Add deprecation notices for future handling
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC DEMUX, QRX: Add deprecation notices for future handling

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC CHANNEL: Phase out use of QRX-DEMUX routing in favour of PORT-LCIDM routing
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC CHANNEL: Phase out use of QRX-DEMUX routing in favour of PORT-LCIDM routing

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC CHANNEL: Keep a reference to our LCIDM
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC CHANNEL: Keep a reference to our LCIDM

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Enable injection of incoming URXEs into a channel via default handler...
Hugo Landau [Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)] 
QUIC PORT: Enable injection of incoming URXEs into a channel via default handler rather than DEMUX routing

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC DEMUX: Allow parsed DCID to be learnt in default packet handler
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC DEMUX: Allow parsed DCID to be learnt in default packet handler

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Create a LCIDM
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC PORT: Create a LCIDM

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Partially move stateless reset handling to port
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC PORT: Partially move stateless reset handling to port

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Add SRTM wiring
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC PORT: Add SRTM wiring

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC CHANNEL: Remove legacy calls for functionality moved to QUIC_PORT
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC CHANNEL: Remove legacy calls for functionality moved to QUIC_PORT

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoMARKER: End of Phase 2: Transfer of Responsibilities Done, Legacy Compat Retained
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
MARKER: End of Phase 2: Transfer of Responsibilities Done, Legacy Compat Retained

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT, CHANNEL: Move ticking code into QUIC_PORT
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC PORT, CHANNEL: Move ticking code into QUIC_PORT

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT, CHANNEL: Move DEMUX and default packet handling out of CHANNEL
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC PORT, CHANNEL: Move DEMUX and default packet handling out of CHANNEL

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Make QUIC_PORT responsible for creation of all channels
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC PORT: Make QUIC_PORT responsible for creation of all channels

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Record a SSL_CTX for use when creating handshake layer objects
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC PORT: Record a SSL_CTX for use when creating handshake layer objects

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Keep a list of all child channels
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC PORT: Keep a list of all child channels

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC CHANNEL, PORT: Abstract time retrieval
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC CHANNEL, PORT: Abstract time retrieval

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC CHANNEL, TSERVER: Move to using libctx/propq/mutex/now_cb via QUIC_PORT
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC CHANNEL, TSERVER: Move to using libctx/propq/mutex/now_cb via QUIC_PORT

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoMARKER: End of Phase 1: Unused QUIC_PORT
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
MARKER: End of Phase 1: Unused QUIC_PORT

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC CHANNEL: Make a QUIC_PORT mandatory
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC CHANNEL: Make a QUIC_PORT mandatory

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC TSERVER: Provide a TSERVER's QUIC_CHANNEL with a currently unused QUIC_PORT
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC TSERVER: Provide a TSERVER's QUIC_CHANNEL with a currently unused QUIC_PORT

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC APL: Provide the QUIC_CHANNEL with a currently unused QUIC_PORT
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC APL: Provide the QUIC_CHANNEL with a currently unused QUIC_PORT

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC CHANNEL: Keep a reference to a QUIC_PORT
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC CHANNEL: Keep a reference to a QUIC_PORT

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC PORT: Add basic unwired QUIC_PORT object
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC PORT: Add basic unwired QUIC_PORT object

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC CHANNEL: Consolidate forward object declarations in a single header
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC CHANNEL: Consolidate forward object declarations in a single header

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoQUIC REACTOR: Add utility function for merging tick results
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
QUIC REACTOR: Add utility function for merging tick results

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agolist.h: Add iterator macros
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
list.h: Add iterator macros

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agolist.h: Allow separation of declarations and function definitions
Hugo Landau [Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)] 
list.h: Allow separation of declarations and function definitions

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

5 months agoMake SSL_clear_options pass new options to record layer
lan1120 [Tue, 19 Dec 2023 09:15:58 +0000 (17:15 +0800)] 
Make SSL_clear_options pass new options to record layer

Signed-off-by: lan1120 <lanming@huawei.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23045)

5 months agoBump actions/setup-python from 4.7.1 to 5.0.0
dependabot[bot] [Tue, 19 Dec 2023 18:00:12 +0000 (18:00 +0000)] 
Bump actions/setup-python from 4.7.1 to 5.0.0

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.7.1 to 5.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4.7.1...v5.0.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
CLA: trivial

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22963)

5 months agoLoongArch64 assembly pack: Really implement OPENSSL_rdtsc
Xi Ruoyao [Sun, 26 Nov 2023 11:49:48 +0000 (19:49 +0800)] 
LoongArch64 assembly pack: Really implement OPENSSL_rdtsc

LoongArch [rdtimel.w][1] instruction reads the low 32 bits of the
64-bit stable counter, implement OPENSSL_rdtsc with it instead of always
returning 0.

[1]:https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#_rdtimelh_w_rdtime_d

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22823)

5 months agoUpdate IPAddressOrRange_cmp function to handle switch case
Vikas Verma [Mon, 18 Dec 2023 13:28:25 +0000 (18:58 +0530)] 
Update IPAddressOrRange_cmp function to handle switch case

As there is no default case for a->type or b->type in the switch()
statements, if the type does not fall into any defined cases
then memcmp() will be done on garbage data.

Adding default cases in both switches.

CLA: trivial

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23082)

5 months agoLoongArch64 assembly pack: Fix ChaCha20 ABI breakage
Xi Ruoyao [Sat, 25 Nov 2023 09:53:57 +0000 (17:53 +0800)] 
LoongArch64 assembly pack: Fix ChaCha20 ABI breakage

The [LP64D ABI][1] requires the floating-point registers f24-f31
(aka fs0-fs7) callee-saved.  The low 64 bits of a LSX/LASX vector
register aliases with the corresponding FPR, so we must save and restore
the callee-saved FPR when we writes into the corresponding vector
register.

This ABI breakage can be easily demonstrated by injecting the use of a
saved FPR into the test in bio_enc_test.c:

    static int test_bio_enc_chacha20(int idx)
    {
        register double fs7 asm("f31") = 114.514;
        asm("#optimize barrier":"+f"(fs7));
        return do_test_bio_cipher(EVP_chacha20(), idx) && fs7 == 114.514;
    }

So fix it.  To make the logic simpler, jump into the scalar
implementation earlier when LSX and LASX are not enumerated in AT_HWCAP,
or the input is too short.

[1]: https://github.com/loongson/la-abi-specs/blob/v2.20/lapcs.adoc#floating-point-registers

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22817)

5 months agoFix declspec align syntax
Kai Pastor [Sun, 17 Dec 2023 10:27:19 +0000 (11:27 +0100)] 
Fix declspec align syntax

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23072)

5 months agoFix comment syntax
Kai Pastor [Sun, 17 Dec 2023 10:26:50 +0000 (11:26 +0100)] 
Fix comment syntax

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/23072)

5 months agoFix no-des failure in test_cms
Bernd Edlinger [Mon, 18 Dec 2023 20:38:22 +0000 (21:38 +0100)] 
Fix no-des failure in test_cms

The newly introduced test case do not work
when configured with no-des, fix that by
choosing -aes128 as cipher.

Fixes ffed597882ba ("cms: avoid intermittent test failure")

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23086)

5 months agotest_export_key_mat(): Long context support works with new fips provider only
Tomas Mraz [Mon, 11 Dec 2023 14:40:19 +0000 (15:40 +0100)] 
test_export_key_mat(): Long context support works with new fips provider only

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23007)

5 months agoopenssl-cmp.pod.in: fix grammar glitch
Dr. David von Oheimb [Fri, 15 Sep 2023 11:42:19 +0000 (13:42 +0200)] 
openssl-cmp.pod.in: fix grammar glitch

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/21281)

5 months agoCMP app: make -geninfo option accept multiple ITAVs and support string values besides...
Dr. David von Oheimb [Wed, 21 Jun 2023 11:01:09 +0000 (13:01 +0200)] 
CMP app: make -geninfo option accept multiple ITAVs and support string values besides integers

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/21281)

5 months agoCMP lib and app: add optional certProfile request message header and respective ...
Dr. David von Oheimb [Tue, 13 Jun 2023 19:56:57 +0000 (21:56 +0200)] 
CMP lib and app: add optional certProfile request message header and respective -profile option

Also add missing getter functionss OSSL_CMP_{CTX,HDR}_get0_geninfo_ITAVs() to CMP API.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/21281)

5 months agoConsolidate raising errors in SSL_CONF_cmd()
Tomas Mraz [Thu, 14 Dec 2023 17:33:57 +0000 (18:33 +0100)] 
Consolidate raising errors in SSL_CONF_cmd()

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/23048)

5 months agoTest that incorrect entry in the ssl section is not fatal
Tomas Mraz [Thu, 14 Dec 2023 15:37:58 +0000 (16:37 +0100)] 
Test that incorrect entry in the ssl section is not fatal

The following entries should be still applied.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/23048)

5 months agoAlways apply all configuration settings from the ssl section
Tomas Mraz [Thu, 14 Dec 2023 15:26:21 +0000 (16:26 +0100)] 
Always apply all configuration settings from the ssl section

Even if some configuration entry is incorrect, do not
skip the remaining ones.

Fixes #20789

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/23048)

5 months agoAdd a daily test for an alternative value for SSL3_ALIGN_PAYLOAD
Matt Caswell [Tue, 12 Dec 2023 13:47:11 +0000 (13:47 +0000)] 
Add a daily test for an alternative value for SSL3_ALIGN_PAYLOAD

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23021)

5 months agoEnsure the default length calculation includes the content type byte
Matt Caswell [Tue, 12 Dec 2023 13:17:51 +0000 (13:17 +0000)] 
Ensure the default length calculation includes the content type byte

TLSv1.3 includes an extra byte after the payload for the content type.
We should incorporate that in the calculation of the default buffer length.

Fixes #23015

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23021)

5 months agorun Windows GitHub CI workflow on self-hosted runners
Dmitry Misharov [Thu, 14 Dec 2023 12:36:04 +0000 (13:36 +0100)] 
run Windows GitHub CI workflow on self-hosted runners

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23042)

5 months agorun GitHub CI workflow on self-hosted runners
Dmitry Misharov [Thu, 14 Dec 2023 11:29:23 +0000 (12:29 +0100)] 
run GitHub CI workflow on self-hosted runners

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23042)

5 months agorun Cross Compiles workflow on self-hosted runner
Dmitry Misharov [Thu, 14 Dec 2023 10:09:15 +0000 (11:09 +0100)] 
run Cross Compiles workflow on self-hosted runner

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23042)

5 months agocms: avoid intermittent test failure
James Muir [Thu, 14 Dec 2023 19:14:37 +0000 (14:14 -0500)] 
cms: avoid intermittent test failure

If you decrypt a random input using RSAES-PKCS-v1_5, then there is a
non-negligible chance that the result will look like a valid plaintext
(that is why RSAES-PKCS-v1_5 shouldn't be used anymore).  This was the
cause of an intermittent failure in a test that did a cms-encrypt
operation targetting multiple recipients.

The failure happened during key-only decrypt.  The recipient decrypts
every RSA ciphertext -- only one is supposed to decrypt successfully,
which would reveal the right content-key.  Occassionally, more than
one decrypted successfully.

Update the test by specifying the recipient cert in the decrypt op
(this avoids looping over all RSA ciphertexts).

Add a new test to get coverage for key-only decrypt, but use RSA-OAEP
during the encrypt op.

Fixes https://github.com/openssl/project/issues/380

Testing:

  $ make TESTS='test_cms' test

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23055)

5 months agoDefine L_ENDIAN for linux64-loongarch64
Xi Ruoyao [Tue, 12 Dec 2023 19:36:48 +0000 (03:36 +0800)] 
Define L_ENDIAN for linux64-loongarch64

In commit d7c0fc5b1a7b5cb2219f8d89a861f3879582fc16 we removed L_ENDIAN
definition for guessed linux64-loongarch64 as it had caused an
inconsistency between configurations with and without explicit
specifying linux64-loongarch64.  Now add it back to the proper location.

Unlike MIPS or RISC-V, LoongArch is always little-endian [1].

By the way, change "LOONGARCH" to "LoongArch" in a comment as LOONGARCH
should only appear in the identifiers of macros, constants, etc.

[1]:https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#endian

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23064)

5 months agoBump actions/download-artifact from 3 to 4
dependabot[bot] [Mon, 18 Dec 2023 10:05:05 +0000 (10:05 +0000)] 
Bump actions/download-artifact from 3 to 4

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
CLA: trivial

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23052)