]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
5 months ago[vpsm4][aarch64] Move constant to .rodata section
Alexey Moksyakov [Thu, 23 Jan 2025 12:18:32 +0000 (15:18 +0300)] 
[vpsm4][aarch64] Move constant to .rodata section

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

5 months ago[sm3][aarch64] Move constant to .rodata section
Alexey Moksyakov [Wed, 22 Jan 2025 07:28:33 +0000 (10:28 +0300)] 
[sm3][aarch64] Move constant to .rodata section

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

5 months ago[poly1305][aarch64] Extend address range by adrp + add
Alexey Moksyakov [Wed, 22 Jan 2025 10:42:50 +0000 (13:42 +0300)] 
[poly1305][aarch64] Extend address range by adrp + add

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

5 months ago[bsaes][aarch64] Move constant to .rodata section
Alexey Moksyakov [Wed, 22 Jan 2025 08:42:54 +0000 (11:42 +0300)] 
[bsaes][aarch64] Move constant to .rodata section

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

5 months ago[chacha_sve][aarch64] Move constant to .rodata section
Alexey Moksyakov [Wed, 22 Jan 2025 08:01:42 +0000 (11:01 +0300)] 
[chacha_sve][aarch64] Move constant to .rodata section

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

5 months ago[sm4][aarch64] Move constant to .rodata section
Alexey Moksyakov [Tue, 21 Jan 2025 12:39:23 +0000 (15:39 +0300)] 
[sm4][aarch64] Move constant to .rodata section

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

5 months agoAddress coverity reports
Viktor Dukhovni [Tue, 11 Feb 2025 10:45:23 +0000 (21:45 +1100)] 
Address coverity reports

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

5 months agoossl_rand_ctx_new(): Use OPENSSL_strdup instead of strdup
Tomas Mraz [Wed, 5 Feb 2025 07:51:43 +0000 (08:51 +0100)] 
ossl_rand_ctx_new(): Use OPENSSL_strdup instead of strdup

Fixes Coverity 1642620

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

5 months agoX509_STORE_CTX_get1_issuer(): make happy path quicker again
Dr. David von Oheimb [Fri, 31 Jan 2025 15:03:34 +0000 (16:03 +0100)] 
X509_STORE_CTX_get1_issuer(): make happy path quicker again

Fixes #26588

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26600)

5 months agox509_vfy.c: refactor parameter of get0_best_issuer_sk() and adapt its use by build_ch...
Dr. David von Oheimb [Fri, 31 Jan 2025 13:38:53 +0000 (14:38 +0100)] 
x509_vfy.c: refactor parameter of get0_best_issuer_sk() and adapt its use by build_chain()

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26600)

5 months agohttp_client.c: fix error and default case handling in OSSL_HTTP_REQ_CTX_nbio() state...
Dr. David von Oheimb [Wed, 15 Jan 2025 17:12:22 +0000 (18:12 +0100)] 
http_client.c: fix error and default case handling in OSSL_HTTP_REQ_CTX_nbio() state machine

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

5 months agohttp_client.c: fix OSSL_HTTP_REQ_CTX_nbio() to return content on non-fatal HTTP statu...
Dr. David von Oheimb [Wed, 15 Jan 2025 19:13:00 +0000 (20:13 +0100)] 
http_client.c: fix OSSL_HTTP_REQ_CTX_nbio() to return content on non-fatal HTTP status code >=400

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

5 months agohttp_client.c: fix redirection in OSSL_HTTP_REQ_CTX_nbio() when non-ASN.1 content...
Dr. David von Oheimb [Wed, 15 Jan 2025 17:24:09 +0000 (18:24 +0100)] 
http_client.c: fix redirection in OSSL_HTTP_REQ_CTX_nbio() when non-ASN.1 content is expected

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

5 months agohttp_test.c: small beautifications
Dr. David von Oheimb [Wed, 15 Jan 2025 17:28:27 +0000 (18:28 +0100)] 
http_test.c: small beautifications

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

5 months agohttp_client.c: distinguish better between request/response header and body, in partic...
Dr. David von Oheimb [Wed, 25 Sep 2024 11:12:46 +0000 (13:12 +0200)] 
http_client.c: distinguish better between request/response header and body, in particular when tracing

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

5 months agohttp_client.c,OSSL_HTTP_REQ_CTX.pod,http.h: fixups for PR #23781 on max_response_hdr_...
Dr. David von Oheimb [Tue, 8 Oct 2024 06:16:25 +0000 (08:16 +0200)] 
http_client.c,OSSL_HTTP_REQ_CTX.pod,http.h: fixups for PR #23781 on max_response_hdr_lines

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

5 months agoremove parts of OSSL_HTTP_transfer.pod that are better described in OSSL_HTTP_transfe...
Dr. David von Oheimb [Mon, 7 Oct 2024 19:17:59 +0000 (21:17 +0200)] 
remove parts of OSSL_HTTP_transfer.pod that are better described in OSSL_HTTP_transfer.pod

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

5 months agoAdd documentation to explain DRBG changes
Simo Sorce [Fri, 7 Feb 2025 19:20:00 +0000 (14:20 -0500)] 
Add documentation to explain DRBG changes

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

5 months agoChange also other DRBG's algorithm fetching
Simo Sorce [Fri, 7 Feb 2025 16:21:51 +0000 (11:21 -0500)] 
Change also other DRBG's algorithm fetching

- DRBG_HASH
- DRBG_HMAC

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

5 months agoFilter provider should return proper provctx
Dmitry Belyavskiy [Wed, 5 Feb 2025 19:58:06 +0000 (20:58 +0100)] 
Filter provider should return proper provctx

...instead of the default one
Signed-off-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26542)

5 months agoPrefer DRBG ciphers from the same provider
Simo Sorce [Thu, 23 Jan 2025 16:01:39 +0000 (11:01 -0500)] 
Prefer DRBG ciphers from the same provider

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

5 months agotest/quicapitest.c: Increase timeout of test_fin_only_blocking to 40ms
Ingo Franzki [Mon, 10 Feb 2025 14:45:26 +0000 (15:45 +0100)] 
test/quicapitest.c: Increase timeout of test_fin_only_blocking to 40ms

Running this test on heavily loaded systems may cause the SSL_read_ex() to
take more than 20ms, due to concurrent workload.

Increase the timeout to 40ms to allow a little bit more time.

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

5 months agoAdd a test for configuring provider certs via config
Matt Caswell [Fri, 7 Feb 2025 11:53:59 +0000 (11:53 +0000)] 
Add a test for configuring provider certs via config

A bug existed where provider added cert algorithms caused a crash when
they were configured via a config file. We add a test for this scenario.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26663)

5 months agoFix configuring provider certificate algs via config file
Matt Caswell [Fri, 7 Feb 2025 12:11:41 +0000 (12:11 +0000)] 
Fix configuring provider certificate algs via config file

A crash could occur when attempting to configure a certificate via a
config file, where the algorithm for the certificate key was added
dynamically via a provider.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26663)

5 months agoEnable the quic-tls API to work, even in the case of no-quic
Matt Caswell [Fri, 3 Jan 2025 15:57:47 +0000 (15:57 +0000)] 
Enable the quic-tls API to work, even in the case of no-quic

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

5 months agoAdd a test for the quic-tls API
Matt Caswell [Wed, 21 Aug 2024 13:50:55 +0000 (14:50 +0100)] 
Add a test for the quic-tls API

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

5 months agoAdd a CHANGES.md entry
Matt Caswell [Wed, 21 Aug 2024 10:16:54 +0000 (11:16 +0100)] 
Add a CHANGES.md entry

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

5 months agoAdd documentation for the new third party QUIC stack API
Matt Caswell [Tue, 20 Aug 2024 15:19:10 +0000 (16:19 +0100)] 
Add documentation for the new third party QUIC stack API

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

5 months agoAdd an API for other QUIC stacks to use our TLS implementation
Matt Caswell [Tue, 20 Aug 2024 14:09:17 +0000 (15:09 +0100)] 
Add an API for other QUIC stacks to use our TLS implementation

We provide some callbacks for third party QUIC stacks to use in order
to be able to reuse the OpenSSL TLS implementation in that stack. This is
essentially a thin wrapper around the same API that OpenSSL's own QUIC
stack uses in order to integrate TLS.

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

5 months agoAvoid calling ssl_load_sigalgs in tls1_set_sigalgs_list
Viktor Dukhovni [Sat, 8 Feb 2025 06:05:20 +0000 (17:05 +1100)] 
Avoid calling ssl_load_sigalgs in tls1_set_sigalgs_list

- The signature algorithms are already loaded in SSL_CTX_new()

- Calling ssl_load_sigalgs() again is non-productive, and does
  not look thread safe.

- And of course avoiding the call is cheaper.

- Also fix broken loop test in ssl_cert_lookup_by_pkey()

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

5 months agoUpdate CHANGES and NEWS for security release
Neil Horman [Tue, 11 Feb 2025 13:36:29 +0000 (08:36 -0500)] 
Update CHANGES and NEWS for security release

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
5 months agoUse ERR marks also when verifying server X.509 certs
Viktor Dukhovni [Thu, 19 Dec 2024 17:26:20 +0000 (04:26 +1100)] 
Use ERR marks also when verifying server X.509 certs

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
5 months agoWith SSL_VERIFY_PEER client RPK should abort on X509 error
Viktor Dukhovni [Thu, 19 Dec 2024 17:25:15 +0000 (04:25 +1100)] 
With SSL_VERIFY_PEER client RPK should abort on X509 error

While RPK performs X.509 checks correctly, at the SSL layer the
SSL_VERIFY_PEER flag was not honoured and connections were allowed to
complete even when the server was not verified.  The client can of
course determine this by calling SSL_get_verify_result(), but some
may not know to do this.

Added tests to make sure this does not regress.

Fixes CVE-2024-12797

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
5 months agoAdd support for multiple key shares
Dave Kelsey [Thu, 16 Jan 2025 15:10:41 +0000 (15:10 +0000)] 
Add support for multiple key shares

This PR is the implementation of concluded discussion that occurred in a
draft PR #25605. This changes were mainly authored by @martinschmatz
with some contribution from myself.

It addresses issue #21633

This extends the group list definition to support a more complex
definition while still retaining backward compatibility with the simple
form of colon separated groups.

Details of the agreed format and expected behaviour can be found in
#25605 and in the documentation changes.

Signed-off-by: Dave Kelsey <d_kelsey@uk.ibm.com>
Reviewed-by: Viktor Dukhovni <viktor@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/26445)

5 months agoRevise CHANGES.md
Zhiguo Zhou [Mon, 10 Feb 2025 06:50:09 +0000 (14:50 +0800)] 
Revise CHANGES.md

The performance impact on Intel Sierra Forest is documented.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25751)

5 months agoRemove unnecessary flag clearance in crypto/x86_64cpuid.pl
Zhiguo Zhou [Mon, 20 Jan 2025 06:39:48 +0000 (14:39 +0800)] 
Remove unnecessary flag clearance in crypto/x86_64cpuid.pl

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25751)

5 months agoFix the checks of factor_size/modulus_bitsize
Zhiguo Zhou [Mon, 20 Jan 2025 03:29:50 +0000 (11:29 +0800)] 
Fix the checks of factor_size/modulus_bitsize

The factor_size/modulus_bitsize are required to be 1024/1536/2048.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25751)

5 months agoDual 1024/1536/2048-bit exponentiation optimization for Intel Sierra Forest CPU
Zhiguo Zhou [Mon, 6 Jan 2025 14:05:55 +0000 (22:05 +0800)] 
Dual 1024/1536/2048-bit exponentiation optimization for Intel Sierra Forest CPU

It optimizes the RSA-2k/3k/4k via the AVXIFMA ISA on Sierra Forest.
The performance improvements of 1.8x-2.2x are observed in the speed
tests of sign and decryption operations on this CPU.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25751)

5 months agoadd workflow dispatch inputs into coveralls workflow
Dmitry Misharov [Wed, 5 Feb 2025 09:11:55 +0000 (10:11 +0100)] 
add workflow dispatch inputs into coveralls workflow

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/26645)

5 months agoFix compile error when building VC-WIN64-CLANGASM-ARM target
Auto Vincent [Thu, 30 Jan 2025 18:03:49 +0000 (18:03 +0000)] 
Fix compile error when building VC-WIN64-CLANGASM-ARM target

With MSVC v143, C++ Clang Compiler for Windows (18.1.8) there are
many errors similar to:

crypto\aes\libcrypto-lib-aesv8-armx.obj.asm:3795:7: error: unknown token in expression
        ld1     {v2.16b},[x0],#16

CLA: trivial

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

5 months agoperlasm: Replace .previous with the actual previous section
sashan [Wed, 29 Jan 2025 09:57:14 +0000 (10:57 +0100)] 
perlasm: Replace .previous with the actual previous section

Older versions of darwin (10.8 and earlier) don't understand .previous.
this tweak emits the previous section directive which preceeds the
rodata (for example .text) instead of using .previous. We use the
same for mingw.

Fixes #26447

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

5 months agochanges: add note about the new provider random hook
Pauli [Mon, 3 Feb 2025 12:01:57 +0000 (23:01 +1100)] 
changes: add note about the new provider random hook

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/24498)

5 months agolibcrypto.num: add RAND_set1_random_provider function
Pauli [Wed, 16 Oct 2024 22:02:31 +0000 (09:02 +1100)] 
libcrypto.num: add RAND_set1_random_provider function

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/24498)

5 months agostyle: fix style problems
Pauli [Mon, 5 Aug 2024 00:41:28 +0000 (10:41 +1000)] 
style: fix style problems

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/24498)

5 months agoAdd test case for RAND_set1_random_provider() call
Pauli [Thu, 30 May 2024 02:08:51 +0000 (12:08 +1000)] 
Add test case for RAND_set1_random_provider() call

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/24498)

5 months agodocument provider random bypass ability
Pauli [Mon, 27 May 2024 04:26:45 +0000 (14:26 +1000)] 
document provider random bypass ability

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/24498)

5 months agodocument internal ossl_provider_random_bytes rand funtion
Pauli [Mon, 27 May 2024 04:26:25 +0000 (14:26 +1000)] 
document internal ossl_provider_random_bytes rand funtion

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/24498)

5 months agoAdd support for random provider
Pauli [Thu, 23 May 2024 02:14:47 +0000 (12:14 +1000)] 
Add support for random provider

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/24498)

5 months agoDocument random_provider option in random section
Pauli [Thu, 23 May 2024 02:13:46 +0000 (12:13 +1000)] 
Document random_provider option in random section

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/24498)

5 months agoDocument RAND_set1_random_provider() API
Pauli [Wed, 22 May 2024 03:23:35 +0000 (13:23 +1000)] 
Document RAND_set1_random_provider() API

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/24498)

5 months agoAdd RAND_set1_random_provider() API
Pauli [Wed, 22 May 2024 03:23:16 +0000 (13:23 +1000)] 
Add RAND_set1_random_provider() API

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/24498)

5 months agoAdd a new provider API to generate random numbers.
Pauli [Tue, 21 May 2024 04:56:32 +0000 (14:56 +1000)] 
Add a new provider API to generate random numbers.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/24498)

5 months agoResolve undefined behaviour in wpacket test
Pauli [Mon, 27 May 2024 03:37:41 +0000 (13:37 +1000)] 
Resolve undefined behaviour in wpacket test

There is no necessity for rand_data to be aligned so that it can be
directly dereferenced as a uint64_t.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/24498)

5 months ago80-test_cmp_http.t: on test failures also print failed client invocations
Dr. David von Oheimb [Thu, 30 Jan 2025 08:06:41 +0000 (09:06 +0100)] 
80-test_cmp_http.t: on test failures also print failed client invocations

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26589)

5 months ago80-test_cmp_http.t: on test failures print Mock server STDERR output
Dr. David von Oheimb [Wed, 29 Jan 2025 17:59:49 +0000 (18:59 +0100)] 
80-test_cmp_http.t: on test failures print Mock server STDERR output

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26589)

5 months ago80-test_cmp_http_data/Mock/test.cnf: further relax total_timeout as workaround for...
Dr. David von Oheimb [Wed, 29 Jan 2025 07:18:40 +0000 (08:18 +0100)] 
80-test_cmp_http_data/Mock/test.cnf: further relax total_timeout as workaround for heavily loaded test systems

Fixes #26577

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26584)

6 months agoUse ASN1_INTEGER_get_int64() in ossl_serial_number_print()
Kazuki Yamaguchi [Sat, 25 Jan 2025 08:31:31 +0000 (17:31 +0900)] 
Use ASN1_INTEGER_get_int64() in ossl_serial_number_print()

A -1 return from ASN1_INTEGER_get() indicates both success and error.
Our man page calls out this ambiguity. Use ASN1_INTEGER_get_int64()
instead, which has a better error reporting and also a platform
independent behavior with respect to sizeof(long).

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

6 months agoFix pretty-printing empty serial number in ossl_serial_number_print()
Kazuki Yamaguchi [Sat, 25 Jan 2025 08:31:16 +0000 (17:31 +0900)] 
Fix pretty-printing empty serial number in ossl_serial_number_print()

Fix a crash when the ASN1_INTEGER has empty content. While it is
illegal, this is the initial state of the serialNumber field when an
X509 object is allocated by X509_new(). X509_print*() should be able to
process an incomplete X509 object too.

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

6 months agoEVP_DigestSign(): Check pctx != NULL
Bartel Artem [Fri, 24 Jan 2025 07:21:03 +0000 (10:21 +0300)] 
EVP_DigestSign(): Check pctx != NULL

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

6 months ago[providers/implementations/ciphers] make aes-gcm-siv work with zero-length messages
Billy Brumley [Thu, 23 Jan 2025 13:57:24 +0000 (08:57 -0500)] 
[providers/implementations/ciphers] make aes-gcm-siv work with zero-length messages

test cases lifted from RFC 8452

fixes #26431

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

6 months agoOpen pem files in binary mode
Josh Cooper [Wed, 16 Oct 2024 22:06:16 +0000 (15:06 -0700)] 
Open pem files in binary mode

In order to avoid an MSVCRT bug affecting ftell and text mode[1], open PEM files
in binary mode. The PEM parser already handles CRLF translation[2].

[1] https://github.com/openssl/openssl/commit/8300a8742b2abc487594a09b5e6ee726dbd30771
[2] https://github.com/openssl/openssl/pull/24249#issuecomment-2192025429

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

6 months agoRevert "Work around Windows ftell() bug as per Microsoft engineering's suggestion"
Josh Cooper [Wed, 16 Oct 2024 19:24:03 +0000 (12:24 -0700)] 
Revert "Work around Windows ftell() bug as per Microsoft engineering's suggestion"

This reverts commit 8300a8742b2abc487594a09b5e6ee726dbd30771.

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

6 months agoClarify docs of EVP_CIPHER*_get_block_size
Viktor Dukhovni [Sun, 26 Jan 2025 06:02:31 +0000 (17:02 +1100)] 
Clarify docs of EVP_CIPHER*_get_block_size

Also, tolerate NULL input ctx, just like NULL cipher.

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

6 months agoossl_provider_prov_ctx is redundant
Viktor Dukhovni [Mon, 27 Jan 2025 02:44:55 +0000 (13:44 +1100)] 
ossl_provider_prov_ctx is redundant

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

6 months agoAdd version field check to PKCS8 decoder
Michael Baentsch [Sat, 18 Jan 2025 08:58:33 +0000 (09:58 +0100)] 
Add version field check to PKCS8 decoder

Fixes #26459

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

6 months agoExpanding trace of providers algorithms fetching/caching/etc
Dmitry Belyavskiy [Thu, 23 Jan 2025 16:27:31 +0000 (17:27 +0100)] 
Expanding trace of providers algorithms fetching/caching/etc

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

6 months agoAdd function X509_VERIFY_PARAM_get_purpose()
Rajeev Ranjan [Tue, 5 Nov 2024 13:26:29 +0000 (14:26 +0100)] 
Add function X509_VERIFY_PARAM_get_purpose()

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

6 months agoCMP: add support for central key generation
Rajeev Ranjan [Wed, 29 May 2024 16:19:29 +0000 (18:19 +0200)] 
CMP: add support for central key generation

- add testcase for central keygen
- add documentation

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

6 months agoFixes some memory leaks when errors occur in ossl_cmp_rp_new().
Frederik Wedel-Heinen [Sat, 21 Dec 2024 14:32:32 +0000 (15:32 +0100)] 
Fixes some memory leaks when errors occur in ossl_cmp_rp_new().

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

6 months agoAlso expose an accessor for a single string provider config property
Viktor Dukhovni [Fri, 24 Jan 2025 01:52:25 +0000 (12:52 +1100)] 
Also expose an accessor for a single string provider config property

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

6 months agoExclude amplificationlimit test with mvfst client
Neil Horman [Thu, 23 Jan 2025 14:06:09 +0000 (09:06 -0500)] 
Exclude amplificationlimit test with mvfst client

The amplificationlimit interop test is failing currently with our
server.

However, based on the global nightly runs here:
https://github.com/openssl/openssl/actions/runs/12860128783/job/35851614148

it appears to be failing in all test cases.

Some analysis indicates that the client appears to abort operations
early during frame loss in this test.

As such just exclude the combination of this test and client.  Re-add it
later if it ever becomes functional

Fixes openssl/project#1062

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

6 months agoFix magic + 20 in PEM_ASN1_write_bio
Sean Kannanaikal [Wed, 22 Jan 2025 12:38:47 +0000 (07:38 -0500)] 
Fix magic + 20 in PEM_ASN1_write_bio

Fixes #26476

In the file crypto/pem/pem_lib.c the function had a +20 to account for
padding in the data size, however this was recognized to not be up to
standard quality. Instead it has now been updated to use the static
maximum block size and uses that for the calculation as opposed to a +20.

CLA: trivial

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

6 months agoFix passing struct by value rather than by reference to syscall
Mae [Wed, 22 Jan 2025 16:54:43 +0000 (16:54 +0000)] 
Fix passing struct by value rather than by reference to syscall

Fixes #26521

CLA: trivial

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

6 months agotemplate_kem.c: Use proper printf format for size_t
Tomas Mraz [Wed, 22 Jan 2025 16:40:44 +0000 (17:40 +0100)] 
template_kem.c: Use proper printf format for size_t

Fixes Coverity 1633351163335216333541633355

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

6 months agotemplate_kem.c: Check outlen before dereferencing it
Tomas Mraz [Wed, 22 Jan 2025 15:55:35 +0000 (16:55 +0100)] 
template_kem.c: Check outlen before dereferencing it

Fixes Coverity 163335316333561633357

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

6 months agoCheck returns of sk_X509_CRL_push and handle appropriately.
Frederik Wedel-Heinen [Fri, 20 Dec 2024 20:05:59 +0000 (21:05 +0100)] 
Check returns of sk_X509_CRL_push and handle appropriately.

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

6 months agoExpose the provider `c_get_params` function via PROV_CTX.
Viktor Dukhovni [Thu, 23 Jan 2025 04:42:14 +0000 (15:42 +1100)] 
Expose the provider `c_get_params` function via PROV_CTX.

This applies to the base, default and FIPS providers, could be added in
principle also to the legacy provider, but there's no compelling reason
to do that at the moment.

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

6 months agoDon't lose config infopairs of built-in providers
Viktor Dukhovni [Wed, 22 Jan 2025 15:43:53 +0000 (02:43 +1100)] 
Don't lose config infopairs of built-in providers

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

6 months agoos-zoo.yml: Add linux-s390x runner
Dmitry Misharov [Mon, 20 Jan 2025 08:19:48 +0000 (09:19 +0100)] 
os-zoo.yml: Add linux-s390x runner

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

6 months agoFix data race in asn1_str2tag() on tntmp which was accidentally made static
Stas Cymbalov [Tue, 21 Jan 2025 13:42:19 +0000 (16:42 +0300)] 
Fix data race in asn1_str2tag() on tntmp which was accidentally made static

Variables tntmp and tnst are declared in the same declaration and thus
share storage class specifiers (static). This is unfortunate as tntmp is
used during iteration through tnst array and shouldn't be static.
In particular this leads to two problems that may arise when multiple
threads are executing asn1_str2tag() concurrently:
1. asn1_str2tag() might return value that doesn't correspond to tagstr
   parameter. This can happen if other thread modifies tntmp to point to
   a different tnst element right after a successful name check in the
   if statement.
2. asn1_str2tag() might perform an out-of-bounds read of tnst array.
   This can happen when multiple threads all first execute tntmp = tnst;
   line and then start executing the loop. If that case those threads
   can end up incrementing tntmp past the end of tnst array.

CLA: trivial

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

6 months agoeddsa_signverify_init(): Avoid memory leak on error
Tomas Mraz [Tue, 21 Jan 2025 13:42:28 +0000 (14:42 +0100)] 
eddsa_signverify_init(): Avoid memory leak on error

Add missing WPACKET_cleanup() call.
Fixes Coverity 1638693

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/26500)

6 months agomac_legacy_kmgmt.c: Avoid possible memory leak on error
Tomas Mraz [Tue, 21 Jan 2025 13:38:23 +0000 (14:38 +0100)] 
mac_legacy_kmgmt.c: Avoid possible memory leak on error

Use mac_gen_cleanup() instead of just freeing the gctx.
Fixes Coverity 1638702

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/26500)

6 months agotest_kdf_scrypt(): Test resetting the KDF context
Tomas Mraz [Mon, 20 Jan 2025 08:16:30 +0000 (09:16 +0100)] 
test_kdf_scrypt(): Test resetting the KDF context

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/26488)

6 months agokdf_scrypt_reset(): NULLify freed pointers
Tomas Mraz [Mon, 20 Jan 2025 07:53:21 +0000 (08:53 +0100)] 
kdf_scrypt_reset(): NULLify freed pointers

Otherwise doublefree happens with further usage.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/26488)

6 months agoscrypt: Do not free the context itself when fetch fails
Tomas Mraz [Mon, 20 Jan 2025 07:50:48 +0000 (08:50 +0100)] 
scrypt: Do not free the context itself when fetch fails

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/26488)

6 months agoconfig.pod: Fix typo
Alexander Heinlein [Tue, 21 Jan 2025 07:34:53 +0000 (08:34 +0100)] 
config.pod: Fix typo

CLA: trivial

Signed-off-by: Alexander Heinlein <alexander.heinlein@web.de>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26497)

6 months agoRefactor MAKE_ENCODER in providers/implementations/encode_decode/encode_key2any.c
Richard Levitte [Thu, 9 Jan 2025 13:36:20 +0000 (14:36 +0100)] 
Refactor MAKE_ENCODER in providers/implementations/encode_decode/encode_key2any.c

It took a parameter 'evp_type', which isn't used.  The comment describing
it mentions a future refactoring, but it appears that this has already
happened.

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

6 months agoGive DTLS tests more time to complete
Bernd Edlinger [Tue, 21 Jan 2025 15:12:18 +0000 (16:12 +0100)] 
Give DTLS tests more time to complete

Increase the timeout for DTLS tests to 10 seconds.
But do that only for DTLS as this would waste time
for other tests, most of the TLS tests do not need
this at all.

Fixes #26491

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

6 months agoapps/cms.c: Cleanup for dead assignment to argc
Alex Prabhat Bara [Fri, 27 Dec 2024 06:37:11 +0000 (12:07 +0530)] 
apps/cms.c: Cleanup for dead assignment to argc

CLA: trivial

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

6 months agorcu: Ensure that updates to the ID field of a qp don't lose refs
Neil Horman [Sun, 19 Jan 2025 21:43:37 +0000 (16:43 -0500)] 
rcu: Ensure that updates to the ID field of a qp don't lose refs

ppc64le occasionally still fails the threadstest on __rcu_torture

From several days of debugging, I think I've landed on the problem.

Occasionally, under high load I observe the following pattern

CPU0                                     CPU1
update_qp                                get_hold_current_qp
  atomic_and_fetch(qp->users, ID_MASK, RELEASE)
                                         atomic_add_fetch(qp->users, 1, RELEASE
  atomic_or_fetch(qp->users, ID_VAL++, RELEASE)

When this pattern occurs, the atomic or operation fails to see the published
value of CPU1 and when the or-ed value is written back to ram, the incremented
value in get_hold_current_qp is overwritten, meaning the hold that the reader
placed on the rcu lock is lost, allowing the writer to complete early, freeing
memory before a reader is done reading any held memory.

Why this is only observed on ppc64le I'm not sure, but it seems like a pretty
clear problem.

fix it by implementing ATOMIC_COMPARE_EXCHANGE_N, so that, on the write side in
update_qp, we can ensure that updates are only done if the read side hasn't
changed anything.  If it has, retry the operation.

With this fix, I'm able to run the threads test overnight (4000 iterations and
counting) without 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/26478)

6 months agobyteorder.h: Fix MSVC compiler error C2371
Kelvin Lee [Fri, 17 Jan 2025 13:26:21 +0000 (00:26 +1100)] 
byteorder.h: Fix MSVC compiler error C2371

Compiling byteorder_test.c with VS2022 produces the following warnings
and errors:

E:\build\kiyolee\openssl\include\openssl\byteorder.h(24,21): warning
C4164: '_byteswap_ushort': intrinsic function not declared
(compiling source file '../../../test/byteorder_test.c')
E:\build\kiyolee\openssl\include\openssl\byteorder.h(25,21): warning
C4164: '_byteswap_ulong': intrinsic function not declared
(compiling source file '../../../test/byteorder_test.c')
E:\build\kiyolee\openssl\include\openssl\byteorder.h(26,21): warning
C4164: '_byteswap_uint64': intrinsic function not declared
(compiling source file '../../../test/byteorder_test.c')
E:\build\kiyolee\openssl\include\openssl\byteorder.h(112,18): warning
C4013: '_byteswap_ushort' undefined; assuming extern returning int
(compiling source file '../../../test/byteorder_test.c')
E:\build\kiyolee\openssl\include\openssl\byteorder.h(144,18): warning
C4013: '_byteswap_ulong' undefined; assuming extern returning int
(compiling source file '../../../test/byteorder_test.c')
E:\build\kiyolee\openssl\include\openssl\byteorder.h(182,18): warning
C4013: '_byteswap_uint64' undefined; assuming extern returning int
(compiling source file '../../../test/byteorder_test.c')
C:\Program Files (x86)\Windows
Kits\10\Include\10.0.22621.0\ucrt\stdlib.h(298,41): error C2371:
'_byteswap_ushort': redefinition; different basic types
(compiling source file '../../../test/byteorder_test.c')
C:\Program Files (x86)\Windows
Kits\10\Include\10.0.22621.0\ucrt\stdlib.h(299,41): warning C4142:
'_byteswap_ulong': benign redefinition of type
(compiling source file '../../../test/byteorder_test.c')
C:\Program Files (x86)\Windows
Kits\10\Include\10.0.22621.0\ucrt\stdlib.h(300,41): error C2371:
'_byteswap_uint64': redefinition; different basic types
(compiling source file '../../../test/byteorder_test.c')

CLA: trivial

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

6 months agoproviders/implementations/keymgmt/ec_kmgmt.c: Remove unused variable
Jiasheng Jiang [Thu, 9 Jan 2025 16:13:55 +0000 (16:13 +0000)] 
providers/implementations/keymgmt/ec_kmgmt.c: Remove unused variable

Remove unused variable "group".

CLA: trivial

Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26293)

6 months agoImprove ASN1_TIME_print documentation and output
Michael Baentsch [Wed, 8 Jan 2025 11:57:28 +0000 (12:57 +0100)] 
Improve ASN1_TIME_print documentation and output

This adds missing GMT indication when printing the local time as
it is converted to the UTC timezone before printing.

Also fixing the fractional seconds printing on EBCDIC platforms.

Fixes #26313

Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26344)

6 months agokeymgmt: refactor fips indicator check
Dimitri John Ledkov [Sun, 20 Oct 2024 02:34:27 +0000 (03:34 +0100)] 
keymgmt: refactor fips indicator check

Currently direct call to ossl_ec_check_security_strength is used,
instead of ossl_fips_ind_ec_key_check() like in all other places.

Make keymgmt do the same check as ecdh_exch and ecdsa_sig do.

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

6 months agos_socket: naccept: close listening socket after accepting clients
Nadav Tasher [Fri, 20 Dec 2024 15:59:01 +0000 (17:59 +0200)] 
s_socket: naccept: close listening socket after accepting clients

When `-naccept` is passed (i.e with `s_server`), the listening socket remains open while handling
client, even after `naccept` is supposed to reach `0`.

This is caused to to the decrementation of `naccept` and closing of the socket
happening a little too late in the `do_server` function.

Signed-off-by: Nadav Tasher <tashernadav@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26228)

6 months agoSupport boolean queries against provider config
Viktor Dukhovni [Fri, 17 Jan 2025 11:58:43 +0000 (22:58 +1100)] 
Support boolean queries against provider config

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

6 months agoRevert "Move rodata to .rodata section for armv8"
Alexey Moksyakov [Tue, 21 Jan 2025 09:24:27 +0000 (12:24 +0300)] 
Revert "Move rodata to .rodata section for armv8"

This reverts commit 5b36728d974578f2c74e9f3d2ee6472187084882.

Issue #26458

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

6 months agoRestore correct registers in aarch64 AES-CTR code
Julian Andres Klode [Sat, 18 Jan 2025 20:12:45 +0000 (21:12 +0100)] 
Restore correct registers in aarch64 AES-CTR code

Commit 1d1ca79fe35dbe5c05faed5a2ef8c4de9c5adc49 introduced
save and restore for the registers, saving them as

stp d8,d9,[sp, #16]
stp d10,d11,[sp, #32]
stp d12,d13,[sp, #48]
stp d14,d15,[sp, #64]

But the restore code was inadvertently typoed:

ldp d8,d9,[sp, #16]
ldp d10,d11,[sp, #32]
ldp d12,d13,[sp, #48]
ldp d15,d16,[sp, #64]

Restoring [sp, #64] into d15,d16 instead of d14,d15.

Fixes: #26466
CLA: trivial

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

6 months agoMove some encode helpers to crypt/encode_decode/
Viktor Dukhovni [Mon, 20 Jan 2025 06:25:03 +0000 (17:25 +1100)] 
Move some encode helpers to crypt/encode_decode/

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26487)

6 months agoCheck return of OSSL_PROVIDER_do_all to avoid coverity noise
Viktor Dukhovni [Sat, 18 Jan 2025 07:34:54 +0000 (18:34 +1100)] 
Check return of OSSL_PROVIDER_do_all to avoid coverity noise

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26462)