]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
6 months agofix X509_PURPOSE_add() to take |sname| as primary key and handle |id| in a backwd...
Dr. David von Oheimb [Fri, 20 Dec 2024 09:07:15 +0000 (10:07 +0100)] 
fix X509_PURPOSE_add() to take |sname| as primary key and handle |id| in a backwd compat way for new purpose

Fixes #25873

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

6 months agofix X509_PURPOSE_set() to support clearing the purpose requirement as needed for...
Dr. David von Oheimb [Fri, 20 Dec 2024 08:12:43 +0000 (09:12 +0100)] 
fix X509_PURPOSE_set() to support clearing the purpose requirement as needed for X509_VERIFY_PARAM_set_purpose()

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

6 months agoIf you call X509_add_cert with cert == NULL and the X509_ADD_FLAG_UP_REF
otherddn1978 [Thu, 26 Dec 2024 10:26:34 +0000 (13:26 +0300)] 
If you call X509_add_cert with cert == NULL and the X509_ADD_FLAG_UP_REF
flag, it will сrash to X509_up_ref.  Passing NULL here is not valid,
return 0 if cert == NULL.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/26267)

6 months agoFix documentation of OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION
Richard Levitte [Wed, 15 Jan 2025 09:14:41 +0000 (10:14 +0100)] 
Fix documentation of OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION

This drops OSSL_PKEY_PARAM_IMPLICIT_REJECTION - which is a meaningless
name - everywhere apart from still existing (for API stability, in
case someone uses that macro).

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

6 months agotest: aAissuingDistributionPoint X.509v3 extension
Jonathan M. Wilbur [Fri, 13 Dec 2024 06:52:25 +0000 (06:52 +0000)] 
test: aAissuingDistributionPoint X.509v3 extension

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

6 months agodoc: aAissuingDistributionPoint X.509v3 extension
Jonathan M. Wilbur [Fri, 13 Dec 2024 06:52:17 +0000 (06:52 +0000)] 
doc: aAissuingDistributionPoint X.509v3 extension

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

6 months agofeat: support the aAissuingDistributionPoint X.509v3 extension
Jonathan M. Wilbur [Fri, 13 Dec 2024 06:36:24 +0000 (06:36 +0000)] 
feat: support the aAissuingDistributionPoint X.509v3 extension

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

6 months agoSupport CLI and API setting of provider configuration parameters
Viktor Dukhovni [Thu, 16 Jan 2025 08:44:14 +0000 (19:44 +1100)] 
Support CLI and API setting of provider configuration parameters

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26427)

6 months agoWork around to get llvm-mingw working on aarch64
Alexandr Nedvedicky [Wed, 15 Jan 2025 15:41:33 +0000 (16:41 +0100)] 
Work around to get llvm-mingw working on aarch64

It looks like llvm-mingw tool chain does not understand `.previous` asm
directive (see https://sourceware.org/binutils/docs/as/Previous.html).
As a workaround for win64 flavor (llvm-mingw toolchain) we let xlate
to emit .text instead of emitting .previous.

We also need to revisit usage of win64 flavor here in aarch64. We should
perhaps introduce a mingw flavour on aarch64 as well. win assembly
flavour should be used for microsoft assembler.

Fixes #26415

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

6 months agoMove rodata to .rodata section for armv8
Alexey Moksyakov [Thu, 16 Jan 2025 11:21:30 +0000 (14:21 +0300)] 
Move rodata to .rodata section for armv8

Adds missing files where asm code is generated by
perl scripts and read only constant is used

PR #24137

closes #23312

Signed-off-by: Alexey Moksyakov <yavtuk@yandex.ru>
Reviewed-by: Saša Nedvědický <sashan@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/26440)

6 months agoMissing .gitignore entries
Dmitry Belyavskiy [Tue, 14 Jan 2025 20:24:16 +0000 (21:24 +0100)] 
Missing .gitignore entries

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26418)

6 months ago`atoi` should be allowed
Dmitry Belyavskiy [Tue, 14 Jan 2025 20:19:59 +0000 (21:19 +0100)] 
`atoi` should be allowed

When we compile with -O0 for Linux, the command
`./util/checkplatformsyms.pl ./util/platform_symbols/unix-symbols.txt ./libcrypto.so ./libssl.so`
complains to the lack of `atoi`

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

6 months agoprovider_deactivate(): Check return value of CRYPTO_atomic_add()
onexyoung [Mon, 23 Dec 2024 11:49:27 +0000 (14:49 +0300)] 
provider_deactivate(): Check return value of CRYPTO_atomic_add()

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

6 months agoWorkaround for RSA on AArch64 Big Endian
Nikolay Nikolaev [Tue, 24 Dec 2024 11:26:09 +0000 (13:26 +0200)] 
Workaround for RSA on AArch64 Big Endian

10646160125 introduced and optimized RSA NEON implementation
for AArch64 architecture, namely Cortex-A72 and Neoverse N1.
This implementation is broken in Big Endian mode, which is not
widely used, therefore not properly verified.
Here we disable this optimized implementation when Big Endian
platform is used.

Fixes: #22687
CLA: trivial

Signed-off-by: Nikolay Nikolaev <nicknickolaev@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/26257)

6 months agoRemove non-existing error code.
Peter Bierma [Sun, 12 Jan 2025 16:12:18 +0000 (11:12 -0500)] 
Remove non-existing error code.

CLA: trivial

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

6 months agoSynchronize openssl.txt with comperr.h
Peter Bierma [Sat, 11 Jan 2025 17:02:45 +0000 (12:02 -0500)] 
Synchronize openssl.txt with comperr.h

CLA: trivial

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

6 months agoFix dtls tests
Bernd Edlinger [Fri, 10 Jan 2025 07:45:20 +0000 (08:45 +0100)] 
Fix dtls tests

The dtls server process exits too early when the input
has an EOF condition.

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26374)

6 months agoRevert "Use open2 instead of open for s_server instance"
Bernd Edlinger [Thu, 9 Jan 2025 20:26:12 +0000 (21:26 +0100)] 
Revert "Use open2 instead of open for s_server instance"

This reverts commit 4439ed16c5742e5ffb0417d45677900e77b299f2.

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26374)

6 months agoRevert "chomp does not work on windows."
Bernd Edlinger [Thu, 9 Jan 2025 20:25:55 +0000 (21:25 +0100)] 
Revert "chomp does not work on windows."

This reverts commit 3e94e2b11d73ed22c601f818b31b7c4ca281f5d1.

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26374)

6 months agoRevert "Do not confuse TAP::Parser by mixing up stderr with stdout."
Bernd Edlinger [Thu, 9 Jan 2025 20:24:44 +0000 (21:24 +0100)] 
Revert "Do not confuse TAP::Parser by mixing up stderr with stdout."

This reverts commit 3d3bb26a13dcc67f99e66de6a44ae9ced117f64b.

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26374)

6 months agoCorrect documented KEM ids for OSSL_HPKE_str2suite
Tom Fay [Thu, 12 Dec 2024 09:38:54 +0000 (09:38 +0000)] 
Correct documented KEM ids for OSSL_HPKE_str2suite

CLA: trivial

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

6 months agoAdd a GitHub workflow to make a release
Dmitry Misharov [Thu, 10 Oct 2024 14:15:55 +0000 (16:15 +0200)] 
Add a GitHub workflow to make a release

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

6 months agogenpkey: Avoid leaving empty file if encryption passphrase does not match
shridhar kalavagunta [Thu, 28 Nov 2024 17:30:50 +0000 (11:30 -0600)] 
genpkey: Avoid leaving empty file if encryption passphrase does not match

Fixes #25440

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

6 months agoFix test failure in 30-test_evp_pkey_provided.t
Bernd Edlinger [Fri, 10 Jan 2025 18:58:46 +0000 (19:58 +0100)] 
Fix test failure in 30-test_evp_pkey_provided.t

In this test there is a random test output corruption.
`make test TESTS=test_evp_pkey_provided V=1` has some random output,
that can with a certain probability start a line with "ok" or so:

    # Setting up a OSSL_ENCODER context with passphrase
    # Testing with no encryption
jLixONcRPi/m64CGie4KKKDuGeTjtYwfima3BNYCGlgbLGeK3yYxBfZb9JjviOJ4
    # nHaNsRsONTAKyg==

This happens because large random data is output to bio_out
but some data remains buffered, and then test_note() is used to print
some comments on the bio_err file.  This causes output corruption that
confuses the TAP parser.
Fix that by flushing any pending output with test_flush_stdout() first.

Fixes #23992

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26383)

6 months agoBig and little-endian load and store support
Viktor Dukhovni [Fri, 10 Jan 2025 08:00:15 +0000 (19:00 +1100)] 
Big and little-endian load and store support

These are needed in ML-KEM and ML-DSA, and are likely generally useful,
so public.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26385)

6 months agoFinishing touch to perlasm update to make it work on OpenBSD
sashan [Mon, 29 Apr 2024 12:04:56 +0000 (14:04 +0200)] 
Finishing touch to perlasm update to make it work on OpenBSD

This changeset brings a finishing touch to stuff we got from botovoq@
Changes to `crypto/perlasm/arm-xlate.pl` deal with verious assembler
flavours to keep various assembler compilers happy.

We also need to keep original code for 32-bit flavour in
`crypto/aes/asm/aesv8-armx.pl`.

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

6 months agoMake it able to run asm code on OpenBSD (arm64)
Theo Buehler [Sun, 14 Apr 2024 23:23:36 +0000 (01:23 +0200)] 
Make it able to run asm code on OpenBSD (arm64)

In order to get asm code running on OpenBSD we must place
all constants into .rodata sections.

The change to crypto/perlasm/arm-xlate.pl adjusts changes
from Theo for additional assembler variants/flavours we
use for building OpenSSL.

Fixes #23312

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

6 months agodrbg: provide requested amount of entropy, rather than self-strength
Dimitri John Ledkov [Fri, 1 Nov 2024 14:16:18 +0000 (14:16 +0000)] 
drbg: provide requested amount of entropy, rather than self-strength

Parent DRBG can be seed source (os or jitter) and thus able to provide
unlimited entropy.

get_entropy is documented to provide at least the request amount of
entropy. If requested amount of entropy is same as, or less than
drbg->strength, everything is compliant. However, if requested entropy
is more than drbg->strength (unlikely, but possible), the returned
amount of entropy will be insufficient and additional repeated calls
to get_entropy will be required.

Reading history of refactors, it seems to me that this function call
previouslly had assumptions and usecases that couldn't ever request or
require more than strength amount of entropy.

If entropy is set, request that amount, otherwise request
drbg->strength amount.

Reviewed-by: Hugo Landau <hlandau@devever.net>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/25850)

6 months agoFix obvious misspelling of ASN1_VALUE
Tom Cosgrove [Tue, 10 Dec 2024 11:31:11 +0000 (11:31 +0000)] 
Fix obvious misspelling of ASN1_VALUE

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

6 months agoFix double 'the's
Tom Cosgrove [Thu, 5 Dec 2024 09:08:42 +0000 (09:08 +0000)] 
Fix double 'the's

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

6 months agoLoongArch: we should access global symbol by la.global instead of
Wang Xin [Wed, 8 Jan 2025 01:18:47 +0000 (01:18 +0000)] 
LoongArch: we should access global symbol by la.global instead of
la.pcrel

openssl will not be built successfully with binutils-2.43.50.20241230
which checks if global symbols are accessed by PC-relative in shared
library.

CLA: trivial

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

6 months agoFix premature reuse of qp's in rcu locks
Neil Horman [Fri, 10 Jan 2025 19:37:28 +0000 (14:37 -0500)] 
Fix premature reuse of qp's in rcu locks

An intermittent failure was noted on our new ppc64le CI runner, in which
what appeared to be a corrupted or invalid value getting returned from a
shared pointer under rcu protection

Investigation showed that the problem was with our small number of qp's
in a lock, and slightly incorrect accounting of the number of qp's
available we were prematurely recycling qp's, which led in turn to
premature completion of synchronization states, resulting in readers
reading memory that may have already been freed.

Fix it by:
a) Ensuring that we account for the fact that the first qp in an rcu
lock is allocated at the time the lock is created

and

b) Ensuring that we have a minimum number of 3 qp's:
1 that is free for write side allocation
1 that is in use by the write side currently
1 "next" qp that the read side can update while the prior qp is being
retired

With this change, the rcu threadstest runs indefinately in my testing

Fixes #26356

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26384)

6 months agoFix intermittent test failure in 80-test_cmp_http.t
Bernd Edlinger [Thu, 9 Jan 2025 14:14:15 +0000 (15:14 +0100)] 
Fix intermittent test failure in 80-test_cmp_http.t

output to stderr is unbuffered bypassing the normal output, which does
not happen at line boundaries and is therefore confusing the TAP parser.
This is known to cause random test failures like this one:

80-test_cmp_http.t                    (Wstat: 0 Tests: 5 Failed: 0)
  Parse errors: Tests out of sequence.  Found (6) but expected (5)
                Bad plan.  You planned 6 tests but ran 5.

Fixes #23992

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26363)

6 months agocoveralls.yml: Avoid excluding subdirectories of already excluded dirs
Tomas Mraz [Mon, 13 Jan 2025 13:24:22 +0000 (14:24 +0100)] 
coveralls.yml: Avoid excluding subdirectories of already excluded dirs

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26405)

6 months agospeed: Pass IV to EVP_CipherInit_ex for -evp runs with non-AEAD ciphers
Ingo Franzki [Wed, 8 Jan 2025 15:00:33 +0000 (16:00 +0100)] 
speed: Pass IV to EVP_CipherInit_ex for -evp runs with non-AEAD ciphers

Some (non-AEAD) ciphers require an IV to be used. Always pass a (dummy) IV
when setting the key. It is ignored by ciphers that do not use an IV.

Commit 607a46d003f472d4bce646f3df6e85725094d68a corrected the use of AEAD
ciphers, but removed the IV from being passed to EVP_CipherInit_ex() for
non-AEAD ciphers.

Fixes: https://github.com/openssl/openssl/commit/607a46d003f472d4bce646f3df6e85725094d68a
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Hugo Landau <hlandau@devever.net>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26346)

6 months agoTweak case of [fs] variant letter in SLH-DSA algorithms
Viktor Dukhovni [Thu, 9 Jan 2025 13:09:09 +0000 (00:09 +1100)] 
Tweak case of [fs] variant letter in SLH-DSA algorithms

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26359)

6 months agocoveralls.yml: Add --ignore-errors mismatch
Tomas Mraz [Fri, 10 Jan 2025 15:10:46 +0000 (16:10 +0100)] 
coveralls.yml: Add --ignore-errors mismatch

Once lcov is updated to 2.2 version or later, it could be dropped.

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

6 months agoPre-ML-KEM/DSA decoder/encoder refactor
Viktor Dukhovni [Thu, 9 Jan 2025 03:33:18 +0000 (14:33 +1100)] 
Pre-ML-KEM/DSA decoder/encoder refactor

Simplify some decoder/encoder internals to facilitate upcoming support
for ML-KEM and ML-DSA.

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

6 months agoFix buildinf.h generation for space and backslash
Kai Pastor [Sat, 4 Jan 2025 10:48:26 +0000 (11:48 +0100)] 
Fix buildinf.h generation for space and backslash

Builds may be configured with CC or CFLAGS containing space and
double quotes. In particular on Windows, this may lead to passing
more than two arguments into mkbuildinf.pl.
In addition, backslashes must be escaped for constructing the C string.

Fixes #26253.

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

6 months agoUpdate error codes in "crypto/err/openssl.txt"
Michael Baentsch [Tue, 7 Jan 2025 09:30:56 +0000 (10:30 +0100)] 
Update error codes in "crypto/err/openssl.txt"

Fixes #26316

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

6 months agoReplace self-hosted runners with GitHub hosted
Dmitry Misharov [Thu, 2 Jan 2025 14:32:41 +0000 (15:32 +0100)] 
Replace self-hosted runners with GitHub hosted

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

6 months agoFix memory leaks from missing checks of return value from sk_OPENSSL_STRING_push()
Frederik Wedel-Heinen [Sat, 21 Dec 2024 20:15:36 +0000 (21:15 +0100)] 
Fix memory leaks from missing checks of return value from sk_OPENSSL_STRING_push()

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26238)

6 months agoFix the use of OPENSSL_HTTP_PROXY / OPENSSL_HTTPS_PROXY
Richard Levitte [Wed, 8 Jan 2025 09:15:02 +0000 (10:15 +0100)] 
Fix the use of OPENSSL_HTTP_PROXY / OPENSSL_HTTPS_PROXY

Fixes #26337

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

6 months agoFix encryption level ordering
Neil Horman [Tue, 7 Jan 2025 14:12:03 +0000 (09:12 -0500)] 
Fix encryption level ordering

It was noticed recently that the enum for QUIC encryption levels doesn't
match the ordering that is outlined in the RFC.  RFC 9000 s. 12.2 and
RFC 9002 s 14.4.1 indicate that encryption level ordering is
INITIAL/0RTT/HANDSHAKE/1RTT, but our enum is in the order
INITAL/HANDSHAKE/0RTT/1RTT.

Our enum isn't a direct wire translation, so as long as the wire->enum
mapping done in ossl_quic_pkt_type_to_enc_level is done consistently it
ideally wouldn't matter, but because we do coalescing in
ossl_quic_tx_packetiser_generate by iterating through all the values in
the enum, its possible we may coalesce in the wrong order when we do
start implementing 0RTT support.

Fix it by adjusting the enum properly to match the RFC order.  This also
necessitates and adjustment to the archetypes array, which is a two
dimensional array indexed by encryption level and frame archetype
(PROBE/NORMAL/ACK ONLY).  Moving the 0RTT enc level to index 1 requires
moving the (formerly) index 2 0RTT array row to be at index 1.

Fixes #26324

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26334)

6 months agoFree data if sk_OPENSSL_STRING_push fails.
Frederik Wedel-Heinen [Fri, 20 Dec 2024 14:45:53 +0000 (15:45 +0100)] 
Free data if sk_OPENSSL_STRING_push fails.

Fixes #26203

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26227)

6 months agoReturn NULL from ossl_lib_ctx_get_concrete() when it is uninitialized
Frederik Wedel-Heinen [Sun, 5 Jan 2025 19:42:51 +0000 (20:42 +0100)] 
Return NULL from ossl_lib_ctx_get_concrete() when it is uninitialized

When default_context_inited is set to false we return NULL instead of
the global default context.

Fixes #25442

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

6 months agoAdded configuration for Embarcadero-Borland Clang Compiler 64 (BCC64)
Семенов Герман [Tue, 26 Mar 2024 11:06:57 +0000 (14:06 +0300)] 
Added configuration for Embarcadero-Borland Clang Compiler 64 (BCC64)

Signed-off-by: Герман Семенов <GermanAizek@yandex.ru>
Signed-off-by: Herman Semenov <GermanAizek@yandex.ru>
Reviewed-by: Hugo Landau <hlandau@devever.net>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23377)

6 months agoCheck returns of various sk_*_push functions
Frederik Wedel-Heinen [Sat, 21 Dec 2024 14:15:11 +0000 (15:15 +0100)] 
Check returns of various sk_*_push functions

Check returns of sk_POLICY_MAPPING_push, sk_GENERAL_NAME_push,
sk_ACCESS_DESCRIPTION_push, sk_X509_push, sk_X509_NAME_push,
sk_OPENSSL_CSTRING_push, sk_SCT_push, sk_DIST_POINT_push,
sk_OSSL_CMP_CRLSTATUS_push, sk_ASN1_UTF8STRING_push and
sk_ASN1_OBJECT_push and handle appropriately.

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26240)

6 months agoPass functions with correct signatures to the evp_generic_fetch_xxx methods
Frederik Wedel-Heinen [Sat, 4 Jan 2025 18:27:37 +0000 (19:27 +0100)] 
Pass functions with correct signatures to the evp_generic_fetch_xxx methods

UBSan complains about functions being called with incorrect signatures.
Relates to #22896

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

6 months agoFix a funding.json error
Matt Caswell [Mon, 6 Jan 2025 15:28:27 +0000 (15:28 +0000)] 
Fix a funding.json error

"Active" should be "active"

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/26327)

6 months agoSome PQ-related CSOR OIDs
Viktor Dukhovni [Mon, 6 Jan 2025 04:04:58 +0000 (15:04 +1100)] 
Some PQ-related CSOR OIDs

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26321)

6 months agoFix potential memory leak in PKCS12_add_key_ex()
Niels Dossche [Mon, 28 Oct 2024 16:04:03 +0000 (17:04 +0100)] 
Fix potential memory leak in PKCS12_add_key_ex()

p8 is allocated using EVP_PKEY2PKCS8(), but when PKCS8_add_keyusage()
fails this memory is not freed. Fix this by adding a call to
PKCS8_PRIV_KEY_INFO_free().

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Hugo Landau <hlandau@devever.net>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25818)

6 months agoFix a potential misaligned memory access
Bernd Edlinger [Thu, 2 Jan 2025 15:17:46 +0000 (16:17 +0100)] 
Fix a potential misaligned memory access

in test/wpackettest.c:593:18: runtime error: load of misaligned address
for type 'uint64_t', which requires 8 byte alignment.

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26269)

6 months agoFix the sporadic test failure in 30-test_evp_extra.t
Bernd Edlinger [Sun, 29 Dec 2024 15:43:34 +0000 (16:43 +0100)] 
Fix the sporadic test failure in 30-test_evp_extra.t

Fixes #26276

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26269)

6 months agoRun fuzz-checker workflow on ubuntu-24.04
Bernd Edlinger [Thu, 26 Dec 2024 15:30:16 +0000 (16:30 +0100)] 
Run fuzz-checker workflow on ubuntu-24.04

Fix missing afl++-clang package
Use clang-18
Configure ubsan with -fno-sanitize=function

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26269)

6 months agoFix test failure in 90-test_memleak.t
Bernd Edlinger [Fri, 27 Dec 2024 22:02:47 +0000 (23:02 +0100)] 
Fix test failure in 90-test_memleak.t

recent gcc versions can optimize the memory leak away,
avoid that by declaring the lost variable to be volatile.

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26269)

6 months agouse-of-uninitialized-value in quic_tserver_test
Bernd Edlinger [Fri, 27 Dec 2024 12:56:06 +0000 (13:56 +0100)] 
use-of-uninitialized-value in quic_tserver_test

Fixes #26277

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26269)

6 months agoFix a minor memory sanitizer issue
Bernd Edlinger [Thu, 26 Dec 2024 10:56:17 +0000 (11:56 +0100)] 
Fix a minor memory sanitizer issue

Here the undefined value "npa" passed to a function
WPACKET_sub_memcpy_u16(pkt, npa, npalen).
However the value is not really used, because "npalen" is zero,
but the call statememt itself is considered an invalid operation
by the new sanitizer.

The original sanitizer error report was:

==49175==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x55a276b29d6f in tls_construct_stoc_next_proto_neg /home/runner/work/openssl/openssl/ssl/statem/extensions_srvr.c:1518:21
    #1 0x55a276b15d7d in tls_construct_extensions /home/runner/work/openssl/openssl/ssl/statem/extensions.c:909:15
    #2 0x55a276b513dc in tls_construct_server_hello /home/runner/work/openssl/openssl/ssl/statem/statem_srvr.c:2471:10
    #3 0x55a276b2e160 in write_state_machine /home/runner/work/openssl/openssl/ssl/statem/statem.c:896:26
    #4 0x55a276b2e160 in state_machine /home/runner/work/openssl/openssl/ssl/statem/statem.c:490:21
    #5 0x55a276b2f562 in ossl_statem_accept /home/runner/work/openssl/openssl/ssl/statem/statem.c:309:12
    #6 0x55a276a9f867 in SSL_do_handshake /home/runner/work/openssl/openssl/ssl/ssl_lib.c:4890:19
    #7 0x55a276a9f605 in SSL_accept /home/runner/work/openssl/openssl/ssl/ssl_lib.c:2169:12
    #8 0x55a276a3d4db in create_bare_ssl_connection /home/runner/work/openssl/openssl/test/helpers/ssltestlib.c:1281:24
    #9 0x55a276a3d7cb in create_ssl_connection /home/runner/work/openssl/openssl/test/helpers/ssltestlib.c:1350:10
    #10 0x55a276a64c0b in test_npn /home/runner/work/openssl/openssl/test/sslapitest.c:12266:14
    #11 0x55a276b9fc20 in run_tests /home/runner/work/openssl/openssl/test/testutil/driver.c:377:21
    #12 0x55a276ba0b10 in main /home/runner/work/openssl/openssl/test/testutil/main.c:31:15

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26269)

6 months agoTry to work around the llvm-symbolizer failure
Bernd Edlinger [Fri, 27 Dec 2024 07:49:13 +0000 (08:49 +0100)] 
Try to work around the llvm-symbolizer failure

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26269)

6 months agoAdd __isoc23_strtol to unix-symbols.txt
Bernd Edlinger [Thu, 26 Dec 2024 20:02:58 +0000 (21:02 +0100)] 
Add __isoc23_strtol to unix-symbols.txt

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26269)

6 months agoAdd -fno-sanitize=function to ubsan
Bernd Edlinger [Wed, 16 Oct 2024 14:37:32 +0000 (16:37 +0200)] 
Add -fno-sanitize=function to ubsan

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26269)

6 months agoAdd linux ppc64le runner
Dmitry Misharov [Fri, 3 Jan 2025 14:56:23 +0000 (15:56 +0100)] 
Add linux ppc64le runner

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

6 months agoClean up ASN1_STRING comment and improve example in docs
Job Snijders [Tue, 17 Dec 2024 13:05:49 +0000 (13:05 +0000)] 
Clean up ASN1_STRING comment and improve example in docs

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

6 months agoadd multiplexing test for quic server to ci
Neil Horman [Tue, 17 Dec 2024 17:08:15 +0000 (12:08 -0500)] 
add multiplexing test for quic server to ci

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26199)

6 months ago80-test_cms.t: Fix incorrect plan from bad merge
Tomas Mraz [Mon, 6 Jan 2025 12:03:59 +0000 (13:03 +0100)] 
80-test_cms.t: Fix incorrect plan from bad merge

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26322)

6 months agoFix CMS encryption with key agreement when originator set
Jakub Zelenka [Fri, 13 Dec 2024 12:48:23 +0000 (13:48 +0100)] 
Fix CMS encryption with key agreement when originator set

OpenSSL currently does not support encryption with originator flag so it
should fail nicely instead of segfaulting.

Reviewed-by: Hugo Landau <hlandau@devever.net>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26014)

6 months agoFix originator cert leak in cms app
Jakub Zelenka [Fri, 13 Dec 2024 12:47:25 +0000 (13:47 +0100)] 
Fix originator cert leak in cms app

Reviewed-by: Hugo Landau <hlandau@devever.net>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26014)

6 months agoOptimize x86/aarch64 MD5 implementation
Jonathan Swinney [Fri, 18 Oct 2024 16:55:07 +0000 (11:55 -0500)] 
Optimize x86/aarch64 MD5 implementation

As suggested in https://github.com/animetosho/md5-optimisation?tab=readme-ov-file#dependency-shortcut-in-g-function,
we can delay the dependency on 'x' by recognizing that ((x & z) | (y & ~z))
is equivalent to ((x & z) + (y + ~z)) in this scenario, and we can perform
those additions independently, leaving our dependency on x to the final
addition. This speeds it up around 5% on both platforms.

Signed-off-by: Oli Gillespie <ogillesp@amazon.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Hugo Landau <hlandau@devever.net>
(Merged from https://github.com/openssl/openssl/pull/25737)

6 months agoopenssl-pkeyutl.pod.in: update from SHA-1 to SHA256, fixing default values and examples
Dr. David von Oheimb [Fri, 15 Nov 2024 07:49:33 +0000 (08:49 +0100)] 
openssl-pkeyutl.pod.in: update from SHA-1 to SHA256, fixing default values and examples

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

6 months agoopenssl-pkeyutl.pod.in: various fixes
Dr. David von Oheimb [Thu, 14 Nov 2024 08:43:21 +0000 (09:43 +0100)] 
openssl-pkeyutl.pod.in: various fixes

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

6 months agoapps/pkeyutl: Fix checks and documentation regarding -peerkey
Dr. David von Oheimb [Thu, 14 Nov 2024 08:28:16 +0000 (09:28 +0100)] 
apps/pkeyutl: Fix checks and documentation regarding -peerkey

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

6 months agoAdd a funding.json file
Matt Caswell [Mon, 23 Dec 2024 11:25:02 +0000 (11:25 +0000)] 
Add a funding.json file

For details about this file format see:
https://floss.fund/funding-manifest/

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Hugo Landau <hlandau@devever.net>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26247)

6 months agoCorrect return value documentation for X509V3_set_ctx()
Michael Baentsch [Wed, 1 Jan 2025 18:27:45 +0000 (19:27 +0100)] 
Correct return value documentation for X509V3_set_ctx()

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

6 months agoAvoid leaking memory when realloc fails
Frederik Wedel-Heinen [Sun, 22 Dec 2024 12:35:00 +0000 (13:35 +0100)] 
Avoid leaking memory when realloc fails

In ossl_property_merge() we can drop the realloc because it just makes
the allocation smaller.

In quic-hq-interop.c we check the realloc result.

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

6 months agotest: allowedAttributeAssignments X.509v3 extension
Jonathan M. Wilbur [Fri, 13 Dec 2024 07:00:58 +0000 (07:00 +0000)] 
test: allowedAttributeAssignments 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/26163)

6 months agodoc: the allowedAttributeAssignments X.509v3 extension
Jonathan M. Wilbur [Thu, 12 Dec 2024 14:52:37 +0000 (14:52 +0000)] 
doc: the allowedAttributeAssignments 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/26163)

6 months agofeat: support the allowedAttributeAssignments X.509v3 extension
Jonathan M. Wilbur [Thu, 12 Dec 2024 14:29:50 +0000 (14:29 +0000)] 
feat: support the allowedAttributeAssignments 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/26163)

6 months agoReject invalid FFDHE and ECDHE key shares with SSL_AD_ILLEGAL_PARAMETER alert
cx [Thu, 26 Sep 2024 03:27:14 +0000 (11:27 +0800)] 
Reject invalid FFDHE and ECDHE key shares with SSL_AD_ILLEGAL_PARAMETER alert

This changes the alert according to RFC 8446.

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

6 months agoFix potential memory leak in BIO_get_accept_socket()
Niels Dossche [Mon, 28 Oct 2024 15:34:55 +0000 (16:34 +0100)] 
Fix potential memory leak in BIO_get_accept_socket()

When BIO_parse_hostserv() fails it may still have allocated memory, yet
this memory is not freed. Fix it by jumping to the err label.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25817)

7 months agocore_namemap.c: Use OPENSSL_STRING instead of defining STRING type
Tomas Mraz [Fri, 20 Dec 2024 16:20:04 +0000 (17:20 +0100)] 
core_namemap.c: Use OPENSSL_STRING instead of defining STRING type

Also avoid leak if stack push fails.

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

7 months agoReduce the matrix fanout of interop runner
Neil Horman [Fri, 27 Dec 2024 12:41:30 +0000 (07:41 -0500)] 
Reduce the matrix fanout of interop runner

Recent test additions have increased the number of jobs spawned by the
interop runner test which exceeds the maximum allowed.

This occurs because the matrix expands to:
7 server elements
6 client elements
7 tests
2 test steps (client interop and server interop

Because of how github ci does matrix expansion, this results in
2 * 7 * 7 * 6 = 588

But most of those are invalid because each of the 2 steps only considers
either the client or server elements, and so get rerun multiple times

Alter the steps to be individual jobs, each with their own reduced
matrix to only run each relevant test once, limiting our job count to
at most 49 jobs.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26275)

7 months agoec_kem.c: Fix ikmlen check
Зишан Мирза [Tue, 24 Dec 2024 06:05:21 +0000 (11:05 +0500)] 
ec_kem.c: Fix ikmlen check

This makes `ikmlen` have a length of at least `Nsk`.

Closes #26213

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

7 months agoAdd a daily run-checker test for the TLS security level
Matt Caswell [Tue, 24 Dec 2024 09:34:27 +0000 (09:34 +0000)] 
Add a daily run-checker test for the TLS security level

Add a test to check that if the user reduces the default TLS security level
at configure time, then the tests still pass.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26256)

7 months agoEnsure the tests pass even if the default seclevel has been changed
Matt Caswell [Tue, 24 Dec 2024 09:29:07 +0000 (09:29 +0000)] 
Ensure the tests pass even if the default seclevel has been changed

The compile time default TLS security level can be changed if the user
sets `-DOPENSSL_TLS_SECURITY_LEVEL=x` at configure time (where "x" is some
number, typically 0 or 1).

Since OpenSSL 3.4 tests are failing if the default security level is 0. We
fix the tests for this case.

Fixes #26255

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26256)

7 months agoX509_ACERT_sign_ctx(): Remove superfluous reference
ryuishii [Thu, 5 Dec 2024 06:48:51 +0000 (15:48 +0900)] 
X509_ACERT_sign_ctx(): Remove superfluous reference

CLA: trivial

Fixes #26107

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

7 months agoAdd CMS_NO_SIGNING_TIME flag to CMS_sign(), CMS_add1_signer()
Peter Juhasz [Tue, 15 Jun 2021 23:23:27 +0000 (01:23 +0200)] 
Add CMS_NO_SIGNING_TIME flag to CMS_sign(), CMS_add1_signer()

Previously there was no way to create a CMS SignedData signature without a
signing time attribute, because CMS_SignerInfo_sign added it unconditionally.
However, there is a use case (PAdES signatures) where this attribute is not
allowed, so this commit introduces a new flag to the CMS API that causes this
attribute to be omitted at signing time.

Also add -no_signing_time option to cms command.

Fixes #15777

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

7 months agofix: ci failures due to symbols missing from history
Jonathan M. Wilbur [Mon, 23 Dec 2024 13:24:21 +0000 (13:24 +0000)] 
fix: ci failures due to symbols missing from history

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26250)

7 months agodoc: the attributeMappings X.509v3 extension
Jonathan M. Wilbur [Thu, 12 Dec 2024 03:05:54 +0000 (03:05 +0000)] 
doc: the attributeMappings X.509v3 extension

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

7 months agotest: the attributeMappings X.509v3 extension
Jonathan M. Wilbur [Thu, 12 Dec 2024 02:14:41 +0000 (02:14 +0000)] 
test: the attributeMappings X.509v3 extension

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

7 months agofeat: support the attributeMappings X.509v3 extension
Jonathan M. Wilbur [Thu, 12 Dec 2024 02:10:25 +0000 (02:10 +0000)] 
feat: support the attributeMappings X.509v3 extension

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

7 months agoTake into account no_store when pushing algorithm
Dmitry Belyavskiy [Wed, 18 Dec 2024 20:28:14 +0000 (21:28 +0100)] 
Take into account no_store when pushing algorithm

When we put algorithm to the store, we have a fallback to the
OSSL_LIB_CTX level store when store is NULL.

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

7 months agoThis is a test for nocache provider behavior
Dmitry Belyavskiy [Tue, 17 Dec 2024 15:18:37 +0000 (16:18 +0100)] 
This is a test for nocache provider behavior

A follow-up to #26038

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

7 months agoossl_i2c_ASN1_BIT_STRING(): Fix a possible heap buffer overflow
Andrey Tsygunka [Tue, 26 Nov 2024 07:53:31 +0000 (10:53 +0300)] 
ossl_i2c_ASN1_BIT_STRING(): Fix a possible heap buffer overflow

When data contains only zero values a buffer overflow happens.

CLA: trivial

Signed-off-by: Andrey Tsygunka <aitsygunka@yandex.ru>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26190)

7 months agosafe_math.h: Check if __GNUC__ is defined
Kalavakolanu, Hema Anmisha [Wed, 18 Dec 2024 05:19:55 +0000 (10:49 +0530)] 
safe_math.h: Check if __GNUC__ is defined

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4880

Facing the below issue after openssl is upgraded

Edk2\CryptoPkg\Library\OpensslLib\openssl\include\internal/safe_math.h(19):
warning C4668: '__GNUC__' is not defined as a preprocessor macro, replacing
with '0' for '#if/#elif'

CLA: trivial

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Kalavakolanu Hema Anmisha <hema.anmisha.kalavakolanu@intel.com>
Reviewed-by: Paul Dale <ppzgs1@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/26204)

7 months agotest_evp_cipher_pipeline(): Fix memory leaks on errors
Tomas Mraz [Wed, 18 Dec 2024 08:21:10 +0000 (09:21 +0100)] 
test_evp_cipher_pipeline(): Fix memory leaks on errors

Fixes Coverity 16368441636845

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26206)

7 months agodoc: Correctly reflect parameter constraints in EVP_DecryptUpdate()
Patrick J. LoPresti [Tue, 17 Dec 2024 23:46:04 +0000 (15:46 -0800)] 
doc: Correctly reflect parameter constraints in EVP_DecryptUpdate()

Fixes #26169

CLA: trivial

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

7 months agoFix missing HISTORY doc entries
Michael Baentsch [Mon, 16 Dec 2024 07:16:42 +0000 (08:16 +0100)] 
Fix missing HISTORY doc entries

Also add a check to find-doc-nits for HISTORY sections.

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

7 months agoAdd amplification limit test to interop quic testing
Neil Horman [Sat, 14 Dec 2024 20:56:22 +0000 (15:56 -0500)] 
Add amplification limit test to interop quic testing

Because this ci job only runs from the master branch, we need to add the
test here to validate that our server respects amplification limits in
our ci runs.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26181)

7 months agoCheck whether ctx->pctx != NULL
otherddn1978 [Fri, 13 Dec 2024 15:00:09 +0000 (18:00 +0300)] 
Check whether ctx->pctx != NULL

If it is NULL, ctx->pctx->pmeth dereference will cause a crash.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

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

7 months agodocs: update man3 and man7 with cipher pipeline APIs 26136/head
Ramkumar [Sun, 10 Nov 2024 17:50:04 +0000 (23:20 +0530)] 
docs: update man3 and man7 with cipher pipeline APIs

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