]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
13 months agoQUIC fault testing TODOs are changed into regular comments
Tomas Mraz [Mon, 17 Jul 2023 19:07:59 +0000 (21:07 +0200)] 
QUIC fault testing TODOs are changed into regular comments

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21539)

13 months agoQUIC TLS: Rethink error handling
Hugo Landau [Thu, 3 Aug 2023 10:56:12 +0000 (11:56 +0100)] 
QUIC TLS: Rethink error handling

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

13 months agoQUIC: Fix nit
Hugo Landau [Wed, 2 Aug 2023 19:35:25 +0000 (20:35 +0100)] 
QUIC: Fix nit

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

13 months agoQUIC: Move string conversion functions into a source file
Hugo Landau [Tue, 1 Aug 2023 09:02:08 +0000 (10:02 +0100)] 
QUIC: Move string conversion functions into a source file

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

13 months agoQUIC CHANNEL: Improve error reporting
Hugo Landau [Fri, 28 Jul 2023 16:48:14 +0000 (17:48 +0100)] 
QUIC CHANNEL: Improve error reporting

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

13 months agoQUIC: Test crypto stream FC limits
Hugo Landau [Tue, 25 Jul 2023 10:32:25 +0000 (11:32 +0100)] 
QUIC: Test crypto stream FC limits

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

13 months agoQUIC CONFORMANCE: Test that CRYPTO frames with bad offsets/lengths are rejected
Hugo Landau [Tue, 25 Jul 2023 10:32:25 +0000 (11:32 +0100)] 
QUIC CONFORMANCE: Test that CRYPTO frames with bad offsets/lengths are rejected

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

13 months agoQUIC WIRE: RFC 9000 s. 19.6
Hugo Landau [Tue, 25 Jul 2023 10:32:25 +0000 (11:32 +0100)] 
QUIC WIRE: RFC 9000 s. 19.6

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

13 months agoQUIC CHANNEL: Apply flow control to CRYPTO streams
Hugo Landau [Tue, 25 Jul 2023 10:32:25 +0000 (11:32 +0100)] 
QUIC CHANNEL: Apply flow control to CRYPTO streams

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

13 months agoQUIC FC: Rename stream count mode to reflect actual function
Hugo Landau [Tue, 25 Jul 2023 10:32:25 +0000 (11:32 +0100)] 
QUIC FC: Rename stream count mode to reflect actual function

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

13 months agoQUIC CHANNEL: Fix typo
Hugo Landau [Tue, 25 Jul 2023 10:32:25 +0000 (11:32 +0100)] 
QUIC CHANNEL: Fix typo

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

13 months agoQUIC QRX: Test for 1-RTT processing restriction
Hugo Landau [Tue, 25 Jul 2023 10:32:25 +0000 (11:32 +0100)] 
QUIC QRX: Test for 1-RTT processing restriction

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

13 months agoQUIC QRX: Don't process 1-RTT packets until handshake is complete
Hugo Landau [Tue, 25 Jul 2023 10:32:25 +0000 (11:32 +0100)] 
QUIC QRX: Don't process 1-RTT packets until handshake is complete

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

13 months agoQUIC QRX: Enforce PN monotonicity with key updates
Hugo Landau [Tue, 25 Jul 2023 10:32:25 +0000 (11:32 +0100)] 
QUIC QRX: Enforce PN monotonicity with key updates

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

13 months agoQUIC CHANNEL, TXP: Discard INITIAL EL correctly
Hugo Landau [Tue, 25 Jul 2023 10:32:24 +0000 (11:32 +0100)] 
QUIC CHANNEL, TXP: Discard INITIAL EL correctly

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

13 months agoQUIC: Update no-TPARAM test for correct error code
Hugo Landau [Tue, 25 Jul 2023 10:32:24 +0000 (11:32 +0100)] 
QUIC: Update no-TPARAM test for correct error code

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

13 months agoQUIC TLS: Report TLS errors properly as QUIC protocol errors
Hugo Landau [Tue, 25 Jul 2023 10:32:24 +0000 (11:32 +0100)] 
QUIC TLS: Report TLS errors properly as QUIC protocol errors

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

13 months agoQUIC CHANNEL: Send correct alert code if no TPARAMs received
Hugo Landau [Tue, 25 Jul 2023 10:32:24 +0000 (11:32 +0100)] 
QUIC CHANNEL: Send correct alert code if no TPARAMs received

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

13 months agoQUIC TXP: Allow PATH_RESPONSE to force padding
Hugo Landau [Tue, 25 Jul 2023 10:32:24 +0000 (11:32 +0100)] 
QUIC TXP: Allow PATH_RESPONSE to force padding

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

13 months agoQUIC CFQ: Unreliable transmission for PATH_RESPONSE
Hugo Landau [Tue, 25 Jul 2023 10:32:24 +0000 (11:32 +0100)] 
QUIC CFQ: Unreliable transmission for PATH_RESPONSE

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

13 months agoQUIC: Echo PATH_CHALLENGE frames as PATH_RESPONSE frames
Hugo Landau [Tue, 25 Jul 2023 10:32:24 +0000 (11:32 +0100)] 
QUIC: Echo PATH_CHALLENGE frames as PATH_RESPONSE frames

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

13 months agoAdd hurd-x86_64 support
Samuel Thibault [Sat, 6 May 2023 14:46:56 +0000 (16:46 +0200)] 
Add hurd-x86_64 support

This also upgrades flags similarly to the Linux configuration.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/20896)

13 months agoasn1: add ASN1_STRING_set() check result
atishkov [Fri, 28 Jul 2023 10:12:38 +0000 (13:12 +0300)] 
asn1: add ASN1_STRING_set() check result

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21587)

13 months agobio: pass flags on BIO_ctrl to make flush retriable
ihciah [Thu, 11 May 2023 09:30:14 +0000 (09:30 +0000)] 
bio: pass flags on BIO_ctrl to make flush retriable

Co-authored-by: suikammd <suikalala@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21298)

13 months agoAdd linux-x86-latomic target
Bernd Kuhls [Fri, 28 Jul 2023 15:11:25 +0000 (17:11 +0200)] 
Add linux-x86-latomic target

CLA: trivial

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21590)

13 months agoec: powerpc64le: Add asm implementation of felem_{square,mul}
Rohan McLure [Wed, 31 May 2023 04:32:26 +0000 (14:32 +1000)] 
ec: powerpc64le: Add asm implementation of felem_{square,mul}

Add an assembly implementation of felem_{square,mul}, which will be
implemented whenever Altivec support is present and the core implements
ISA 3.0 (Power 9) or greater.

Signed-off-by: Rohan McLure <rohanmclure@linux.ibm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21471)

13 months agoec: 56-bit Limb Solinas' Strategy for secp384r1
Rohan McLure [Wed, 12 Jul 2023 02:25:22 +0000 (12:25 +1000)] 
ec: 56-bit Limb Solinas' Strategy for secp384r1

Adopt a 56-bit redundant-limb Solinas' reduction approach for efficient
modular multiplication in P384. This has the affect of accelerating
digital signing by 446% and verification by 106%. The implementation
strategy and names of methods are the same as that provided in
ecp_nistp224 and ecp_nistp521.

As in Commit 1036749883cc ("ec: Add run time code selection for p521
field operations"), allow for run time selection of implementation for
felem_{square,mul}, where an assembly implementation is proclaimed to
be present when ECP_NISTP384_ASM is present.

Signed-off-by: Rohan McLure <rohanmclure@linux.ibm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21471)

13 months agoec: Use static linkage on nistp521 felem_{square,mul} wrappers
Rohan McLure [Fri, 23 Jun 2023 06:41:48 +0000 (16:41 +1000)] 
ec: Use static linkage on nistp521 felem_{square,mul} wrappers

Runtime selection of implementations for felem_{square,mul} depends on
felem_{square,mul}_wrapper functions, which overwrite function points in
a similar design to that of .plt.got sections used by program loaders
during dynamic linking.

There's no reason why these functions need to have external linkage.
Mark static.

Signed-off-by: Rohan McLure <rohanmclure@linux.ibm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21471)

13 months agoendecode_test.c: Add tests for decoding with 0 selection
Tomas Mraz [Fri, 21 Jul 2023 15:45:32 +0000 (17:45 +0200)] 
endecode_test.c: Add tests for decoding with 0 selection

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21519)

13 months agoWhen exporting/importing decoded keys do not use 0 as selection
Tomas Mraz [Fri, 21 Jul 2023 15:40:31 +0000 (17:40 +0200)] 
When exporting/importing decoded keys do not use 0 as selection

When decoding 0 as the selection means to decode anything
you get.

However when exporting and then importing the key data 0 as
selection is not meaningful.
So we set it to OSSL_KEYMGMT_SELECT_ALL to make the export/import
function export/import everything that we have decoded.

Fixes #21493

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21519)

13 months agoAvoid exporting bogus (empty) data if empty selection is used
Tomas Mraz [Fri, 21 Jul 2023 14:26:12 +0000 (16:26 +0200)] 
Avoid exporting bogus (empty) data if empty selection is used

This is already correct in the rsa_kmgmt.c but other
implementations are wrong.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21519)

13 months agono_autoload: make the no-autoload-config option work again.
Pauli [Wed, 2 Aug 2023 00:44:47 +0000 (10:44 +1000)] 
no_autoload: make the no-autoload-config option work again.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/21621)

13 months agotest: skip FIPS config auto loading based tests if feature is disabled
Pauli [Wed, 2 Aug 2023 01:36:46 +0000 (11:36 +1000)] 
test: skip FIPS config auto loading based tests if feature is disabled

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/21621)

13 months agoprovider test: don't run configuration based tests if configuration isn't loaded
Pauli [Wed, 2 Aug 2023 00:44:37 +0000 (10:44 +1000)] 
provider test: don't run configuration based tests if configuration isn't loaded

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/21621)

13 months agoPBE test: load providers if auto config load is turned off
Pauli [Wed, 2 Aug 2023 00:41:22 +0000 (10:41 +1000)] 
PBE test: load providers if auto config load is turned off

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/21621)

13 months agotestutil: allow a failure return from setup_tests that doesn't print help
Pauli [Wed, 2 Aug 2023 00:40:23 +0000 (10:40 +1000)] 
testutil: allow a failure return from setup_tests that doesn't print help

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/21621)

13 months agoquic: using #defined constant rather than a magic number
Pauli [Tue, 25 Jul 2023 02:06:45 +0000 (12:06 +1000)] 
quic: using #defined constant rather than a magic number

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)

13 months agoquic compliance: 10.2.3 dropping instead of closing
Pauli [Thu, 20 Jul 2023 02:40:49 +0000 (12:40 +1000)] 
quic compliance: 10.2.3 dropping instead of closing

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)

13 months agoFix type/legacy name
Pauli [Wed, 19 Jul 2023 07:00:04 +0000 (17:00 +1000)] 
Fix type/legacy name

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)

13 months agoquic conformance: add comment about section 10.2.3 conformance
Pauli [Wed, 19 Jul 2023 04:47:13 +0000 (14:47 +1000)] 
quic conformance: add comment about section 10.2.3 conformance

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)

13 months agotrivial code nit
Pauli [Tue, 18 Jul 2023 03:03:30 +0000 (13:03 +1000)] 
trivial code nit

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)

13 months agoquic conformance: 10.2.1 rate limiting
Pauli [Tue, 18 Jul 2023 01:37:14 +0000 (11:37 +1000)] 
quic conformance: 10.2.1 rate limiting

Implement the two requirements about limiting closing transmission size to
no more than thrice the received size.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)

13 months agoquic conformance: section 10.2.2 requirements
Pauli [Mon, 17 Jul 2023 01:32:58 +0000 (11:32 +1000)] 
quic conformance: section 10.2.2 requirements

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)

13 months agoquic conformance: section 10.2.1 requirements
Pauli [Mon, 17 Jul 2023 01:11:58 +0000 (11:11 +1000)] 
quic conformance: section 10.2.1 requirements

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)

13 months agoquic: use the safe fused multiply divide instead of a safe multiply then a normal...
Pauli [Mon, 17 Jul 2023 01:06:35 +0000 (11:06 +1000)] 
quic: use the safe fused multiply divide instead of a safe multiply then a normal division

This should extend the range of possible results.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)

13 months agoAdd note about RFC 9000 10.2 persist time
Pauli [Thu, 13 Jul 2023 04:26:26 +0000 (14:26 +1000)] 
Add note about RFC 9000 10.2 persist time

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)

13 months agodocument RRFC9000 10.1 MUST requirement
Pauli [Mon, 26 Jun 2023 09:31:20 +0000 (19:31 +1000)] 
document RRFC9000 10.1 MUST requirement

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)

13 months agoNote RFC 9000 19.19 requirement
Pauli [Thu, 13 Jul 2023 03:43:46 +0000 (13:43 +1000)] 
Note RFC 9000 19.19 requirement

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)

13 months agoResolves some magic values that has a hello_retry_request enum type.
Frederik Wedel-Heinen [Wed, 2 Aug 2023 12:49:17 +0000 (14:49 +0200)] 
Resolves some magic values that has a hello_retry_request enum type.

CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21636)

13 months agoQUIC: Fix incompatible merges causing CI breakage
Hugo Landau [Thu, 3 Aug 2023 08:17:36 +0000 (09:17 +0100)] 
QUIC: Fix incompatible merges causing CI breakage

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/21641)

13 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: Paul Dale <pauli@openssl.org>
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/21579)

13 months agoformatting: shift one space to right
Wo'O Ideafarm [Tue, 1 Aug 2023 17:47:16 +0000 (10:47 -0700)] 
formatting: shift one space to right

per request.

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

13 months agotrivial change: optionally suppress include lines
Wo'O Ideafarm [Fri, 28 Jul 2023 18:45:31 +0000 (11:45 -0700)] 
trivial change: optionally suppress include lines

CLA: trivial

Code that includes applink.c can now define APPLINK_NO_INCLUDES to suppress the include preprocessor lines in that file.  This might be needed if, for example, applink.c is being included into a source file that will be compiled to reference a C library built using different calling conventions.  (Example: Open Watcom.)

This pull request is intended to replace an identical pull request that I screwed up.

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

13 months agoFix typo in function name
Tianjia Zhang [Tue, 1 Aug 2023 06:21:02 +0000 (14:21 +0800)] 
Fix typo in function name

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21608)

13 months agoAdd support into qtest_shutdown for blocking mode
Matt Caswell [Tue, 1 Aug 2023 11:22:58 +0000 (12:22 +0100)] 
Add support into qtest_shutdown for blocking mode

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

13 months agoExtend the test_quic_write_read() test to include resumption
Matt Caswell [Fri, 28 Jul 2023 14:32:57 +0000 (15:32 +0100)] 
Extend the test_quic_write_read() test to include resumption

We add an additional loop around test_quic_write_read() to repeat the
test but using a session obtained from the initial iteration to confirm
that we can successfully resume the session.

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

13 months agoEnsure the QUIC TLS SSL object is marked as shutdown
Matt Caswell [Fri, 28 Jul 2023 15:04:14 +0000 (16:04 +0100)] 
Ensure the QUIC TLS SSL object is marked as shutdown

If we shutdown the QUIC connection then we should mark the underlying
TLS SSL object as shutdown as well. Otherwise any sessions are considered
unusable for resumption.

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

13 months agoAdd the ability for tserver to use a pre-existing SSL_CTX
Matt Caswell [Fri, 28 Jul 2023 08:22:38 +0000 (09:22 +0100)] 
Add the ability for tserver to use a pre-existing SSL_CTX

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

13 months agoKeep doing ossl_quic_tls_tick() even after handshake completion
Matt Caswell [Thu, 27 Jul 2023 12:48:02 +0000 (13:48 +0100)] 
Keep doing ossl_quic_tls_tick() even after handshake completion

There may be post-handshake messages to process so make sure we keep
ticking things even if the handshake has finished. We do this simply by
calling SSL_read(). There should never be app data to read but we will
process any handshake records we encounter.

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

13 months agoCorrectly keep track of where we are in the quicserver request buffer
Matt Caswell [Thu, 27 Jul 2023 14:33:04 +0000 (15:33 +0100)] 
Correctly keep track of where we are in the quicserver request buffer

If the request comes in in multiple chunks properly keep tract of where
we are.

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

13 months agoEnsure SSL_has_pending() always works even before a connection
Matt Caswell [Thu, 27 Jul 2023 14:30:17 +0000 (15:30 +0100)] 
Ensure SSL_has_pending() always works even before a connection

s_client calls SSL_has_pending() even before the connection has been
established. We expect it to return 0 in this case and not put any errors
on the stack.

We change things so that SSL_has_pending() always returns 0 if there is
no stream available.

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

13 months agoStill advance handshake even on an empty write
Matt Caswell [Thu, 27 Jul 2023 13:27:17 +0000 (14:27 +0100)] 
Still advance handshake even on an empty write

A call to SSL_write() with a zero length buffer should still advance the
handshake. Applications (including s_client) may rely on this.

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

13 months agoAdd a QUIC test for back pressure
Matt Caswell [Wed, 5 Jul 2023 14:10:17 +0000 (15:10 +0100)] 
Add a QUIC test for back pressure

Check that if one endpoint is sending data faster than its peer can handle
then we eventually see back pressure.

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

13 months agoAdd a test for PEM_read_bio_Parameters()
Matt Caswell [Mon, 31 Jul 2023 11:56:47 +0000 (12:56 +0100)] 
Add a test for PEM_read_bio_Parameters()

We must not ask for a password when attempting to read parameters.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21603)

13 months agoThe PEM_read_bio_Parameters() function should not ask for a password
Matt Caswell [Mon, 31 Jul 2023 11:32:16 +0000 (12:32 +0100)] 
The PEM_read_bio_Parameters() function should not ask for a password

The PEM_read_bio_Parameters[_ex] function does not have the capability
of specifying a password callback. We should not use the fallback password
callback in this case because it will attempt to send a prompt for the
password which might not be the correct thing to do. We should just not
use a password in that case.

Fixes #21588

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21603)

13 months agoAlways add a suitable error if we fail to decode
Matt Caswell [Mon, 31 Jul 2023 11:30:34 +0000 (12:30 +0100)] 
Always add a suitable error if we fail to decode

We're always supposed to add the fallback "unsupported" error if we don't
have anything better. However in some cases this wasn't happening because
we were incorrectly setting "flag_construct_called" - even though the
construct function had failed.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21603)

13 months agoDon't add the msblob/pvk decoders if they're not suitable
Matt Caswell [Mon, 31 Jul 2023 11:28:37 +0000 (12:28 +0100)] 
Don't add the msblob/pvk decoders if they're not suitable

msblob only decodes public/private keys (not just params).
pvk only decodes private keys.

If the requested selection doesn't intersect with the above then don't
consider those decoders.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21603)

13 months agoFixed incorrect usage of vshuf.b instruction
zhuchen [Mon, 24 Jul 2023 08:03:29 +0000 (16:03 +0800)] 
Fixed incorrect usage of vshuf.b instruction

In the definition of the latest revised LoongArch64 vector instruction manual,
it is clearly pointed out that the undefined upper three bits of each byte in
the control register of the vshuf.b instruction should not be used, otherwise
uncertain results may be obtained. Therefore, it is necessary to correct the
use of the vshuf.b instruction in the existing vpaes-loongarch64.pl code to
avoid erroneous calculation results in future LoongArch64 processors.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21530)

13 months agoAdd system guessing for linux64-loongarch64 target
Xi Ruoyao [Thu, 20 Jul 2023 23:59:07 +0000 (07:59 +0800)] 
Add system guessing for linux64-loongarch64 target

Now the default is linux-generic32, it's not good for loongarch64.

We can also test if the assembler supports vector instructions here and
disable asm if not.

Closes #21340.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21510)

13 months agospeed: Unify output messages regarding number of ops per time
Ingo Franzki [Wed, 19 Jul 2023 08:49:44 +0000 (10:49 +0200)] 
speed: Unify output messages regarding number of ops per time

Always report "<algo> ops in <time>", instead of "<algo>'s in <time>" or
similar. Avoid the use of apostrophes and/or plural with algorithm names.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21383)

13 months agospeed: Also measure RSA encrypt/decrypt, not only RSA sign/verify
Ingo Franzki [Tue, 20 Jun 2023 11:40:41 +0000 (13:40 +0200)] 
speed: Also measure RSA encrypt/decrypt, not only RSA sign/verify

While RSA encrypt/decrypt and sign/verify are basically the same mod-expo
operations, the speed of the operation may still differ, due to different
padding, as well as the use of implicit rejection for RSA decrypt.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21383)

13 months agoFix a regression in X509_VERIFY_PARAM_add0_policy()
Matt Caswell [Thu, 27 Jul 2023 11:09:47 +0000 (12:09 +0100)] 
Fix a regression in X509_VERIFY_PARAM_add0_policy()

Also fixes a similar regression in X509_VERIFY_PARAM_add0_table().

Commit 38ebfc3 introduced a regression in 3.0.6 that changed the return
value of the two functions above from 1 on success to the number of entries
in the stack. If there are more than one entry then this is a change in
behaviour which should not have been introduced into a stable release.

This reverts the behaviour back to what it was prior to the change. The code
is slightly different to the original code in that we also handle a possible
-1 return value from the stack push function. This should never happen in
reality because we never pass a NULL stack as a parameter - but for the sake
of robustness we handle it anyway.

Note that the changed behaviour exists in all versions of 3.1 (it never had
the original version). But 3.1 should be fully backwards compatible with 3.0
so we should change it there too.

Fixes #21570

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/21576)

13 months agoQUIC: Automatically drain non-concluded streams, bugfixes
Hugo Landau [Mon, 24 Jul 2023 17:11:23 +0000 (18:11 +0100)] 
QUIC: Automatically drain non-concluded streams, bugfixes

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

13 months agoQUIC APL: Mask API operations when in shutdown flush
Hugo Landau [Tue, 18 Jul 2023 15:39:32 +0000 (16:39 +0100)] 
QUIC APL: Mask API operations when in shutdown flush

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

13 months agoQUIC MULTISTREAM TEST: Shutdown flush test
Hugo Landau [Tue, 18 Jul 2023 15:18:33 +0000 (16:18 +0100)] 
QUIC MULTISTREAM TEST: Shutdown flush test

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

13 months agoQUIC MULTISTREAM TEST: Better failure logging with failing script ID
Hugo Landau [Tue, 18 Jul 2023 15:17:55 +0000 (16:17 +0100)] 
QUIC MULTISTREAM TEST: Better failure logging with failing script ID

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

13 months agoQUIC APL: Shutdown Stream Flush Functionality
Hugo Landau [Tue, 18 Jul 2023 15:15:49 +0000 (16:15 +0100)] 
QUIC APL: Shutdown Stream Flush Functionality

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

13 months agoQUIC TXP: Fix bug relating to STREAM FIN generation
Hugo Landau [Tue, 18 Jul 2023 15:15:15 +0000 (16:15 +0100)] 
QUIC TXP: Fix bug relating to STREAM FIN generation

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

13 months agoQUIC APL: Ensure tick inhibition is not used during blocking
Hugo Landau [Tue, 18 Jul 2023 15:14:54 +0000 (16:14 +0100)] 
QUIC APL: Ensure tick inhibition is not used during blocking

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

13 months agoQUIC TSERVER: Allow reading from a stream after connection termination
Hugo Landau [Tue, 18 Jul 2023 15:14:05 +0000 (16:14 +0100)] 
QUIC TSERVER: Allow reading from a stream after connection termination

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

13 months agoQUIC QSM: Infrastructure for tracking shutdown flush eligible streams
Hugo Landau [Tue, 18 Jul 2023 15:13:25 +0000 (16:13 +0100)] 
QUIC QSM: Infrastructure for tracking shutdown flush eligible streams

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

13 months agoQUIC APL: Add internal call to allow changing send buffer size
Hugo Landau [Tue, 18 Jul 2023 15:12:44 +0000 (16:12 +0100)] 
QUIC APL: Add internal call to allow changing send buffer size

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

13 months agoQUIC CHANNEL: Allow ticking to be inhibited for testing purposes
Hugo Landau [Tue, 18 Jul 2023 15:12:04 +0000 (16:12 +0100)] 
QUIC CHANNEL: Allow ticking to be inhibited for testing purposes

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

13 months agoUpdate GOST engine commit to deal with test failure
Dmitry Belyavskiy [Fri, 28 Jul 2023 09:56:17 +0000 (11:56 +0200)] 
Update GOST engine commit to deal with test failure

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21586)

14 months agoRemoves unused parameter 'sending' from derive_secret_key_and_iv()
Frederik Wedel-Heinen [Thu, 27 Jul 2023 09:28:33 +0000 (11:28 +0200)] 
Removes unused parameter 'sending' from derive_secret_key_and_iv()

Fixes #21569

CLA: trivial

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21569)

14 months agovpaes: LoongArch: Use getauxval(AT_HWCAP) for LSX detection
Xi Ruoyao [Fri, 21 Jul 2023 02:07:04 +0000 (02:07 +0000)] 
vpaes: LoongArch: Use getauxval(AT_HWCAP) for LSX detection

Running LSX instructions requires both the hardware support and the
kernel support.  The `cpucfg` instruction only tests the hardware
support, causing a SIGILL if the hardware supports LSX but the kernel
does not.

Use `getauxval(AT_HWCAP)` as the ["Software Development and Build
Convention for LoongArch Architectures"][1] manual suggests.

The LOONGARCH_HWCAP_LSX and LOONGARCH_HWCAP_LASX bits are copied from
the manual too.  In Glibc 2.38 they'll be provided by <sys/auxv.h> as
well, but they are unavailable in earlier Glibc versions so we cannot
rely on it.

The getauxval syscall and Glibc wrapper are available since day one
(Linux-5.19 and Glibc-2.36) for LoongArch.

Fixes #21508.

[1]:https://github.com/loongson/la-softdev-convention/blob/master/la-softdev-convention.adoc#kernel-constraints

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

14 months agofix compile error (SIZE_MAX not found) on HP-UX
John Kohl [Wed, 26 Jul 2023 12:41:31 +0000 (08:41 -0400)] 
fix compile error (SIZE_MAX not found) on HP-UX

Fixes #21554

CLA: trivial

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21562)

14 months agox509/by_file.c: fix unreachable and redundant code
atishkov [Tue, 25 Jul 2023 09:25:57 +0000 (12:25 +0300)] 
x509/by_file.c: fix unreachable and redundant code

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21545)

14 months agoCorrect spelling of database
Fatih Arslan Tugay [Mon, 24 Jul 2023 12:34:08 +0000 (15:34 +0300)] 
Correct spelling of database

Apply normal sentence case to db update message

CLA: trivial

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21535)

14 months agoInclude <openssl/err.h> in include/refcount.h
John Kohl [Wed, 26 Jul 2023 12:16:54 +0000 (08:16 -0400)] 
Include <openssl/err.h> in include/refcount.h

Fixes #21555

CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21561)

14 months agoAdd CHANGES.md and NEWS.md entries for CVE-2023-3817
Tomas Mraz [Tue, 25 Jul 2023 13:35:34 +0000 (15:35 +0200)] 
Add CHANGES.md and NEWS.md entries for CVE-2023-3817

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21550)

14 months agodhtest.c: Add test of DH_check() with q = p + 1
Tomas Mraz [Tue, 25 Jul 2023 13:23:43 +0000 (15:23 +0200)] 
dhtest.c: Add test of DH_check() with q = p + 1

This must fail with DH_CHECK_INVALID_Q_VALUE and
with DH_CHECK_Q_NOT_PRIME unset.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21550)

14 months agoDH_check(): Do not try checking q properties if it is obviously invalid
Tomas Mraz [Tue, 25 Jul 2023 13:22:48 +0000 (15:22 +0200)] 
DH_check(): Do not try checking q properties if it is obviously invalid

If  |q| >= |p| then the q value is obviously wrong as q
is supposed to be a prime divisor of p-1.

We check if p is overly large so this added test implies that
q is not large either when performing subsequent tests using that
q value.

Otherwise if it is too large these additional checks of the q value
such as the primality test can then trigger DoS by doing overly long
computations.

Fixes CVE-2023-3817

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21550)

14 months agoMake DH_check set some error bits in recently added error
Bernd Edlinger [Sun, 23 Jul 2023 12:27:54 +0000 (14:27 +0200)] 
Make DH_check set some error bits in recently added error

The pre-existing error cases where DH_check returned zero
are not related to the dh params in any way, but are only
triggered by out-of-memory errors, therefore having *ret
set to zero feels right, but since the new error case is
triggered by too large p values that is something different.
On the other hand some callers of this function might not
be prepared to handle the return value correctly but only
rely on *ret. Therefore we set some error bits in *ret as
additional safety measure.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21524)

14 months agoget_cert_by_subject_ex(): Check result of X509_STORE_lock()
atishkov [Fri, 21 Jul 2023 08:36:37 +0000 (11:36 +0300)] 
get_cert_by_subject_ex(): Check result of X509_STORE_lock()

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

14 months agobio_print.c: Delete unreachable code at lines 710 and 711
MrRurikov [Thu, 29 Jun 2023 14:06:08 +0000 (17:06 +0300)] 
bio_print.c: Delete unreachable code at lines 710 and 711

CLA: trivial

The purpose of adding the conditional operator on line 710 is to check
if the value of the variable 'fplace' exceeds the size of the array
'fconvert', and to reduce the value of 'fplace' by 1, so that later on
we can set the value to zero of the array element with the index 'fplace'
and not make any calls beyond the array edges.

However, the condition on line 710 will always be false, because
the size of 'fconvert' is strictly specified at the beginning of
the 'fmtfp()' function (line 571), so it is reasonable to remove
this conditional operator, as well as the unreachable decrementation
code of the variable 'fplace'.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21325)

14 months agoAdds separate configuration targets for intel i386/x86_64 and arm64 ios simulators
Frederik Wedel-Heinen [Wed, 28 Jun 2023 12:40:05 +0000 (14:40 +0200)] 
Adds separate configuration targets for intel i386/x86_64 and arm64 ios simulators

Fixes #21287

CLA: trivial

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21309)

14 months agox509: add ASN1_STRING_set() check result
atishkov [Thu, 20 Jul 2023 08:02:38 +0000 (11:02 +0300)] 
x509: add ASN1_STRING_set() check result

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21497)

14 months agoQUIC TXP: Add extra test
Hugo Landau [Fri, 21 Jul 2023 06:57:51 +0000 (07:57 +0100)] 
QUIC TXP: Add extra test

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21513)

14 months agoFix error handling in pipelining test
Bernd Edlinger [Fri, 21 Jul 2023 05:34:39 +0000 (07:34 +0200)] 
Fix error handling in pipelining test

When an early error happens in the test_pipelining
function and idx == 5 the error handling would try
to call OPENSSL_free(msg), but msg is at that time
just a string constant in read-only memory, so a
crash would be the result. Fixed that by using
fragsize as an indication when to free msg.

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