]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
2 months ago- adding rpki-client-portable repository as submodule
sashan [Tue, 27 May 2025 15:40:08 +0000 (17:40 +0200)] 
- adding rpki-client-portable repository as submodule

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

2 months ago- rpki external test
sashan [Mon, 2 Dec 2024 23:54:34 +0000 (00:54 +0100)] 
- rpki external test

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

2 months agoadd rpki-client external test
sashan [Fri, 29 Nov 2024 11:12:40 +0000 (12:12 +0100)] 
add rpki-client external test

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

2 months agoAdd generated cipher implementation files to gitignore
Daniel Frink [Thu, 29 May 2025 00:23:39 +0000 (19:23 -0500)] 
Add generated cipher implementation files to gitignore

A commit was merged recently which change ciphercommon.c and
cipher_chacha20_poly1305.c to be generated files. The corresponding
.c files were not added to the gitignore, so this commit adds them
to avoid them being erroneously tracked in the future.

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

2 months agoCleanup - this constant and functions are no longer in use
Dmitry Belyavskiy [Thu, 29 May 2025 11:38:29 +0000 (13:38 +0200)] 
Cleanup - this constant and functions are no longer in use

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

2 months agosslapitest: Add failing test for quic double free
Norbert Pocs [Wed, 28 May 2025 20:12:06 +0000 (22:12 +0200)] 
sslapitest: Add failing test for quic double free

The double free happened on the EVP_MD object, when we used external
quic implementation. This test makes the yield secret callback fail, to
make the kdfdigest free path happen.

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27713)

2 months agoquic_tls.c: Precede double free on EVP_MD variable
Norbert Pocs [Wed, 28 May 2025 14:28:54 +0000 (16:28 +0200)] 
quic_tls.c: Precede double free on EVP_MD variable

When external quic implementation is used, the variable is not used and
double free happens whe the yield_secret_cb fails.

Resolves: #27504

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27713)

2 months ago[design] Functions for explicitly fetched signature algorithms
Richard Levitte [Thu, 9 Nov 2023 09:42:25 +0000 (10:42 +0100)] 
[design] Functions for explicitly fetched signature algorithms

This design goes into more details what was outlined in the design for
[fetching composite (PKEY) algorithms and using them].

It also changes what functionality will be used for this.  The design for
signature was originally to add modified initializers for DigestSign and
DigestVerify, but recent OTC discussions redirected us to have a closer look
at EVP_PKEY_sign() and EVP_PKEY_verify().

[fetching composite (PKEY) algorithms and using them]:
    ./fetching-composite-algorithms.md

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

2 months agoDocument that FIPS provider cannot be used by multiple libcryptos
Tomas Mraz [Tue, 27 May 2025 09:36:31 +0000 (11:36 +0200)] 
Document that FIPS provider cannot be used by multiple libcryptos

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

2 months agotest/evp_test.c: Free fetched_digest on error to avoid memory leak
JiashengJiang [Sat, 17 May 2025 00:20:47 +0000 (20:20 -0400)] 
test/evp_test.c: Free fetched_digest on error to avoid memory leak

Call EVP_MD_free() to release fetched_digest if OPENSSL_zalloc() fails, preventing a memory leak.

Fixes: 2208ba56eb ("evp_test: Add the missing check after calling OPENSSL_malloc")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27648)

2 months agocrypto/property/property.c: Free impl->method to avoid memory leak
JiashengJiang [Fri, 16 May 2025 18:21:07 +0000 (14:21 -0400)] 
crypto/property/property.c: Free impl->method to avoid memory leak

After ossl_method_up_ref() succeeds, impl_free() should be called to free impl->method.

Fixes: 860ecfd ("property: check return values from the property locking
calls.")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27564)

2 months agoapps: lib: Prevent potential NULL dereference in init_client()
AntonMoryakov [Fri, 16 May 2025 14:19:21 +0000 (17:19 +0300)] 
apps: lib: Prevent potential NULL dereference in init_client()

apps: lib: Simplify ba_ret handling in init_client()

Simplify logic around ba_ret assignment:
- Fail early if ba_ret == NULL
- Assign directly otherwise, without checking *ba_ret

This avoids extra nesting and matches OpenSSL's conventions.

CLA: trivial
Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com>
Co-authored-by: Tomas Mraz <tomas@openssl.org>
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/26783)

2 months agoREADME.md: Improve links to GH workflow badges
operagxoksana [Sat, 10 May 2025 08:05:10 +0000 (11:05 +0300)] 
README.md: Improve links to GH workflow badges

CLA: trivial

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

2 months agoNote finished state in cipher BIO EOF
Viktor Dukhovni [Wed, 21 May 2025 15:33:03 +0000 (01:33 +1000)] 
Note finished state in cipher BIO EOF

When the cipher BIO encounters a non-retriable EOF (or error), mark the
state as "finished", else a subsequent BIO_flush() or attempted read may
attempt to finalise the crypto state again, and fail, leading, for
example, to users seeing erroneous apparent decryption failure.

This is not a new problem, the fix should be backported to all supported
releases.  It was made more apparent by recent changes to the base64
BIO, which returns a non-retriable EOF when padding is seen at the end
of the base64 data, even if the underlying next BIO is "retriable".

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

2 months agoAttempt to fix occasional failure of quicapi test in ci
Neil Horman [Tue, 27 May 2025 13:36:35 +0000 (09:36 -0400)] 
Attempt to fix occasional failure of quicapi test in ci

https://github.com/openssl/openssl/actions/runs/15214054228/job/42795224720

the theory I have for the cause of this failure is:

1. qtest_create_quic_connection_ex is called for the client
2. The client is in blocking mode, so we fall into the conditional on line 512
3. We create the server thread on line 519, which is non-blocking
4. The scheduler in the failing case, lets the server run ahead of the client
5. Server thread enters qtest_create_quic_connection_ex and iterates steps
   6-9 in the do_while loop starting on line 530
6. Server calls qtest_add_time
7. Server calls ossl_quic_tserver_tick
8. Server calls ossl_quic_tserver_is_term_any, received NULL return
9. Server calls qtest_wait_for_timeout
10. Eventually qtest_wait_for_timeout returns zero, adn the server jumps to
    the error label, returning zero to globservret, and the thread exits
11. Client thread regains the cpu, and attempts to call SSL_connect, which
    fails, as the server is no longer listening
12. We fall into the error case on line 556, and SSL_get_error returns
    SSL_ERROR_SSL, which causes clienterr to get set to 1
13. We exit the do{} while loop on line 581, and do the TEST_true check on
    line 593. The server having exited wait_for_thread returns true, but
    globserverret is still zero from step 10 above, and so the test fails

I can't prove this is the case, as the test only appears to fail in CI,
and we can't dump verbose logging there, lest we affect the timing of
the tests, so this is just a theory, but it seems to fit the
observations we have.

Attempting to fix this, by creating a thread interlock with a condition
variable that blocks the server from ticking the quic reactor until such
time as the client is about to call SSL_connect to prevent the race
condition

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

2 months agoDocument EVP_CIPHER failure for missing provider function
Norbert Pocs [Mon, 26 May 2025 08:08:06 +0000 (10:08 +0200)] 
Document EVP_CIPHER failure for missing provider function

When writing a new CIPHER implementation the OSSL_FUNC_cipher_get_params
must be present, otherwise the fetch fails. This behaviour is seen in
function evp_cipher_cache_constants@crypto/evp/evp_lib.c.

Resolves: #25801

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27696)

2 months agoapps/cmp.c: Free bio on error to avoid memory leak
JiashengJiang [Fri, 16 May 2025 22:34:03 +0000 (18:34 -0400)] 
apps/cmp.c: Free bio on error to avoid memory leak

Call BIO_free() to release bio if ASN1_i2d_bio_of() fails, preventing a memory leak.

Fixes: 6a3579e190 ("CMP: add support for requesting cert template using genm/genp")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27647)

2 months agoOSSL_CMP_MSG_http_perform(): Remove extraneous %s from debug log print
Tomas Mraz [Fri, 16 May 2025 09:08:37 +0000 (11:08 +0200)] 
OSSL_CMP_MSG_http_perform(): Remove extraneous %s from debug log print

Also add missing ":" to another log print.

Fixes #27634

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

2 months agocrypto/pkcs7/pk7_smime.c: Add BIO_free() to avoid memory leak
JiashengJiang [Thu, 22 May 2025 01:12:18 +0000 (21:12 -0400)] 
crypto/pkcs7/pk7_smime.c: Add BIO_free() to avoid memory leak

Add BIO_free() to free tmpout if OPENSSL_malloc() fails to avoid memory leak.

Fixes: 8e70485 ("RT3955: Reduce some stack usage")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27631)

2 months agoapps/pkeyutl.c: Add OPENSSL_free() to avoid a memory leak
JiashengJiang [Tue, 22 Apr 2025 13:03:44 +0000 (09:03 -0400)] 
apps/pkeyutl.c: Add OPENSSL_free() to avoid a memory leak

If EVP_PKEY_CTX_ctrl_str() fails, the code jumps to 'end' label without freeing passwd, causing a memory leak.

Fixes: 9d1bf5f7de ("Add option to read pkeyopts interactively")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27470)

2 months agotest: use EVP_PKEY_get_security_category function in tests
Pauli [Wed, 7 May 2025 02:15:45 +0000 (12:15 +1000)] 
test: use EVP_PKEY_get_security_category function in tests

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agodoc: document EVP_PKEY_get_security_category function
Pauli [Wed, 7 May 2025 02:10:48 +0000 (12:10 +1000)] 
doc: document EVP_PKEY_get_security_category function

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoadd EVP_PKEY_get_security_category to exported symbols
Pauli [Wed, 7 May 2025 02:10:28 +0000 (12:10 +1000)] 
add EVP_PKEY_get_security_category to exported symbols

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoevp: add EVP_PKEY_get_security_category function
Pauli [Wed, 7 May 2025 02:10:11 +0000 (12:10 +1000)] 
evp: add EVP_PKEY_get_security_category function

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoslh-dsa: add security category checks to evp_test data
Pauli [Tue, 6 May 2025 01:34:44 +0000 (11:34 +1000)] 
slh-dsa: add security category checks to evp_test data

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agorsa: add security category checks to evp_test data
Pauli [Tue, 6 May 2025 03:19:27 +0000 (13:19 +1000)] 
rsa: add security category checks to evp_test data

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoml-kem: add security category checks to evp_test data
Pauli [Tue, 6 May 2025 01:34:27 +0000 (11:34 +1000)] 
ml-kem: add security category checks to evp_test data

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoml-dsa: add security category checks to evp_test data
Pauli [Tue, 6 May 2025 01:34:08 +0000 (11:34 +1000)] 
ml-dsa: add security category checks to evp_test data

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoecx: add security category checks to evp_test data
Pauli [Tue, 6 May 2025 03:08:56 +0000 (13:08 +1000)] 
ecx: add security category checks to evp_test data

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoec: add security category checks to evp_test data
Pauli [Tue, 6 May 2025 03:40:55 +0000 (13:40 +1000)] 
ec: add security category checks to evp_test data

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agodsa: add security category checks to evp_test data
Pauli [Tue, 6 May 2025 03:57:06 +0000 (13:57 +1000)] 
dsa: add security category checks to evp_test data

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agodh: add security category checks to evp_test data
Pauli [Tue, 6 May 2025 03:19:10 +0000 (13:19 +1000)] 
dh: add security category checks to evp_test data

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoslh-dsa: add security category support
Pauli [Tue, 6 May 2025 01:33:34 +0000 (11:33 +1000)] 
slh-dsa: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agorsa: add security category support
Pauli [Tue, 6 May 2025 03:18:48 +0000 (13:18 +1000)] 
rsa: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoml-kem: add security category support
Pauli [Tue, 6 May 2025 01:33:14 +0000 (11:33 +1000)] 
ml-kem: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoml-dsa: add security category support
Pauli [Tue, 6 May 2025 01:32:48 +0000 (11:32 +1000)] 
ml-dsa: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoecx/ml-kem: add security category support
Pauli [Tue, 6 May 2025 03:34:33 +0000 (13:34 +1000)] 
ecx/ml-kem: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoecx: add security category support
Pauli [Tue, 6 May 2025 03:08:37 +0000 (13:08 +1000)] 
ecx: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoec: add security category support
Pauli [Tue, 6 May 2025 03:36:13 +0000 (13:36 +1000)] 
ec: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agodsa: add security category support
Pauli [Tue, 6 May 2025 03:51:39 +0000 (13:51 +1000)] 
dsa: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agodh: add security category support
Pauli [Tue, 6 May 2025 03:18:34 +0000 (13:18 +1000)] 
dh: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoevp_test: support security-category for public key operations
Pauli [Tue, 6 May 2025 01:32:21 +0000 (11:32 +1000)] 
evp_test: support security-category for public key operations

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agodoc: document the security category param for pkeys
Pauli [Tue, 6 May 2025 02:09:53 +0000 (12:09 +1000)] 
doc: document the security category param for pkeys

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoAdd security-category param name
Pauli [Tue, 6 May 2025 01:32:01 +0000 (11:32 +1000)] 
Add security-category param name

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoquic-interop-ci: Fix docker install
Norbert Pocs [Thu, 22 May 2025 12:39:21 +0000 (14:39 +0200)] 
quic-interop-ci: Fix docker install

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27687)

2 months agoAdd more instructions in HACKING.md
Richard Levitte [Wed, 21 May 2025 06:22:50 +0000 (08:22 +0200)] 
Add more instructions in HACKING.md

It's been long since it was updated or refined, and it was a bit too
vague in certain areas.

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

2 months agoAvoid leaking duplicated EVP_PKEY_CTX in case of error
Tomas Mraz [Thu, 22 May 2025 14:22:13 +0000 (16:22 +0200)] 
Avoid leaking duplicated EVP_PKEY_CTX in case of error

Fixes Coverity 1647946 1647947

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27686)

(cherry picked from commit 240228979b92b5f45d5c0a42997d86755c850001)

2 months agoFix memory leaks after failure of PKCS7_add_signed_attribute()
widneve [Tue, 20 May 2025 14:23:09 +0000 (16:23 +0200)] 
Fix memory leaks after failure of PKCS7_add_signed_attribute()

If PKCS7_add_signed_attribute fails,
seq never escapes out of the callee and will
therefore result in a memory leak.
This is similar to ed3d277127.

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

2 months agoUpdated Windows notes on the use of “no-makedepend” for new builds
klaus triendl [Sat, 12 Apr 2025 08:26:34 +0000 (11:26 +0300)] 
Updated Windows notes on the use of “no-makedepend” for new builds

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

2 months agoquic-interop-ci: Fix failing CI
Norbert Pocs [Wed, 21 May 2025 18:02:57 +0000 (20:02 +0200)] 
quic-interop-ci: Fix failing CI

The issue was a flaky "impossible to reach server" in the CI.

The issue was caused by introduction of indeterminism to docker
networking (docker engine v28.0) and docker compose is affected by that
since v2.33.1.

Using constant network interface names solves the issue. The
"interface_name" was introduced in docker compose v2.36.0.

Resolves: https://github.com/openssl/project/issues/1182

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27682)

2 months agoapps/x509.c: Fix the -addreject option adding trust instead of rejection
Tomas Mraz [Tue, 20 May 2025 14:34:10 +0000 (16:34 +0200)] 
apps/x509.c: Fix the -addreject option adding trust instead of rejection

Fixes CVE-2025-4575

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

2 months agoUpdate pkcs11-provider submodule
Ondrej Moris [Thu, 17 Apr 2025 02:17:41 +0000 (04:17 +0200)] 
Update pkcs11-provider submodule

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27602)

2 months agotest: reduce the scope of pkcs11-provider external test
Ondrej Moris [Wed, 16 Apr 2025 16:03:35 +0000 (18:03 +0200)] 
test: reduce the scope of pkcs11-provider external test

To ease maintenance and improve reliability of pkcs11-provider
external test we only want it to run with kryoptic token.

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27602)

2 months agotest: skip tlsfuzzer tests pkcs11-provider test
Ondrej Moris [Tue, 4 Mar 2025 05:36:56 +0000 (06:36 +0100)] 
test: skip tlsfuzzer tests pkcs11-provider test

Tlsfuzzer tests in pkcs11-provider external test currently uses hard-coded
lists of TLS 1.3 signature algorithms expected from openssl. However, openssl
neither promises a fixed default set of the signature algorithms nor promises
a fixed default ordering ofthese algorithms and hence test might fail
eventually even though there is nothing wrong anywhere.

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27602)

2 months agoci: run all non-external tests on fedora:latest
Ondrej Moris [Sat, 17 May 2025 23:03:09 +0000 (01:03 +0200)] 
ci: run all non-external tests on fedora:latest

Before pkcs11-provider external test runs, we run all
non-external tests since we want to make sure they work
fine on fedora:latest container.

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27602)

2 months agoci: run pkcs11-provider external test on Fedora
Ondrej Moris [Wed, 16 Apr 2025 16:03:24 +0000 (18:03 +0200)] 
ci: run pkcs11-provider external test on Fedora

We want to be able to run pkcs11-provider external test with
kryoptic token that is currently only available on Fedora.
Therefore we have to separate the test from the external test
for oqs provider.

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27602)

2 months agoci: re-enable pkcs11-provider external test
Ondrej Moris [Mon, 7 Apr 2025 14:31:38 +0000 (16:31 +0200)] 
ci: re-enable pkcs11-provider external test

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27602)

2 months agocrypto/evp/signature.c: add checks for consistent presence of 'update' and 'final...
Dr. David von Oheimb [Wed, 16 Apr 2025 04:20:23 +0000 (06:20 +0200)] 
crypto/evp/signature.c: add checks for consistent presence of 'update' and 'final' functions

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27367)

2 months agoprovider-signature.pod: add missing doc of OSSL_FUNC_signature_query_key_types()...
Dr. David von Oheimb [Mon, 14 Apr 2025 14:05:01 +0000 (16:05 +0200)] 
provider-signature.pod: add missing doc of OSSL_FUNC_signature_query_key_types(), fix doc of return types, etc.

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27367)

2 months agocrypto/evp/signature.c: add more specific diagnostic data in case provider does not...
Dr. David von Oheimb [Mon, 14 Apr 2025 14:03:00 +0000 (16:03 +0200)] 
crypto/evp/signature.c: add more specific diagnostic data in case provider does not implement functions needed

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27367)

2 months agocrypto/evp/signature.c: compensate for providers not adding error queue entries on...
Dr. David von Oheimb [Mon, 14 Apr 2025 14:01:30 +0000 (16:01 +0200)] 
crypto/evp/signature.c: compensate for providers not adding error queue entries on operation failure

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27367)

2 months agocrypto/evp: compensate for providers not adding error queue entries for keymgmt,...
Dr. David von Oheimb [Sun, 13 Apr 2025 05:25:46 +0000 (07:25 +0200)] 
crypto/evp: compensate for providers not adding error queue entries for keymgmt, sigver, and asymcipher

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27367)

2 months agostore_result.c: add to error queue which provider failed to load credential and hint...
Dr. David von Oheimb [Sun, 13 Apr 2025 05:28:08 +0000 (07:28 +0200)] 
store_result.c: add to error queue which provider failed to load credential and hint on using default provider

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27367)

2 months ago80-test_cms.t: Fix indentation by replacing tabs with spaces
Jan Luebbe [Thu, 8 May 2025 13:59:40 +0000 (15:59 +0200)] 
80-test_cms.t: Fix indentation by replacing tabs with spaces

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

2 months agoFix some typos in the man pages
Jan Luebbe [Fri, 9 May 2025 07:56:26 +0000 (09:56 +0200)] 
Fix some typos in the man pages

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

2 months agoThe condition that is never checked has been removed.
Dmitriy Denisov [Tue, 13 May 2025 08:56:33 +0000 (11:56 +0300)] 
The condition that is never checked has been removed.
If criterion == OSSL_STORE_SEARCH_BY_KEY_FINGERPRINT, the criterion !=0 condition will be triggered.

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

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

2 months agoCheck NASM version for {vex} prefix support
Zhiguo Zhou [Wed, 14 May 2025 14:30:47 +0000 (22:30 +0800)] 
Check NASM version for {vex} prefix support

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

2 months agoRemove redundant space in effective address
Zhiguo Zhou [Wed, 14 May 2025 12:39:01 +0000 (20:39 +0800)] 
Remove redundant space in effective address

To have effective address of vmovapd instruction recognized and
translated to Intel format by the x86_64 assembler translator.

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

2 months agoPick up {vex} in x86_64 assembler translator
Zhiguo Zhou [Wed, 14 May 2025 12:35:43 +0000 (20:35 +0800)] 
Pick up {vex} in x86_64 assembler translator

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

2 months agoapps/prime.c: Remove unused assignment
Norbert Pocs [Fri, 16 May 2025 09:09:51 +0000 (11:09 +0200)] 
apps/prime.c: Remove unused assignment

The variable is never read after the assignment.

Coverity issue: 1646789

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27636)

2 months agodemos/bio/sconnect.c: Free ssl_bio on error to avoid memory leak
JiashengJiang [Fri, 16 May 2025 13:37:48 +0000 (09:37 -0400)] 
demos/bio/sconnect.c: Free ssl_bio on error to avoid memory leak

Call BIO_free() to release ssl_bio if an error occurs before BIO_push(), preventing a memory leak.

Fixes: 396e720965 ("Fix certificate validation for IPv6 literals in sconnect demo")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27639)

2 months agocrypto/x509/v3_lib.c: Free tmpext if X509V3_EXT_add() fails to avoid memory leak
JiashengJiang [Mon, 5 May 2025 17:46:53 +0000 (13:46 -0400)] 
crypto/x509/v3_lib.c: Free tmpext if X509V3_EXT_add() fails to avoid memory leak

Add OPENSSL_free to free tmpext if X509V3_EXT_add() fails to avoid memory leak.

Fixes: 878dc8dd95 ("Join the x509 and x509v3 directories")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27566)

2 months agoWorkaround for issue with assembler on OS X 10.4
ztp6893 [Mon, 10 Mar 2025 04:00:48 +0000 (00:00 -0400)] 
Workaround for issue with assembler on OS X 10.4

Local labels cannot be used in some circumstances as they might
be pointing to wrong locations.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/27017)

2 months agoFix AIX build in test/radix/quic_tests.c
sashan [Fri, 11 Apr 2025 20:46:10 +0000 (22:46 +0200)] 
Fix AIX build in test/radix/quic_tests.c

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

2 months agoFix build failure on AIX
sashan [Fri, 11 Apr 2025 15:42:31 +0000 (17:42 +0200)] 
Fix build failure on AIX

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

2 months agossl/t1_lib.c: Free gix if sk_TLS_GROUP_IX_push() fails to avoid memory leak
JiashengJiang [Mon, 5 May 2025 18:07:54 +0000 (14:07 -0400)] 
ssl/t1_lib.c: Free gix if sk_TLS_GROUP_IX_push() fails to avoid memory leak

Add OPENSSL_free() to free gix if sk_TLS_GROUP_IX_push() fails to avoid memory leak

Fixes: 4b1c73d2dd ("ML-KEM hybrids for TLS")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27568)

2 months agodemos/guide/tls-client-block.c Spelling correction
Benson Muite [Tue, 13 May 2025 15:52:22 +0000 (18:52 +0300)] 
demos/guide/tls-client-block.c Spelling correction

Fix spelling error in one word.

CLA: trivial

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

2 months agos3_lib.c: Use illegal_parameter for failing encapsulation in ml_kem
Norbert Pocs [Thu, 15 May 2025 07:53:00 +0000 (09:53 +0200)] 
s3_lib.c: Use illegal_parameter for failing encapsulation in ml_kem

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

2 months agoFix trace output for provider algorithm names
Ilie Halip [Wed, 14 May 2025 14:40:21 +0000 (17:40 +0300)] 
Fix trace output for provider algorithm names

Use the index variable to print out the provider algorithm details.

CLA: trivial

Signed-off-by: Ilie Halip <ilie.halip@nxp.com>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27624)

2 months agoprime.c: Remove uneeded if check for NULL value
Norbert Pocs [Wed, 14 May 2025 13:52:56 +0000 (15:52 +0200)] 
prime.c: Remove uneeded if check for NULL value

This was reported by coverity scan issue 1646789

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27623)

2 months agocipher_chacha20_poly1305.c: Remove unneeded check
Norbert Pocs [Wed, 14 May 2025 13:59:24 +0000 (15:59 +0200)] 
cipher_chacha20_poly1305.c: Remove unneeded check

This iterates through the given param list which means the param p
should always be present in the given array.

Resolves coverity scan issue 1646880.

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27623)

2 months agoconfigutl.c: Resolve possible resource leak of config file
Norbert Pocs [Wed, 14 May 2025 12:50:42 +0000 (14:50 +0200)] 
configutl.c: Resolve possible resource leak of config file

The coverity detects Resource leak here. It may come to leak when the
option is passed multiple times.

Resolve coverity scan issue 1646846

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27623)

2 months agoconfigutl.c: Remove dead code
Norbert Pocs [Wed, 14 May 2025 12:53:31 +0000 (14:53 +0200)] 
configutl.c: Remove dead code

Resolve coverity issue 16468481646847

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27623)

2 months agoAdd NULL check in ossl_quic_get_peer_token
Neil Horman [Tue, 13 May 2025 14:48:05 +0000 (10:48 -0400)] 
Add NULL check in ossl_quic_get_peer_token

If a peer address hasn't been set on a quic channel yet, we will not
yield a token from our hashtable of available tokens.  Fail the
get_peer_token lookup in that event

Fixes #27608

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

2 months agos3_lib.c: Handle weak x keys as illegal_parameter alert
Norbert Pocs [Sun, 11 May 2025 15:36:05 +0000 (17:36 +0200)] 
s3_lib.c: Handle weak x keys as illegal_parameter alert

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

2 months agoAPPS/x509: add -multi option for outputting all certs found in input
Jeremy Doupe [Thu, 10 Apr 2025 15:19:31 +0000 (10:19 -0500)] 
APPS/x509: add -multi option for outputting all certs found in input

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

2 months agod2i_X509.pod: add missing doc of return value of i2d_ASN1_bio_stream()
Dr. David von Oheimb [Mon, 14 Apr 2025 09:20:18 +0000 (11:20 +0200)] 
d2i_X509.pod: add missing doc of return value of i2d_ASN1_bio_stream()

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

2 months agoasn_mime.c multi_split(): add missing I/O error checking
Dr. David von Oheimb [Mon, 14 Apr 2025 09:59:00 +0000 (11:59 +0200)] 
asn_mime.c multi_split(): add missing I/O error checking

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

2 months agoSMIME_text(): add missing I/O error checking
Dr. David von Oheimb [Mon, 14 Apr 2025 09:52:11 +0000 (11:52 +0200)] 
SMIME_text(): add missing I/O error checking

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

2 months agoSMIME_crlf_copy(): add missing I/O error checking
Dr. David von Oheimb [Mon, 14 Apr 2025 09:43:29 +0000 (11:43 +0200)] 
SMIME_crlf_copy(): add missing I/O error checking

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

2 months agoPEM_write_bio_ASN1_stream(): complete I/O error checking
Dr. David von Oheimb [Mon, 14 Apr 2025 09:22:30 +0000 (11:22 +0200)] 
PEM_write_bio_ASN1_stream(): complete I/O error checking

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

2 months agoapps/cms.c: add failure handling for I/O errors of 'BIO_printf(out, ...)'
Dr. David von Oheimb [Mon, 14 Apr 2025 09:10:52 +0000 (11:10 +0200)] 
apps/cms.c: add failure handling for I/O errors of 'BIO_printf(out, ...)'

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

2 months agoapps/cms.c: clarify treatment of 'ret' variable in cms_main()
Dr. David von Oheimb [Sun, 13 Apr 2025 08:00:15 +0000 (10:00 +0200)] 
apps/cms.c: clarify treatment of 'ret' variable in cms_main()

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

2 months agoapps/cms.c: remove needless ERR_print_errors() calls
Dr. David von Oheimb [Sun, 13 Apr 2025 07:59:07 +0000 (09:59 +0200)] 
apps/cms.c: remove needless ERR_print_errors() calls

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

2 months agoapps/cms.c: add missing error messages in various error cases
Dr. David von Oheimb [Sun, 13 Apr 2025 07:58:06 +0000 (09:58 +0200)] 
apps/cms.c: add missing error messages in various error cases

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

2 months agofix asn1_write_micalg() in asn_mime.c on GostR3411 and SHAKE, also return 0 on I...
Dr. David von Oheimb [Sun, 13 Apr 2025 15:21:27 +0000 (17:21 +0200)] 
fix asn1_write_micalg() in asn_mime.c on GostR3411 and SHAKE, also return 0 on I/O errors

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

2 months agoSMIME_write_ASN1_ex() used for CMS: add error checking for calls to BIO_printf()...
Dr. David von Oheimb [Sun, 13 Apr 2025 07:52:15 +0000 (09:52 +0200)] 
SMIME_write_ASN1_ex() used for CMS: add error checking for calls to BIO_printf(), BIO_puts(), and asn1_write_micalg()

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

2 months agoapps/cms.c: add missing error message on error writing CMS output (ret == 6)
Dr. David von Oheimb [Mon, 14 Apr 2025 18:08:54 +0000 (20:08 +0200)] 
apps/cms.c: add missing error message on error writing CMS output (ret == 6)

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

2 months agoReturn SLH-DSA public key when requested
Simo Sorce [Mon, 12 May 2025 18:40:29 +0000 (14:40 -0400)] 
Return SLH-DSA public key when requested

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27605)

2 months agoReturn ML-DSA public key when requested
Simo Sorce [Mon, 12 May 2025 18:39:58 +0000 (14:39 -0400)] 
Return ML-DSA public key when requested

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27605)