]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
10 months agofeat: add ossl_serial_number_print
Jonathan M. Wilbur [Thu, 12 Sep 2024 10:52:20 +0000 (10:52 +0000)] 
feat: add ossl_serial_number_print

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

10 months agotest: the roleSpecCertIdentifier X.509v3 extension
Jonathan M. Wilbur [Wed, 11 Sep 2024 00:46:33 +0000 (00:46 +0000)] 
test: the roleSpecCertIdentifier X.509v3 extension

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

10 months agodoc: support the roleSpecCertIdentifier X.509v3 extension
Jonathan M. Wilbur [Wed, 11 Sep 2024 00:46:10 +0000 (00:46 +0000)] 
doc: support the roleSpecCertIdentifier X.509v3 extension

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

10 months agofeat: support the roleSpecCertIdentifier X.509v3 extension
Jonathan M. Wilbur [Wed, 11 Sep 2024 00:44:35 +0000 (00:44 +0000)] 
feat: support the roleSpecCertIdentifier X.509v3 extension

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

10 months agoEVP_get_default_properties - tests
Dmitry Belyavskiy [Wed, 11 Sep 2024 14:48:44 +0000 (16:48 +0200)] 
EVP_get_default_properties - tests

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

10 months agoEVP_get_default_properties - make update
Dmitry Belyavskiy [Wed, 11 Sep 2024 14:04:21 +0000 (16:04 +0200)] 
EVP_get_default_properties - make update

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

10 months agoEVP_get_default_properties - documentation
Dmitry Belyavskiy [Wed, 11 Sep 2024 14:02:38 +0000 (16:02 +0200)] 
EVP_get_default_properties - documentation

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

10 months agoEVP_get_default_properties - implementation
Dmitry Belyavskiy [Wed, 11 Sep 2024 14:02:14 +0000 (16:02 +0200)] 
EVP_get_default_properties - implementation

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

10 months agoreview fixups for quic-hq-interop
Neil Horman [Wed, 11 Sep 2024 13:53:49 +0000 (09:53 -0400)] 
review fixups for quic-hq-interop

Reviewed-by: Sasa Nedvedicky <sashan@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25426)

10 months agoClean up style issues
Neil Horman [Tue, 10 Sep 2024 20:42:47 +0000 (16:42 -0400)] 
Clean up style issues

Reviewed-by: Sasa Nedvedicky <sashan@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25426)

10 months agoAdd some more tests to the interop matrix and fixup a typo
Neil Horman [Tue, 10 Sep 2024 19:51:14 +0000 (15:51 -0400)] 
Add some more tests to the interop matrix and fixup a typo

* Add resumption and multiplexing tests
* Remove needless head -n operation when patching implementation.json

Reviewed-by: Sasa Nedvedicky <sashan@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25426)

10 months agoAdding more documentation
Neil Horman [Tue, 10 Sep 2024 19:46:02 +0000 (15:46 -0400)] 
Adding more documentation

Reviewed-by: Sasa Nedvedicky <sashan@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25426)

10 months agoDo batching of stream requests
Neil Horman [Fri, 6 Sep 2024 14:57:55 +0000 (10:57 -0400)] 
Do batching of stream requests

We have a limited number of streams to use
send requests in accordance with the number of streams we have
and batch requests according to that limit

Reviewed-by: Sasa Nedvedicky <sashan@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25426)

10 months agosupport polling of multiple streams
Neil Horman [Wed, 4 Sep 2024 20:16:51 +0000 (16:16 -0400)] 
support polling of multiple streams

Reviewed-by: Sasa Nedvedicky <sashan@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25426)

10 months agoupdate quic docker container files
Neil Horman [Fri, 30 Aug 2024 16:48:33 +0000 (12:48 -0400)] 
update quic docker container files

1) Limit clone depth to allow faster fetches
2) Supply OPENSSL_URL and OPENSSL_BRANCH args to allow for branch
   testing

Reviewed-by: Sasa Nedvedicky <sashan@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25426)

10 months agoAdd lots of docs
Neil Horman [Thu, 29 Aug 2024 20:36:20 +0000 (16:36 -0400)] 
Add lots of docs

Reviewed-by: Sasa Nedvedicky <sashan@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25426)

10 months agoAdding session resume support to hq-interop
Neil Horman [Thu, 29 Aug 2024 17:52:58 +0000 (13:52 -0400)] 
Adding session resume support to hq-interop

Reviewed-by: Sasa Nedvedicky <sashan@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25426)

10 months agoConvert retry test to use hq-interop client
Neil Horman [Thu, 29 Aug 2024 16:11:15 +0000 (12:11 -0400)] 
Convert retry test to use hq-interop client

Reviewed-by: Sasa Nedvedicky <sashan@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25426)

10 months agoAdding an hq-interop alpn client
Neil Horman [Thu, 22 Aug 2024 19:17:32 +0000 (15:17 -0400)] 
Adding an hq-interop alpn client

Reviewed-by: Sasa Nedvedicky <sashan@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25426)

10 months agoDetect fin state of a QUIC stream for streams which are completely read
Neil Horman [Thu, 5 Sep 2024 19:49:14 +0000 (15:49 -0400)] 
Detect fin state of a QUIC stream for streams which are completely read

SSL_poll indicates that a stream which has had the fin bit set on it,
should generate SSL_POLL_EVENT_R events, so that applications can detect
stream completion via SSL_read_ex and SSL_get_error returning
SSL_ERROR_ZERO_RETURN.

However, the quic polling code misses on this, as a client that
completely reads a buffer after receipt has its underlying stream buffer
freed, loosing the fin status

We can however detect stream completion still, as a stream which has
been finalized, and had all its data read will be in the
QUIC_RSTREAM_STATE_DATA_READ state, iff the fin bit was set.

Fix it by checking in test_poll_event_r for that state, and generating a
SSL_POLL_EVENT_R if its found to be true, so as to stay in line with the
docs.

Fixes openssl/private#627

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Sasa Nedvedicky <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25399)

10 months agodocs: Correct bad link to provider-keymgmt(7) in provider-signature(7)
Richard Levitte [Fri, 13 Sep 2024 04:25:26 +0000 (06:25 +0200)] 
docs: Correct bad link to provider-keymgmt(7) in provider-signature(7)

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

10 months agodocs: Document the new signature interface for providers
Richard Levitte [Tue, 10 Sep 2024 16:16:10 +0000 (18:16 +0200)] 
docs: Document the new signature interface for providers

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

10 months agoIANA has assigned numbers for new TLS Supported Groups in ML-KEM
Sahana Prasad [Thu, 12 Sep 2024 10:21:30 +0000 (12:21 +0200)] 
IANA has assigned numbers for new TLS Supported Groups in ML-KEM
https://www.ietf.org/archive/id/draft-kwiatkowski-tls-ecdhe-mlkem-01.html#name-iana-considerations
Signed-off-by: Sahana Prasad <sahana@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/25477)

10 months agoAdd Missing Error Messages for AES-OCB Tag Length Validation
erbsland-dev [Tue, 10 Sep 2024 19:24:59 +0000 (21:24 +0200)] 
Add Missing Error Messages for AES-OCB Tag Length Validation

Related to #8331
Addressing found issues by adding specific error messages to improve
feedback when tag length checks fail for the `EVP_CTRL_AEAD_SET_TAG`
parameter in the AES-OCB algorithm.

- Added PROV_R_INVALID_TAG_LENGTH error to indicate when the current tag
  length exceeds the maximum tag length of the algorithm.
- Added `PROV_R_INVALID_TAG_LENGTH` error to indicate when the current tag
  length in the context does not match a custom tag length provided as
  a parameter.
- Added `ERR_R_PASSED_INVALID_ARGUMENT` error to handle cases where an
  invalid pointer is passed in encryption mode.

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

10 months agos390x: Add hardware acceleration for full AES-XTS
Holger Dengler [Tue, 6 Aug 2024 12:00:49 +0000 (14:00 +0200)] 
s390x: Add hardware acceleration for full AES-XTS

The CPACF instruction KM provides support for accelerating the full
AES-XTS algorithm on newer machines for AES_XTS_128 and AES_XTS_256.

Preliminary measurements showed performance improvements of up to 50%,
dependent on the message size.

Signed-off-by: Holger Dengler <dengler@linux.ibm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25414)

10 months agoUpdate the version to 3.5.0-dev
Tomas Mraz [Wed, 11 Sep 2024 15:58:01 +0000 (17:58 +0200)] 
Update the version to 3.5.0-dev

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/25437)

10 months agodocs: Document the implemented composite signature+hash algorithms
Richard Levitte [Tue, 10 Sep 2024 14:43:43 +0000 (16:43 +0200)] 
docs: Document the implemented composite signature+hash algorithms

The details for RSA and EdDSA have already been documented, albeit the
RSA documentation wasn't conforming properly to the POD format.

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

10 months agos_server: Support reading HTTP request from early data
Daiki Ueno [Wed, 11 Sep 2024 01:13:55 +0000 (10:13 +0900)] 
s_server: Support reading HTTP request from early data

This would be useful when testing with browsers / downloaders which
support 0-RTT only through HTTP.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16055)

10 months agofix small footprint builds on arm
Gerd Hoffmann [Mon, 9 Sep 2024 15:09:34 +0000 (17:09 +0200)] 
fix small footprint builds on arm

Building with '-D OPENSSL_SMALL_FOOTPRINT' for aarch64 fails due to
'gcm_ghash_4bit' being undeclared.  Fix that by not setting the function
pointer when building with OPENSSL_SMALL_FOOTPRINT, matching openssl
behavior on x86.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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/25419)

10 months agodocument provider dependency handling
Michael Baentsch [Mon, 15 Jul 2024 04:54:48 +0000 (06:54 +0200)] 
document provider dependency handling

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

10 months agoCleanup of unused functions and macros in ssl_local.h
Frederik Wedel-Heinen [Fri, 14 Jun 2024 12:01:40 +0000 (14:01 +0200)] 
Cleanup of unused functions and macros in ssl_local.h

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

10 months agofeat: print <none> in issuer serials in ac targeting extension
Jonathan M. Wilbur [Sat, 7 Sep 2024 09:50:34 +0000 (09:50 +0000)] 
feat: print <none> in issuer serials in ac targeting extension

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

10 months agotest: authorityAttributeIdentifier X.509v3 extension
Jonathan M. Wilbur [Wed, 21 Aug 2024 02:25:03 +0000 (02:25 +0000)] 
test: authorityAttributeIdentifier X.509v3 extension

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

10 months agodoc: authorityAttributeIdentifier-related ASN.1 symbols
Jonathan M. Wilbur [Wed, 21 Aug 2024 02:24:49 +0000 (02:24 +0000)] 
doc: authorityAttributeIdentifier-related ASN.1 symbols

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

10 months agofeat: support the authorityAttributeIdentifier X.509v3 extension
Jonathan M. Wilbur [Wed, 21 Aug 2024 02:24:15 +0000 (02:24 +0000)] 
feat: support the authorityAttributeIdentifier X.509v3 extension

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

10 months agoAdd NonStop KLT Configuration for new platform kernel treading model.
Randall S. Becker [Wed, 17 Apr 2024 21:11:42 +0000 (05:11 +0800)] 
Add NonStop KLT Configuration for new platform kernel treading model.

This fix supports the new NonStop KLT threading model, including
configurations and documentation for using this model.

Fixes: fix-24175
Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25016)

10 months agoUse Jq to add openssl to interop test harness
Neil Horman [Mon, 9 Sep 2024 12:02:13 +0000 (08:02 -0400)] 
Use Jq to add openssl to interop test harness

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25256)

10 months agoCollapse errors down by using || in run_endpoint.sh
Neil Horman [Thu, 29 Aug 2024 20:54:19 +0000 (16:54 -0400)] 
Collapse errors down by using || in run_endpoint.sh

Makes for smaller more consistent coding

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25256)

10 months agoAdd interop status badge
Neil Horman [Wed, 21 Aug 2024 16:32:28 +0000 (12:32 -0400)] 
Add interop status badge

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25256)

10 months agoNeed to remove our bash settings as we need to interrogate failures
Neil Horman [Mon, 19 Aug 2024 19:39:16 +0000 (15:39 -0400)] 
Need to remove our bash settings as we need to interrogate failures

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25256)

10 months agoAdd local nightly interop running
Neil Horman [Fri, 16 Aug 2024 19:42:50 +0000 (15:42 -0400)] 
Add local nightly interop running

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25256)

10 months agoReduce footprint of Windows CI
Tomas Mraz [Wed, 4 Sep 2024 09:34:12 +0000 (11:34 +0200)] 
Reduce footprint of Windows CI

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Hugo Landau <hlandau@devever.net>
(Merged from https://github.com/openssl/openssl/pull/25378)

10 months agoAdd Windows build with enable-fips no-thread-pool no-quic
Tomas Mraz [Wed, 4 Sep 2024 07:27:52 +0000 (09:27 +0200)] 
Add Windows build with enable-fips no-thread-pool no-quic

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Hugo Landau <hlandau@devever.net>
(Merged from https://github.com/openssl/openssl/pull/25378)

10 months agoFix no-thread-pool build on Windows
Tomas Mraz [Wed, 4 Sep 2024 07:27:28 +0000 (09:27 +0200)] 
Fix no-thread-pool build on Windows

thread/arch/thread_win.c must be included into libcrypto as rcu depends
on ossl_crypto_mutex implementation on Windows.

Fixes #25337

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Hugo Landau <hlandau@devever.net>
(Merged from https://github.com/openssl/openssl/pull/25378)

10 months agoAdd a test for the nonce-type sigopt
Matt Caswell [Thu, 8 Aug 2024 15:12:11 +0000 (16:12 +0100)] 
Add a test for the nonce-type sigopt

Check that using the nonce-type sigopt via the dgst app works correctly

Based on the reproducer from #25012

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

10 months agoDon't restrict the ECDSA settable ctx params unnecessarily
Matt Caswell [Wed, 31 Jul 2024 13:24:12 +0000 (14:24 +0100)] 
Don't restrict the ECDSA settable ctx params unnecessarily

We just allow all possible settables all the time. Some things like the
digest name can't actually be changed in some circumstances - but we already
have checks for those things. It's still possible to pass a digest of the
same name to one that's already been set for example.

Fixes #25012

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

10 months agoComplain about a missing digest when doing deterministic ECDSA
Matt Caswell [Wed, 31 Jul 2024 13:08:40 +0000 (14:08 +0100)] 
Complain about a missing digest when doing deterministic ECDSA

We need a digest for the none when doing deterministic ECDSA. Give a
better error message if one hasn't been supplied.

See openssl/openssl#25012

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

10 months agoAdd missing security rules about NULL check to various manpages
icy17 [Wed, 7 Aug 2024 08:54:14 +0000 (16:54 +0800)] 
Add missing security rules about NULL check to various manpages

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

10 months agoMinor WINDOWS.md cleanups
ha1215 [Tue, 23 Apr 2024 01:54:36 +0000 (21:54 -0400)] 
Minor WINDOWS.md cleanups

The possessive form of "Windows" has been updated from "Windows's"
to "Windows'".

The function call "a poll(2) call" has been specified as
"a poll(2) system call" for clarity.

The phrase "and supposed" has been corrected to "and was supposed" to
improve sentence structure.

The phrase "However Microsoft has" now includes a comma, revised to
"However, Microsoft has" to enhance readability.

The statement "Supporting these is a pain" has been adjusted to
"Supporting these can be a pain" to better convey potential variability
in user experience.

CLA: trivial

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

10 months agorehash.c: handle possible null pointer returned by OPENSSL_strdup
XZ-X [Mon, 22 Jul 2024 05:38:00 +0000 (01:38 -0400)] 
rehash.c: handle possible null pointer returned by OPENSSL_strdup

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

10 months agoAdd note for non-interactive use of `s_client`
erbsland-dev [Wed, 28 Aug 2024 19:54:12 +0000 (21:54 +0200)] 
Add note for non-interactive use of `s_client`

Fixes #8018

Documented the potential issue of premature connection closure in
non-interactive environments, such as cron jobs, when using `s_client`.

Added guidance on using the `-ign_eof` option and input redirection to
ensure proper handling of `stdin` and completion of TLS session data exchange.

Highlight potential issues with the `-ign_eof` flag and provide solutions for
graceful disconnection in SMTP and HTTP/1.1 scenarios to avoid indefinite hangs.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25311)

10 months agoRefactor Password Variables to Use `const char[]` Arrays
erbsland-dev [Sun, 1 Sep 2024 20:55:12 +0000 (22:55 +0200)] 
Refactor Password Variables to Use `const char[]` Arrays

- Converted password declaration from `char*` to `const char[]`.
- Updated `memcpy` and `return` statements accordingly to use `sizeof` instead of predefined lengths.
- Renamed `key_password` into `weak_password` to match test name.

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

10 months agoRefactor Callback Tests for Improved Memory Management
erbsland-dev [Fri, 30 Aug 2024 14:35:38 +0000 (16:35 +0200)] 
Refactor Callback Tests for Improved Memory Management

Refactor the callback test code to replace global variables with local structures, enhancing memory management and reducing reliance on redundant cleanup logic.

Using a local struct containing a magic number and result flag to ensure the correct handling of user data and to verify that the callback function is invoked at least once during the test.

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

10 months agoFix Edge Cases in Password Callback Handling
erbsland-dev [Fri, 30 Aug 2024 08:56:58 +0000 (10:56 +0200)] 
Fix Edge Cases in Password Callback Handling

Fixes #8441: Modify the password callback handling to reserve one byte in the buffer for a null terminator, ensuring compatibility with legacy behavior that puts a terminating null byte at the end.

Additionally, validate the length returned by the callback to ensure it does not exceed the given buffer size. If the returned length is too large, the process now stops gracefully with an appropriate error, enhancing robustness by preventing crashes from out-of-bounds access.

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

10 months agoAdd test for BIO password callback functionality
erbsland-dev [Thu, 29 Aug 2024 21:08:46 +0000 (23:08 +0200)] 
Add test for BIO password callback functionality

Related to #8441

This commit introduces a test suite for the password callback mechanism used when reading or writing encrypted and PEM or DER encoded keys via a BIO in OpenSSL. The test is designed to cover various edge cases, particularly focusing on scenarios where the password callback might return unexpected or malformed data from user code.

By simulating different callback behaviors, including negative returns, zero-length passwords, passwords that exactly fill the buffer and wrongly reported lengths. Also testing for the correct behaviour of binary passwords that contain a null byte in the middle.

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

10 months agoAdd fips indicator requirements doc
slontis [Fri, 16 Feb 2024 04:21:11 +0000 (14:21 +1000)] 
Add fips indicator requirements doc

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

10 months agoCHANGES.md, NEWS.md: Add 3.5 sections
Tomas Mraz [Thu, 5 Sep 2024 12:57:09 +0000 (14:57 +0200)] 
CHANGES.md, NEWS.md: Add 3.5 sections

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/25393)

10 months agolibcrypto/libssl.num: Set the numbers for 3_4_0 symbols
Tomas Mraz [Thu, 5 Sep 2024 12:56:10 +0000 (14:56 +0200)] 
libcrypto/libssl.num: Set the numbers for 3_4_0 symbols

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/25393)

10 months agoNEWS.md: Add missing link to 3.4 section
Tomas Mraz [Thu, 5 Sep 2024 12:53:04 +0000 (14:53 +0200)] 
NEWS.md: Add missing link to 3.4 section

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/25393)

10 months agos390x: Fix s390x_shake_squeeze() when MSA 12 is available
Ingo Franzki [Wed, 4 Sep 2024 11:42:09 +0000 (13:42 +0200)] 
s390x: Fix s390x_shake_squeeze() when MSA 12 is available

On the first squeeze call, when finishing the absorb process, also set
the NIP flag, if we are still in XOF_STATE_INIT state. When MSA 12 is
available, the state buffer A has not been zeroed during initialization,
thus we must also pass the NIP flag here. This situation can happen
when a squeeze is performed without a preceding absorb (i.e. a SHAKE
of the empty message).

Add a test that performs a squeeze without a preceding absorb and check
if the result is correct.

Fixes: https://github.com/openssl/openssl/commit/25f5d7b85f6657cd2f9f1ab7ae87f319d9bafe54
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25388)

10 months agos390x: Fix s390x_sha3_absorb() when no data is processed by KIMD
Ingo Franzki [Thu, 5 Sep 2024 06:45:29 +0000 (08:45 +0200)] 
s390x: Fix s390x_sha3_absorb() when no data is processed by KIMD

If the data to absorb is less than a block, then the KIMD instruction is
called with zero bytes. This is superfluous, and causes incorrect hash
output later on if this is the very first absorb call, i.e. when the
xof_state is still XOF_STATE_INIT and MSA 12 is available. In this case
the NIP flag is set in the function code for KIMD, but KIMD ignores the
NIP flag when it is called with zero bytes to process.

Skip any KIMD calls for zero length data. Also do not set the xof_state
to XOF_STATE_ABSORB until the first call to KIMD with data. That way,
the next KIMD (with non-zero length data) or KLMD call will get the NIP
flag set and will then honor it to produce correct output.

Fixes: https://github.com/openssl/openssl/commit/25f5d7b85f6657cd2f9f1ab7ae87f319d9bafe54
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25388)

10 months agoDependabot update
dependabot[bot] [Thu, 29 Aug 2024 17:50:32 +0000 (17:50 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump actions/setup-python

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.1.1 to 5.2.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.1.1...v5.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25328)

10 months agoDependabot update
dependabot[bot] [Wed, 4 Sep 2024 17:07:36 +0000 (17:07 +0000)] 
Dependabot update

CLA: trivial

(deps): bump actions/download-artifact

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.7 to 4.1.8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4.1.7...v4.1.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25385)

10 months agoargon2: Fixed an thread availability error string
PIums [Wed, 4 Sep 2024 02:37:11 +0000 (22:37 -0400)] 
argon2: Fixed an thread availability error string

Correctly display the number of requested threads and the number
of available threads.

CLA: trivial

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25375)

10 months agocrypto/pkcs12/p12_mutl.c: Add check and EVP_MD_free() for EVP_MD_fetch()
Jiasheng Jiang [Tue, 3 Sep 2024 19:18:47 +0000 (19:18 +0000)] 
crypto/pkcs12/p12_mutl.c: Add check and EVP_MD_free() for EVP_MD_fetch()

Add check and EVP_MD_free() for EVP_MD_fetch() to avoid NULL pointer
dereference and memory leak, like "md_fetch".

Fixes: fe79159be0 ("Implementation of the RFC 9579, PBMAC1 in PKCS#12")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@outlook.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25370)

10 months agoDrop redundant non-negative checks on unsigned values
Viktor Dukhovni [Sat, 31 Aug 2024 02:27:33 +0000 (12:27 +1000)] 
Drop redundant non-negative checks on unsigned values

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/25341)

10 months agoblank line required to display code in `openssl-ts.pod.in`
Pablo Rodríguez [Fri, 30 Aug 2024 14:56:03 +0000 (16:56 +0200)] 
blank line required to display code in `openssl-ts.pod.in`

CLA:trivial

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Richard Levitte <levitte@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/25338)

10 months agoFix inaccurate comment about default nonce length in demos/cipher/aesccm.c
Alessandro Chitarrini [Thu, 29 Aug 2024 10:59:54 +0000 (12:59 +0200)] 
Fix inaccurate comment about default nonce length in demos/cipher/aesccm.c

Fixes #25270

CLA: trivial

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

10 months agofeat: add TCG / platform certificate OIDs
Jonathan M. Wilbur [Wed, 28 Aug 2024 23:38:38 +0000 (23:38 +0000)] 
feat: add TCG / platform certificate OIDs

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25312)

10 months agoRecycle the TLS key that holds thread_event_handler
Zhihao Yuan [Tue, 27 Aug 2024 01:48:36 +0000 (18:48 -0700)] 
Recycle the TLS key that holds thread_event_handler

Fixes #25278

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

10 months agoAdd error return value information for EVP_MD_get_size()
Jiasheng Jiang [Fri, 30 Aug 2024 19:36:51 +0000 (19:36 +0000)] 
Add error return value information for EVP_MD_get_size()

Add error return value information for EVP_MD_get_size() and
EVP_MD_CTX_get_size() to better guide their usages and avoid
the integer overflow, such as
4a50882 ("ssl_cipher_get_overhead(): Replace size_t with int and add the checks")
and ef9ac2f ("test/bad_dtls_test.c: Add checks for the EVP_MD_CTX_get_size()").

Signed-off-by: Jiasheng Jiang <jiashengjiangcool@outlook.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25282)

10 months agoClarify EVP_CipherUpdate() authenticated bytes behavior
erbsland-dev [Mon, 22 Jul 2024 08:26:17 +0000 (10:26 +0200)] 
Clarify EVP_CipherUpdate() authenticated bytes behavior

Fixes #8310: Document that the number of authenticated bytes returned by EVP_CipherUpdate() varies with the cipher used. Mention that stream ciphers like ChaCha20 can handle 1 byte at a time, while OCB mode requires processing data one block at a time. Ensure it's clear that passing unpadded data in one call is safe.

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

10 months agothreads_win: fix improper cast to long * instead of LONG *
Georgi Valkov [Fri, 19 Jul 2024 21:37:21 +0000 (00:37 +0300)] 
threads_win: fix improper cast to long * instead of LONG *

InterlockedExchangeAdd expects arguments of type LONG *, LONG
but the int arguments were improperly cast to long *, long

Note:
- LONG is always 32 bit
- long is 32 bit on Win32 VC x86/x64 and MingW-W64
- long is 64 bit on cygwin64

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24941)

10 months agothreads: follow formatting rules
Georgi Valkov [Fri, 19 Jul 2024 08:57:24 +0000 (11:57 +0300)] 
threads: follow formatting rules

Adjust long lines and correct padding in preprocessor lines to
match the formatting rules

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24941)

10 months agoFix memleak in rsa_cms_sign error path
Daniel Gustafsson [Fri, 12 Jul 2024 18:49:16 +0000 (20:49 +0200)] 
Fix memleak in rsa_cms_sign error path

If the call to X509_ALGOR_set0 fails then the allocated ASN1_STRING
variable passed as parameter leaks.  Fix by explicitly freeing like
how all other codepaths with X509_ALGOR_set0 do.

Fixes #22680

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

10 months agossl: rework "e_os.h" inclusions
FdaSilvaYY [Sat, 20 Feb 2021 23:04:07 +0000 (00:04 +0100)] 
ssl: rework "e_os.h" inclusions

- Remove e_os.h include from "ssl_local.h"
- Added e_os.h into the files that need it now.
- Move e_os.h to be the very first include

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

10 months agoapps: directly inclusion of "e_os.h when needed
FdaSilvaYY [Sat, 20 Feb 2021 23:10:52 +0000 (00:10 +0100)] 
apps: directly inclusion of "e_os.h when needed

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

10 months agocrypto: fix missing <winsock.h> indirection inclusion.
FdaSilvaYY [Sat, 20 Feb 2021 23:10:07 +0000 (00:10 +0100)] 
crypto: fix missing <winsock.h> indirection inclusion.

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

10 months agoMove inclusion of <winsock.h> out of "e_os.h" into a dedicated header file.
FdaSilvaYY [Sat, 20 Feb 2021 22:46:34 +0000 (23:46 +0100)] 
Move inclusion of <winsock.h> out of "e_os.h" into a dedicated header file.

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

10 months agoPrepare for 3.4 beta 1 25390/head
Tomas Mraz [Thu, 5 Sep 2024 07:38:19 +0000 (09:38 +0200)] 
Prepare for 3.4 beta 1

Reviewed-by: Neil Horman <nhorman@openssl.org>
Release: yes

10 months agoPrepare for release of 3.4 alpha 1 openssl-3.4.0-alpha1
Tomas Mraz [Thu, 5 Sep 2024 07:37:44 +0000 (09:37 +0200)] 
Prepare for release of 3.4 alpha 1

Reviewed-by: Neil Horman <nhorman@openssl.org>
Release: yes

10 months agomake update
Tomas Mraz [Thu, 5 Sep 2024 07:37:42 +0000 (09:37 +0200)] 
make update

Reviewed-by: Neil Horman <nhorman@openssl.org>
Release: yes

10 months agoCopyright year updates
Tomas Mraz [Thu, 5 Sep 2024 07:35:49 +0000 (09:35 +0200)] 
Copyright year updates

Reviewed-by: Neil Horman <nhorman@openssl.org>
Release: yes

10 months agoutil/mkinstallvars.pl: replace List::Util::pairs with out own
Richard Levitte [Tue, 3 Sep 2024 17:16:05 +0000 (19:16 +0200)] 
util/mkinstallvars.pl: replace List::Util::pairs with out own

Unfortunately, List::Util::pairs didn't appear in perl core modules
before 5.19.3, and our minimum requirement is 5.10.

Fortunately, we already have a replacement implementation, and can
re-apply it in this script.

Fixes #25366

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

10 months agoCI: Update upload-artifact action to be compatible
Tomas Mraz [Wed, 4 Sep 2024 15:17:29 +0000 (17:17 +0200)] 
CI: Update upload-artifact action to be compatible

The download-artifact action was updated to 4.x
and the upload-artifact must be kept in sync.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25383)

10 months agobuild(deps): bump actions/download-artifact in /.github/workflows
dependabot[bot] [Tue, 3 Sep 2024 22:45:53 +0000 (22:45 +0000)] 
build(deps): bump actions/download-artifact in /.github/workflows

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

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

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

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

10 months agoEVP_CIPHER_CTX_get_algor_params() may attempt to access params array
Alexandr Nedvedicky [Wed, 28 Aug 2024 12:37:07 +0000 (14:37 +0200)] 
EVP_CIPHER_CTX_get_algor_params() may attempt to access params array
at position -1 (prams[=1]).

The issue has been reported by coverity check.

Reviewed-by: Richard Levitte <levitte@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/25303)

10 months agos390x: Fix prehash-by-caller handling for ED25519 and ED448
Ingo Franzki [Mon, 2 Sep 2024 07:08:02 +0000 (09:08 +0200)] 
s390x: Fix prehash-by-caller handling for ED25519 and ED448

In case of prehash or prehash-by-caller is set skip the s390x specific
acceleration an fallback to the non-accelerated code path.

Fixes: 66966827740a04249300b0b25735e9d4c9bcab26
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25351)

10 months agos390x: Disable HMAC hardware acceleration when an engine is used for the digest
Ingo Franzki [Mon, 26 Aug 2024 09:26:03 +0000 (11:26 +0200)] 
s390x: Disable HMAC hardware acceleration when an engine is used for the digest

The TLSProxy uses the 'ossltest' engine to produce known output for digests
and HMAC calls. However, when running on a s390x system that supports
hardware acceleration of HMAC, the engine is not used for calculating HMACs,
but the s390x specific HMAC implementation is used, which does produce correct
output, but not the known output that the engine would produce. This causes
some tests (i.e. test_key_share, test_sslextension, test_sslrecords,
test_sslvertol, and test_tlsextms) to fail.

Disable the s390x HMAC hardware acceleration if an engine is used for the
digest of the HMAC calculation. This provides compatibility for engines that
provide digest implementations, and assume that these implementations are also
used when calculating an HMAC.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25287)

10 months agoAdd CVE-2024-5535 to CHANGES and NEWS
Tomas Mraz [Tue, 3 Sep 2024 10:24:58 +0000 (12:24 +0200)] 
Add CVE-2024-5535 to CHANGES and NEWS

Reviewed-by: Neil Horman <nhorman@openssl.org>
Release: yes
(cherry picked from commit abcb0f83d060eb816503a6a36959ce8498a24111)

10 months agoUpdated CHANGES and NEWS for CVE-2024-6119 fix
Viktor Dukhovni [Wed, 10 Jul 2024 09:50:57 +0000 (19:50 +1000)] 
Updated CHANGES and NEWS for CVE-2024-6119 fix

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(cherry picked from commit cf384d35aa7142cc3b5de19f64d3972e77d3ff74)

10 months agoAvoid type errors in EAI-related name check logic.
Viktor Dukhovni [Wed, 19 Jun 2024 11:04:11 +0000 (21:04 +1000)] 
Avoid type errors in EAI-related name check logic.

The incorrectly typed data is read only, used in a compare operation, so
neither remote code execution, nor memory content disclosure were possible.
However, applications performing certificate name checks were vulnerable to
denial of service.

The GENERAL_TYPE data type is a union, and we must take care to access the
correct member, based on `gen->type`, not all the member fields have the same
structure, and a segfault is possible if the wrong member field is read.

The code in question was lightly refactored with the intent to make it more
obviously correct.

Fixes CVE-2024-6119

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
10 months agoAdd CHANGES.md and NEWS.md updates for the 3.4 release
Tomas Mraz [Fri, 30 Aug 2024 15:06:12 +0000 (17:06 +0200)] 
Add CHANGES.md and NEWS.md updates for the 3.4 release

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/25339)

10 months agoAdd support for elf_aux_info() on OpenBSD
Brad Smith [Sun, 1 Sep 2024 05:07:16 +0000 (01:07 -0400)] 
Add support for elf_aux_info() on OpenBSD

CLA: trivial

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

10 months agoMissing .rodata for AVX2/AVX512 codepaths
Theo Buehler [Fri, 30 Aug 2024 15:06:26 +0000 (17:06 +0200)] 
Missing .rodata for AVX2/AVX512 codepaths

This is a follow-up to #23997

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

10 months agoDetect MinGW 32 bit for NO_INTERLOCKEDOR64
Adam (ThinLinc team) [Mon, 29 Jul 2024 11:54:46 +0000 (13:54 +0200)] 
Detect MinGW 32 bit for NO_INTERLOCKEDOR64

Builds using 32 bit MinGW will fail, due to the same reasoning described in commit 2d46a44ff24173d2cf5ea2196360cb79470d49c7.

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/25025)

10 months agos390x: Fix HMAC digest detection
Ingo Franzki [Wed, 28 Aug 2024 12:56:33 +0000 (14:56 +0200)] 
s390x: Fix HMAC digest detection

Use EVP_MD_is_a() instead of EVP_MD_get_type() to detect the digest
type. EVP_MD_get_type() does not always return the expected NID, e.g.
when running in the FIPS provider, EVP_MD_get_type() returns zero,
causing to skip the HMAC acceleration path.

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

11 months agoImprove base64 BIO correctness and error reporting
Viktor Dukhovni [Wed, 21 Aug 2024 14:43:33 +0000 (00:43 +1000)] 
Improve base64 BIO correctness and error reporting

Also improve related documentation.

- The BIO_FLAGS_BASE64_NO_NL flag did not behave as advertised, only
  leading and trailing, but not internal, whitespace was supported:

      $ echo 'AA AA' | openssl base64 -A -d | wc -c
      0

- Switching from ignored leading input to valid base64 input misbehaved
  when the length of the skipped input was one more than the length of
  the second and subsequent valid base64 lines in the internal 1k
  buffer:

    $ printf '#foo\n#bar\nA\nAAA\nAAAA\n' | openssl base64 -d | wc -c
    0

- When the underlying BIO is retriable, and a read returns less than
  1k of data, some of the already buffered input lines that could have
  been decoded and returned were retained internally for a retry by the
  caller.  This is somewhat surprising, and the new code decodes as many
  of the buffered lines as possible.  Issue reported by Michał Trojnara.

- After all valid data has been read, the next BIO_read(3) should
  return 0 when the input was all valid or -1 if an error was detected.
  This now occurs in more consistently, but further tests and code
  refactoring may be needed to ensure this always happens.

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

11 months agofix: ossl_digest_get_approved_nid() returns NID_undef on invalid digest
Richard Levitte [Wed, 28 Aug 2024 14:36:31 +0000 (16:36 +0200)] 
fix: ossl_digest_get_approved_nid() returns NID_undef on invalid digest

We checked using 'md_nid < 0', which is faulty.

Impact: DSA and ECDSA signature provider implementations

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

11 months agoRefactor OpenSSL 'ECDSA' EVP_SIGNATURE to also include ECDSA+hash composites
Richard Levitte [Wed, 24 Jul 2024 20:07:32 +0000 (22:07 +0200)] 
Refactor OpenSSL 'ECDSA' EVP_SIGNATURE to also include ECDSA+hash composites

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