]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
8 months ago[design] Make it possible to use explicitly fetched signature implementation
Richard Levitte [Mon, 18 Sep 2023 07:30:13 +0000 (09:30 +0200)] 
[design] Make it possible to use explicitly fetched signature implementation

This design is to allow the use of explicitly fetched EVP_SIGNATURE
implementations.

Ref: openssl/project#171

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

8 months ago[design] Make it possible to pass AlgorithmIdentifier parameter data
Richard Levitte [Thu, 21 Sep 2023 12:39:30 +0000 (14:39 +0200)] 
[design] Make it possible to pass AlgorithmIdentifier parameter data

This design is to allow passing AlgorithmIdentifier parameter data to and
from any cryptograpfic operation, with convenience functions for them all,
not just for symmetric ciphers.

This is crucial to support CMS, among others.

Ref: openssl/project#172

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

8 months agoossl_property_list_to_string: handle quoted strings
Pauli [Sun, 24 Sep 2023 23:34:07 +0000 (09:34 +1000)] 
ossl_property_list_to_string: handle quoted strings

ossl_property_list_to_string() didn't quote strings correctly which
could result in a generated property string being unparsable.

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

8 months agoBump suisei-cn/actions-download-file from 1.3.0 to 1.4.0
dependabot[bot] [Wed, 4 Oct 2023 17:03:39 +0000 (17:03 +0000)] 
Bump suisei-cn/actions-download-file from 1.3.0 to 1.4.0

Bumps [suisei-cn/actions-download-file](https://github.com/suisei-cn/actions-download-file) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/suisei-cn/actions-download-file/releases)
- [Commits](https://github.com/suisei-cn/actions-download-file/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: suisei-cn/actions-download-file
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

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

8 months agod2i_PKCS8PrivateKey_bio.pod: evp.h include is unnecessary
Tomas Mraz [Wed, 4 Oct 2023 10:30:22 +0000 (12:30 +0200)] 
d2i_PKCS8PrivateKey_bio.pod: evp.h include is unnecessary

It is also not allowed by doc nits check to have
multiple includes.

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

8 months agoAdded info on change to HISTORY of SSL_CTX_set_msg_callback()
Frederik Wedel-Heinen [Mon, 2 Oct 2023 13:53:28 +0000 (15:53 +0200)] 
Added info on change to HISTORY of SSL_CTX_set_msg_callback()

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

8 months agoUpdate documentation on SSL_CTX_set_msg_callback() to match the actual functionality.
Frederik Wedel-Heinen [Mon, 2 Oct 2023 11:08:56 +0000 (13:08 +0200)] 
Update documentation on SSL_CTX_set_msg_callback() to match the actual functionality.

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

8 months agoPrint record version for DTLSv1_listen()
Frederik Wedel-Heinen [Mon, 2 Oct 2023 10:00:58 +0000 (12:00 +0200)] 
Print record version for DTLSv1_listen()

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

8 months agoPass the dtls record version to the record layer msg_callback function.
Frederik Wedel-Heinen [Mon, 2 Oct 2023 09:11:29 +0000 (11:11 +0200)] 
Pass the dtls record version to the record layer msg_callback function.

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

8 months agoDon't (re-)initialize the FFC_PARAMs in dh_init and dsa_init
Matthias St. Pierre [Mon, 2 Oct 2023 10:10:01 +0000 (12:10 +0200)] 
Don't (re-)initialize the FFC_PARAMs in dh_init and dsa_init

The initialization was introduced in commit dc8de3e6f1ee and
changes the behaviour of the `init` method for DSA and DH
between 1.1.1 and 3.0, while the behaviour for RSA and EC_KEY
remains unchanged.

The initialization is not necessary in 3.x and master imho and
breaks the use-case of intercepting the methods of an existing
key.

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

8 months agotest: evp_extra: test signing with legacy app method based keys
Matthias St. Pierre [Sat, 23 Sep 2023 23:13:20 +0000 (01:13 +0200)] 
test: evp_extra: test signing with legacy app method based keys

This commit adds `test_EVP_PKEY_sign_with_app_method`, a regression
test for the bug fix in commit 1acc3e8cc3c6 (pull request #22163).

It is analogous to `test_EVP_PKEY_sign`, only with a fake app method
based key. (The EC key test case was omitted, because there is no
`EC_KEY_METHOD_dup` method.)

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

8 months agotest: evp_extra: fix indentation error
Matthias St. Pierre [Sat, 23 Sep 2023 23:24:59 +0000 (01:24 +0200)] 
test: evp_extra: fix indentation error

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

8 months agoCorrect documentation for PKCS5_PBKDF2_HMAC
Sumitra Sharma [Tue, 3 Oct 2023 03:58:44 +0000 (09:28 +0530)] 
Correct documentation for PKCS5_PBKDF2_HMAC

In OpenSSL 3.x, the documentation for PKCS5_PBKDF2_HMAC incorrectly states
that an iter value less than 1 is treated as a single iteration. Upon further
investigation in providers/implementations/kdfs/pbkdf2.c, it appears that
invalid iter values will result in failure and raise the
PROV_R_INVALID_ITERATION_COUNT error. This commit corrects the documentation
to accurately reflect the behavior in OpenSSL 3.x.

Closes openssl#22168

Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22252)

8 months agoRestore the meaning of EVP_PKEY_print_private()
Richard Levitte [Mon, 2 Oct 2023 07:12:12 +0000 (09:12 +0200)] 
Restore the meaning of EVP_PKEY_print_private()

With pre-3.0 OpenSSL, EVP_PKEY_print_private() calls the EVP_PKEY_ASN1_METHOD
function "priv_print", effectively asking the backend to print whatever it
regards as private key components.

In all backends that were built into libcrypto, this function printed what
was included in the private key structure, which usually includes the
public key components as well.

With OpenSSL 3.0, some of the corresponding key2text encoders got a
slightly different behavior, where the presence of the selector
OSSL_KEYMGMT_SELECT_PRIVATE_KEY without the presence of the selector
OSSL_KEYMGMT_SELECT_PUBLIC_KEY would only get what would intuitively be
regarded as private key components printed.  This isn't entirely consistent,
though, as the RSA key2text encoder will still print the public key
components regardless.

To compensate for the changed backend behavior, EVP_PKEY_print_private()
was made to ask the encoder to print the keypair rather than just the
private key, thereby moving the backend semantics to the application API.
Unfortunately, this causes confusion for providers where the key2text
encoder really should print the private key only.

This change restores the built-in 1.1.1 backend behavior in the encoders
that OpenSSL provides, and renders EVP_PKEY_print_private() more true to its
documented behavior, leaving it to the backend to decide what it regards as
"private key components".

Fixes #22233

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

8 months agoImproved detection of engine-provided private "classic" keys
Dmitry Belyavskiy [Mon, 26 Dec 2022 19:38:44 +0000 (20:38 +0100)] 
Improved detection of engine-provided private "classic" keys

Resolves #17092 (?)
Resolves #17286 (?)

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

8 months agoRemove duplicates of EVP_aes_xxx_wrap() from EVP_aes_128_gcm.pod
Frederik Wedel-Heinen [Mon, 2 Oct 2023 08:58:48 +0000 (10:58 +0200)] 
Remove duplicates of EVP_aes_xxx_wrap() from EVP_aes_128_gcm.pod

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

8 months agoCall post_process_record for dtls records
Frederik Wedel-Heinen [Mon, 2 Oct 2023 07:58:30 +0000 (09:58 +0200)] 
Call post_process_record for dtls records

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

8 months agodoc/man3: fix misnamed function name
Matthias St. Pierre [Tue, 26 Sep 2023 16:25:27 +0000 (18:25 +0200)] 
doc/man3: fix misnamed function name

Rename `DSA_generate_prime[_ex]` to `DSA_generate_parameters[_ex]`,
fixing a copy&paste error from the `BN_generate_prime[_ex]` paragraph
in commit b3696a55a5ed.

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

8 months agoBack off on generating noise in the event of a PING frame
Matt Caswell [Mon, 2 Oct 2023 10:47:08 +0000 (11:47 +0100)] 
Back off on generating noise in the event of a PING frame

If either endpoint issues a PING frame while we are introducing noise
into the communication then there is a danger that the connection itself
will fail. We detect the PING and then back off on generating noise for a
short while. It should be sufficient to just ensure that the next datagram
does not get dropped for each endpoint.

Fixes #22199

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

8 months agoCHANGES.md: Mention new features added after 3.2 alpha1
Tomas Mraz [Mon, 2 Oct 2023 15:07:52 +0000 (17:07 +0200)] 
CHANGES.md: Mention new features added after 3.2 alpha1

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

8 months agoAdd openssl/pem.h inclusion for d2i_PKCS8PrivateKey
Sumitra Sharma [Mon, 2 Oct 2023 15:23:52 +0000 (20:53 +0530)] 
Add openssl/pem.h inclusion for d2i_PKCS8PrivateKey

Include the necessary header file openssl/pem.h in the
documentation to ensure that all functions related to
d2i_PKCS8PrivateKey are correctly defined.

Closes openssl#22188

Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22253)

8 months agoOccupy the rec_version field of a decoded dtls record
Frederik Wedel-Heinen [Mon, 2 Oct 2023 07:49:34 +0000 (09:49 +0200)] 
Occupy the rec_version field of a decoded dtls record

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

8 months agomacros.h: There are just 3.1 deprecations, no 3.2 deprecations
Tomas Mraz [Mon, 2 Oct 2023 13:49:42 +0000 (15:49 +0200)] 
macros.h: There are just 3.1 deprecations, no 3.2 deprecations

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22247)

8 months agoAll lh_stats functions were deprecated in 3.1
Tomas Mraz [Mon, 2 Oct 2023 13:38:12 +0000 (15:38 +0200)] 
All lh_stats functions were deprecated in 3.1

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22247)

8 months agoquicapitest: Enable test_ssl_trace with enable-zlib
Tomas Mraz [Fri, 29 Sep 2023 12:55:05 +0000 (14:55 +0200)] 
quicapitest: Enable test_ssl_trace with enable-zlib

To improve Coverage mapping in Coveralls make it
possible to run test_ssl_trace() with enable-zlib

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

8 months agocoveralls: Drop no-shared and -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
Tomas Mraz [Fri, 29 Sep 2023 10:09:10 +0000 (12:09 +0200)] 
coveralls: Drop no-shared and -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION

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

8 months agoGH action workflows: Add cpu report before 'make test'
Dmitry Misharov [Thu, 28 Sep 2023 08:50:55 +0000 (11:50 +0300)] 
GH action workflows: Add cpu report before 'make test'

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

8 months agocoveralls: Fix invocation of lcov
Tomas Mraz [Tue, 3 Oct 2023 06:39:31 +0000 (08:39 +0200)] 
coveralls: Fix invocation of lcov

Fixes recent regression from commit febe8cf4dee9939ee3e5523b6f14d9dc1ec74153

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

8 months agoBump actions/setup-python from 4.7.0 to 4.7.1
dependabot[bot] [Mon, 2 Oct 2023 17:23:41 +0000 (17:23 +0000)] 
Bump actions/setup-python from 4.7.0 to 4.7.1

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

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

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

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

8 months agoFix timeouts in the quic_multistream test script 13
Matt Caswell [Thu, 28 Sep 2023 12:59:45 +0000 (13:59 +0100)] 
Fix timeouts in the quic_multistream test script 13

Script 13 is a stress test which can timeout on some low powered platforms
or with some options that significantly slow performance.

We increase the timeout.

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

8 months agoremove files under test directory from coverage report
Dmitry Misharov [Thu, 28 Sep 2023 11:21:37 +0000 (14:21 +0300)] 
remove files under test directory from coverage report

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22212)

8 months agodoc: correct the SSL_CTX_set_info_callback(3) manual page
Matthias St. Pierre [Fri, 29 Sep 2023 13:31:37 +0000 (15:31 +0200)] 
doc: correct the SSL_CTX_set_info_callback(3) manual page

The info callback is not prototyped correctly, and the code
example fails to compile because of const-incorrectness.

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

8 months agoImprove performance for 6x unrolling with vpermxor instruction
Danny Tsen [Tue, 22 Aug 2023 19:58:53 +0000 (15:58 -0400)] 
Improve performance for 6x unrolling with vpermxor instruction

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

8 months agotest: add verify test for EC cert signed with SHA3
Mathieu Tortuyaux [Fri, 22 Sep 2023 20:09:33 +0000 (22:09 +0200)] 
test: add verify test for EC cert signed with SHA3

Signed-off-by: Mathieu Tortuyaux <mathieu.tortuyaux@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22147)

8 months agoobj_xref.h: make update
Mathieu Tortuyaux [Tue, 19 Sep 2023 15:24:43 +0000 (17:24 +0200)] 
obj_xref.h: make update

Signed-off-by: Mathieu Tortuyaux <mathieu.tortuyaux@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22147)

8 months agoobj_xref: ecdsa support sha3 hash function
Mathieu Tortuyaux [Tue, 19 Sep 2023 15:23:23 +0000 (17:23 +0200)] 
obj_xref: ecdsa support sha3 hash function

Signed-off-by: Mathieu Tortuyaux <mathieu.tortuyaux@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22147)

8 months agoConfigurations/unix-Makefile.tmpl: Ensure that md-nits always works
Richard Levitte [Mon, 2 Oct 2023 08:24:38 +0000 (10:24 +0200)] 
Configurations/unix-Makefile.tmpl: Ensure that md-nits always works

The body of the "md-nits" Makefile target assumed an in source build tree.
This change ensures that it works correctly when called from an out-of-source
build tree as well.

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

8 months ago[DOCS] Fix table inconsistencies detected by mdl
Richard Levitte [Mon, 2 Oct 2023 08:22:24 +0000 (10:22 +0200)] 
[DOCS] Fix table inconsistencies detected by mdl

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

8 months agoAvoid having ecp_sm2p256-armv8.pl in fips.module.sources
Tomas Mraz [Tue, 26 Sep 2023 12:56:02 +0000 (14:56 +0200)] 
Avoid having ecp_sm2p256-armv8.pl in fips.module.sources

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

8 months agoCoverity 1545175: use after free
Pauli [Thu, 28 Sep 2023 01:47:35 +0000 (11:47 +1000)] 
Coverity 1545175: use after free

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

8 months agoCoverity 1545174: calling risky function
Pauli [Thu, 28 Sep 2023 01:45:01 +0000 (11:45 +1000)] 
Coverity 1545174: calling risky function

Remove the call to rand() and replace with an xor-shift RNG.
There are no security implications to worry about here.  This RNG is
used during testing only.

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

8 months agoCoverity 1545176: dereference before NULL check
Pauli [Thu, 28 Sep 2023 01:34:48 +0000 (11:34 +1000)] 
Coverity 1545176: dereference before NULL check

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

8 months agoOptimize out unneeded up_ref/free of EVP_CIPHER
Tomas Mraz [Tue, 26 Sep 2023 15:39:50 +0000 (17:39 +0200)] 
Optimize out unneeded up_ref/free of EVP_CIPHER

Fixes #22189

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

8 months agoTest client certificate authentication with QUIC
Tomas Mraz [Wed, 27 Sep 2023 12:32:50 +0000 (14:32 +0200)] 
Test client certificate authentication with QUIC

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22207)

8 months agoPrepare for 3.2 alpha 3
Matt Caswell [Thu, 28 Sep 2023 13:24:47 +0000 (14:24 +0100)] 
Prepare for 3.2 alpha 3

Reviewed-by: Richard Levitte <levitte@openssl.org>
Release: yes

8 months agoPrepare for release of 3.2 alpha 2 openssl-3.2.0-alpha2
Matt Caswell [Thu, 28 Sep 2023 13:24:32 +0000 (14:24 +0100)] 
Prepare for release of 3.2 alpha 2

Reviewed-by: Richard Levitte <levitte@openssl.org>
Release: yes

8 months agomake update
Matt Caswell [Thu, 28 Sep 2023 13:24:31 +0000 (14:24 +0100)] 
make update

Reviewed-by: Richard Levitte <levitte@openssl.org>
Release: yes

8 months agoCopyright year updates
Matt Caswell [Thu, 28 Sep 2023 13:23:29 +0000 (14:23 +0100)] 
Copyright year updates

Reviewed-by: Richard Levitte <levitte@openssl.org>
Release: yes

8 months agoFix no-ssl-trace
Matt Caswell [Tue, 26 Sep 2023 11:14:56 +0000 (12:14 +0100)] 
Fix no-ssl-trace

Ensure we use OPENSSL_NO_SSL_TRACE guards where appropriate.

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

8 months agoMove e_os2.h up in quictestlib.c to allow symbol definition consistency.
Randall S. Becker [Sat, 23 Sep 2023 14:38:13 +0000 (15:38 +0100)] 
Move e_os2.h up in quictestlib.c to allow symbol definition consistency.

Fixes: #22178
Signed-of-by: Randall S. Becker <randall.becker@nexbridge.ca>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22179)

8 months agoFix a mem leak when the FIPS provider is used in a different thread
Matt Caswell [Mon, 25 Sep 2023 15:44:47 +0000 (16:44 +0100)] 
Fix a mem leak when the FIPS provider is used in a different thread

We were neglecting to register the main thread to receive thread stop
notifications. This is important if the thread that starts the FIPS
provider is not the same one that is used when OPENSSL_cleanup() is
called.

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

8 months agoevp_test: recondition cipher dupctx FIPS version check.
Pauli [Thu, 21 Sep 2023 22:46:31 +0000 (08:46 +1000)] 
evp_test: recondition cipher dupctx FIPS version check.

Until the cipher dupctx is properly implemented in 3.1 and 3.0 the check is
wrong.  This should be reverted once the implemenation has been done.

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

8 months agofips: use seed source requested
Pauli [Tue, 5 Sep 2023 02:51:05 +0000 (12:51 +1000)] 
fips: use seed source requested

Fixes #21909

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

8 months agorand: add extra error code
Pauli [Mon, 25 Sep 2023 04:25:58 +0000 (14:25 +1000)] 
rand: add extra error code

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

8 months agofips selftest: avoid relying on a real RNG for self tests
Pauli [Tue, 5 Sep 2023 00:16:49 +0000 (10:16 +1000)] 
fips selftest: avoid relying on a real RNG for self tests

Rather than instantiate the private and primary DRBGs during the
selftest, instead use a test RNG.  This leaves the DRBG setup
pristine and permits later replacement of the seed source despite
the very early running power up self tests.

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

8 months agoProvider cross version checks warning
Pauli [Wed, 13 Sep 2023 00:54:28 +0000 (10:54 +1000)] 
Provider cross version checks warning

Add a warning note to the provider cross version checks indicating that a
pull request branch will not be used if execution is set to on pull request.

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

8 months agofix indentation
Pauli [Mon, 4 Sep 2023 00:22:29 +0000 (10:22 +1000)] 
fix indentation

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

8 months agoremove redundant free of NULL
Pauli [Mon, 4 Sep 2023 04:37:09 +0000 (14:37 +1000)] 
remove redundant free of NULL

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

8 months agoSupport all NULL-syntax X.509v3 extensions
Jonathan M. Wilbur [Sat, 1 Jul 2023 15:56:40 +0000 (15:56 +0000)] 
Support all NULL-syntax X.509v3 extensions

Signed-off-by: Jonathan M. Wilbur <jonathan@wilbur.space>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21342)

8 months agoAdd a test for BIO_ADDR_copy()
Matt Caswell [Thu, 21 Sep 2023 15:28:58 +0000 (16:28 +0100)] 
Add a test for BIO_ADDR_copy()

We also add a test for BIO_ADDR_dup() which was also added in 3.2

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

8 months agoClean away the test code implementation of bio_addr_copy
Matt Caswell [Thu, 21 Sep 2023 11:16:38 +0000 (12:16 +0100)] 
Clean away the test code implementation of bio_addr_copy

We now have a public function for BIO_ADDR_copy() which can be used in
preference to the test code's private implementation.

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

8 months agoAdd documentation for the BIO_ADDR_copy() function
Matt Caswell [Thu, 21 Sep 2023 11:10:15 +0000 (12:10 +0100)] 
Add documentation for the BIO_ADDR_copy() function

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

8 months agoImplement a public BIO_ADDR_copy() function
Matt Caswell [Thu, 21 Sep 2023 10:59:58 +0000 (11:59 +0100)] 
Implement a public BIO_ADDR_copy() function

We already have BIO_ADDR_dup() but in some contexts that is not sufficent.
We implement BIO_ADDR_copy() and make BIO_ADDR_dup() use it.

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

8 months agoRemove a spurious inclusion of the sparse array header file
Matt Caswell [Fri, 22 Sep 2023 16:31:34 +0000 (17:31 +0100)] 
Remove a spurious inclusion of the sparse array header file

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

8 months agoadding -outpubkey option to genpkey
Michael Baentsch [Fri, 22 Sep 2023 15:52:09 +0000 (17:52 +0200)] 
adding -outpubkey option to genpkey

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22173)

8 months agono-engine: fix signing with legacy app method based keys
Matthias St. Pierre [Thu, 21 Sep 2023 14:43:43 +0000 (16:43 +0200)] 
no-engine: fix signing with legacy app method based keys

Signing with an app method based key (i.e. an `EVP_PKEY` which wraps an
`RSA` key with an application defined `RSA_METHOD`) used to work in 1.1.1.
That feature was broken in commit 60488d2434, but later on fixed by @t8m
in commit b247113c05 (see #14859).

This commit corrects a  minor flaw of the fix, which affects only
`no-engine` builds: the special treatment for foreign keys is guarded
by an `OPENSSL_NO_ENGINE` check.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/22163)

8 months agoDo not include sparse_array.o in libssl
Huiyue Xu [Thu, 14 Sep 2023 08:21:35 +0000 (16:21 +0800)] 
Do not include sparse_array.o in libssl

sparse_array.o is not needed in libssl at 3.0.x version.

Signed-off-by: Huiyue Xu <xuhuiyue@huawei.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22111)

(cherry picked from commit a31cd07af1ca34cdbbd2b077a933208d447ed0b2)

8 months agoClarify the terminology in the noisy dgram BIO
Matt Caswell [Thu, 21 Sep 2023 09:25:00 +0000 (10:25 +0100)] 
Clarify the terminology in the noisy dgram BIO

The previous terminology was quite confusing. We try to use drop, duplicate
and delay more consistently and introduce the "reinject" terminology as a
mechanism for implementing duplicates and delays.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoEnsure we free all the BIOs in a chain for QUIC like we do in TLS
Matt Caswell [Wed, 20 Sep 2023 15:25:44 +0000 (16:25 +0100)] 
Ensure we free all the BIOs in a chain for QUIC like we do in TLS

An application may pass in a whole BIO chain via SSL_set_bio(). When we
free the BIO we should be using BIO_free_all() not BIO_free() like we do
with TLS.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoEnsure we up-ref the sbio before passing it to tserver
Matt Caswell [Wed, 20 Sep 2023 15:24:37 +0000 (16:24 +0100)] 
Ensure we up-ref the sbio before passing it to tserver

We are actually passing two references to sbio: one as part of a BIO chain
and one stand alone. Therefore we need two references.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoRemove some redundant code from test helper BIOs
Matt Caswell [Wed, 20 Sep 2023 12:25:42 +0000 (13:25 +0100)] 
Remove some redundant code from test helper BIOs

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoEnsure client to server datagrams are noisy too
Matt Caswell [Tue, 19 Sep 2023 15:52:00 +0000 (16:52 +0100)] 
Ensure client to server datagrams are noisy too

So far we've only applied noise to the server to client datagrams. Do the
same thing the other way around.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoAdd the ability to do client side tracing in quictestlib.c
Matt Caswell [Tue, 19 Sep 2023 15:40:25 +0000 (16:40 +0100)] 
Add the ability to do client side tracing in quictestlib.c

We add a new flag QTEST_FLAG_CLIENT_TRACE to get debug tracing output if
required.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoExtend the noisy dgram test so that packets are also affected by noise
Matt Caswell [Tue, 19 Sep 2023 11:21:27 +0000 (12:21 +0100)] 
Extend the noisy dgram test so that packets are also affected by noise

Where multiple packets are in a single datagram we split them so that all
packets can be affected by the noise

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoAdd a packet splitting BIO
Matt Caswell [Tue, 19 Sep 2023 10:52:42 +0000 (11:52 +0100)] 
Add a packet splitting BIO

Provide a BIO filter that can split QUIC datagrams containing multiple
packets, such that each packet is in its own datagram.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoUse fake time rather than real time in the noisy dgram test
Matt Caswell [Mon, 18 Sep 2023 16:06:31 +0000 (17:06 +0100)] 
Use fake time rather than real time in the noisy dgram test

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoAdd support for timeouts into quictestlib.c
Matt Caswell [Mon, 18 Sep 2023 15:55:52 +0000 (16:55 +0100)] 
Add support for timeouts into quictestlib.c

Now that we have a noisy datagram BIO we cannot rely on datagrams always
reliably being delivered in the test framework. We need to start taking
notice of timeouts and handling them appropriately.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoAdd some optional debug output to the noisy dgram BIO
Matt Caswell [Mon, 18 Sep 2023 10:41:42 +0000 (11:41 +0100)] 
Add some optional debug output to the noisy dgram BIO

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoUse test_random() to introduce better noise into the noisy dgram BIO
Matt Caswell [Fri, 15 Sep 2023 14:35:56 +0000 (15:35 +0100)] 
Use test_random() to introduce better noise into the noisy dgram BIO

We drop some datagrams, and we delay some datagrams. We can also duplicate
some datagrams.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoExtend the nosiy datagram test to send more data
Matt Caswell [Thu, 14 Sep 2023 15:34:41 +0000 (16:34 +0100)] 
Extend the nosiy datagram test to send more data

We send several messages between client and server, and server and client,
and also create a new stream.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoAdd the ability to drop datagrams in the noisy dgram BIO
Matt Caswell [Thu, 14 Sep 2023 11:24:12 +0000 (12:24 +0100)] 
Add the ability to drop datagrams in the noisy dgram BIO

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoCreate a noisy dgram test
Matt Caswell [Thu, 14 Sep 2023 09:59:47 +0000 (10:59 +0100)] 
Create a noisy dgram test

Create a noisy dgram test that can drop/duplicate/reorder UDP packets and
ensure that the QUIC connection is tolerant of this. At this stage we just
create the outline of the test. Adding in the noise will come in future
commits.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)

8 months agoAdd command line option for setting propquery in evp_test
Veronika Hanulíková [Fri, 8 Sep 2023 09:44:27 +0000 (11:44 +0200)] 
Add command line option for setting propquery in evp_test

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/22151)

8 months agoAdd command line option for setting provider in evp_test
Veronika Hanulíková [Tue, 12 Sep 2023 13:24:21 +0000 (15:24 +0200)] 
Add command line option for setting provider in evp_test

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/22151)

8 months agoFix test_cms if DSA is not supported
Steffen Klee [Tue, 19 Sep 2023 22:04:18 +0000 (00:04 +0200)] 
Fix test_cms if DSA is not supported

CLA: trivial

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

8 months agoFix error handling in lhash contract
Bernd Edlinger [Wed, 20 Sep 2023 13:45:56 +0000 (15:45 +0200)] 
Fix error handling in lhash contract

When the realloc fails in contract, this not a fatal
error, since the memory is only shrinked. It is also no
option to exit the function at this point, since that
would leave the hash table in an inconsistent state.

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

8 months agoFix error handling in CRYPTO_get_ex_new_index
Bernd Edlinger [Tue, 19 Sep 2023 18:15:18 +0000 (20:15 +0200)] 
Fix error handling in CRYPTO_get_ex_new_index

If an out of memory error happens when the index zero
is reserved in a newly created ip->meth stack object,
that reservation is not done in a second attempt, which makes
various X_set_ex_data overwrite the value of X_set_app_data.

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

8 months agoFix some memory leaks in the openssl app
Bernd Edlinger [Mon, 11 Sep 2023 04:38:31 +0000 (06:38 +0200)] 
Fix some memory leaks in the openssl app

In some error cases the normal cleanup did not
happen, but instead an exit(1) which caused some
memory leaks, as reported in #22049.

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/22055)

8 months agocmp_vfy.c: Use verification callback if cert_acceptable() finds expired cert
Dr. David von Oheimb [Thu, 6 May 2021 16:49:54 +0000 (18:49 +0200)] 
cmp_vfy.c: Use verification callback if cert_acceptable() finds expired cert

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

8 months agodoc: change name of OSSL_PROVIDER_load_ex design document
Matthias St. Pierre [Fri, 8 Sep 2023 10:35:57 +0000 (12:35 +0200)] 
doc: change name of OSSL_PROVIDER_load_ex design document

Use dashes instead of underscores, to be more consistent with
existing document names. And speaking of consistency, introduce
a consistent name transformation, which will scale better when
design documents start filling the folder ;-)

    OSSL_PROVIDER_load_ex -> ossl-provider-load-ex.md

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22029)

8 months agodoc: suggestions for OSSL_PROVIDER_load_ex design document
Matthias St. Pierre [Fri, 8 Sep 2023 10:31:09 +0000 (12:31 +0200)] 
doc: suggestions for OSSL_PROVIDER_load_ex design document

Late review comments for pull request #21604, sort of.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22029)

8 months agoDocument the OPENSSL_TEST_RAND_SEED environment variable
Matt Caswell [Fri, 15 Sep 2023 13:36:05 +0000 (14:36 +0100)] 
Document the OPENSSL_TEST_RAND_SEED environment variable

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22118)

8 months agoEnable the ability to seed the test RNG without randomising test ordering
Matt Caswell [Fri, 15 Sep 2023 13:29:05 +0000 (14:29 +0100)] 
Enable the ability to seed the test RNG without randomising test ordering

Numerous tests use the test_random() function to get a random number. If a
test fails then the seed that was used for the test RNG is displayed.
Setting the seed to the same value in a future run is supposed to cause the
same random numbers to be generated again.

The way to set the RNG seed again is to use the `OPENSSL_TEST_RAND_ORDER`
environment variable. However setting this environment variable *also*
randomises the test ordering as well as seeding the RNG. This in itself
calls test_random() so, in fact, when the test finally runs it gets
different random numbers to when it originally run (defeating the
repeatability objective).

This means that only way repeatability can be obtained is if the test was
originally run with `OPENSSL_TEST_RAND_ORDER` set to 0. If that wasn't done
then the seed printed when the test failed is not useful.

We introduce a new environment variable `OPENSSL_TEST_RAND_SEED` which can
be used to independently seed the test RNG without randomising the test
ordering. This can be used to get repeatability in cases where test ordering
randomisation was not done in the first place.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22118)

8 months agocoverity: NULL dereference
Pauli [Tue, 19 Sep 2023 01:07:21 +0000 (11:07 +1000)] 
coverity: NULL dereference

Fixes coverity 1544699.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/22138)

8 months agoBIO: Wire poll descriptor functions in BIO_s_sock
Hugo Landau [Thu, 14 Sep 2023 07:40:14 +0000 (08:40 +0100)] 
BIO: Wire poll descriptor functions in BIO_s_sock

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

8 months agoSSL: Test SSL_get_[rw]poll_descriptor, SSL_net_(read|write)_desired
Hugo Landau [Wed, 13 Sep 2023 12:47:13 +0000 (13:47 +0100)] 
SSL: Test SSL_get_[rw]poll_descriptor, SSL_net_(read|write)_desired

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

8 months agoQUIC: Update documentation for SSL_get_[rw]poll_descriptor, SSL_net_(read|write)_desired
Hugo Landau [Wed, 13 Sep 2023 12:46:44 +0000 (13:46 +0100)] 
QUIC: Update documentation for SSL_get_[rw]poll_descriptor, SSL_net_(read|write)_desired

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

8 months agoQUIC APL: Wire SSL_get_[rw]poll_descriptor for TLS/DTLS
Hugo Landau [Wed, 13 Sep 2023 12:46:27 +0000 (13:46 +0100)] 
QUIC APL: Wire SSL_get_[rw]poll_descriptor for TLS/DTLS

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

8 months agoQUIC: Wire SSL_net_(read|write)_desired for TLS/DTLS
Hugo Landau [Wed, 6 Sep 2023 07:04:17 +0000 (08:04 +0100)] 
QUIC: Wire SSL_net_(read|write)_desired for TLS/DTLS

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

8 months agoAdd documentation for the function SSL_CONF_CTX_finish.
Sumitra Sharma [Mon, 18 Sep 2023 11:08:11 +0000 (16:38 +0530)] 
Add documentation for the function SSL_CONF_CTX_finish.

Add documentation for the function SSL_CONF_CTX_finish() in man3.

Fixes #22084

Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22128)