Commit Graph

36265 Commits

Author SHA1 Message Date
Rajeev Ranjan
0048817523 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)
2025-01-27 08:56:46 +01:00
Frederik Wedel-Heinen
35b97122ea 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)
2025-01-27 08:17:27 +01:00
Viktor Dukhovni
95a3662626 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)
2025-01-25 23:16:10 +11:00
Neil Horman
cfc62a3c46 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)
2025-01-24 12:01:43 -05:00
Sean Kannanaikal
a59efbfc7e 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)
2025-01-24 17:14:39 +01:00
Mae
b6f2ff9363 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)
2025-01-24 14:26:16 +01:00
Tomas Mraz
0bdb4a67bd template_kem.c: Use proper printf format for size_t
Fixes Coverity 1633351, 1633352, 1633354, 1633355

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)
2025-01-24 14:16:44 +01:00
Tomas Mraz
2581ff619b template_kem.c: Check outlen before dereferencing it
Fixes Coverity 1633353, 1633356, 1633357

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)
2025-01-24 14:16:44 +01:00
Frederik Wedel-Heinen
bd0a2e0c1e 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)
2025-01-24 13:37:38 +01:00
Viktor Dukhovni
1397dc59c6 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)
2025-01-24 22:51:35 +11:00
Viktor Dukhovni
3a9e3b1fb0 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)
2025-01-24 22:49:08 +11:00
Dmitry Misharov
8900cdf230 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)
2025-01-23 12:17:53 +01:00
Stas Cymbalov
7262c0bcc4 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)
2025-01-23 12:13:42 +01:00
Tomas Mraz
abbc407314 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)
2025-01-23 12:09:13 +01:00
Tomas Mraz
2455ef2112 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)
2025-01-23 12:09:13 +01:00
Tomas Mraz
4f7d2b4809 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)
2025-01-23 12:07:33 +01:00
Tomas Mraz
901b108154 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)
2025-01-23 12:07:33 +01:00
Tomas Mraz
2dded72022 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)
2025-01-23 12:07:33 +01:00
Alexander Heinlein
b07a273f59 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)
2025-01-23 12:05:57 +01:00
Richard Levitte
0cacf9be97 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)
2025-01-23 12:03:48 +01:00
Bernd Edlinger
b999ea6bc4 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)
2025-01-23 12:01:38 +01:00
Alex Prabhat Bara
c5e17e8cb7 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)
2025-01-23 11:21:12 +01:00
Neil Horman
fbd34c03e3 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)
2025-01-22 20:16:11 +01:00
Kelvin Lee
5b589fcdab 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)
2025-01-22 11:40:11 +01:00
Jiasheng Jiang
27b324f90a 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)
2025-01-22 11:34:50 +01:00
Michael Baentsch
c81ff97866 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)
2025-01-22 11:28:31 +01:00
Dimitri John Ledkov
7ffb65666f 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)
2025-01-22 09:29:32 +01:00
Nadav Tasher
113c12ee8c 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)
2025-01-22 09:20:14 +01:00
Viktor Dukhovni
e6855e1d79 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)
2025-01-22 14:52:26 +11:00
Alexey Moksyakov
908bc0994d Revert "Move rodata to .rodata section for armv8"
This reverts commit 5b36728d97.

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)
2025-01-21 18:21:19 +01:00
Julian Andres Klode
5261f3ca41 Restore correct registers in aarch64 AES-CTR code
Commit 1d1ca79fe3 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)
2025-01-21 10:55:56 +01:00
Viktor Dukhovni
c374f79549 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)
2025-01-21 20:09:57 +11:00
Viktor Dukhovni
5b94140b52 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)
2025-01-21 17:25:22 +11:00
Viktor Dukhovni
1dafff06ca Don't promise a non-zero return size in error cases.
When a requested parameter has a non-NULL result pointer,
and the error isn't simply that the result buffer is too
small, don't return a non-zero result size.

Returning a non-zero result size that isn't larger than the
user's provided space is an indication that a result of
that size was actually written, inviting trouble if the
error indication was inadvertenly lost.

Also, in such cases (wrong type, data can't be converted to the
requested type when otherwise supported, ...) there is nothing useful to
be done with the return size value, it can't help to address the
problem.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/26436)
2025-01-21 17:21:52 +11:00
Viktor Dukhovni
35f6e7ea02 Make the provider context available to encoders
At the moment the provider context is only available to
encoders that encrypt, but it is useful more generally.

A similar change has already been merged to "master" on the
decoder side, this is the mirror change for encoders.  The
only significant difference is that PEM_ASN1_write_bio needed
to be "extended" (cloned) to allow it to pass the provider context
down to the `k2d` function it uses to encode the data.

I had to "hold my nose" and live with the random "20" added to the data
size in order to accomodate encryption with padding, which may produce
one more cipher block than the input length.  This really should ask
the EVP layer about the block length of the cipher, and allocate the
right amount.  This should be a separate fix for both the old
PEM_ASN1_write_bio() and the new PEM_ASN1_write_bio_ctx().

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/26475)
2025-01-21 17:19:07 +11:00
Tomas Mraz
c3144e1025 Add CHANGES.md and NEWS.md updates for CVE-2024-13176
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/26429)
2025-01-20 09:30:48 +01:00
Tomas Mraz
63c40a66c5 Fix timing side-channel in ECDSA signature computation
There is a timing signal of around 300 nanoseconds when the top word of
the inverted ECDSA nonce value is zero. This can happen with significant
probability only for some of the supported elliptic curves. In particular
the NIST P-521 curve is affected. To be able to measure this leak, the
attacker process must either be located in the same physical computer or
must have a very fast network connection with low latency.

Attacks on ECDSA nonce are also known as Minerva attack.

Fixes CVE-2024-13176

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/26429)
2025-01-20 09:30:48 +01:00
Dr. David von Oheimb
3294dcdbc2 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)
2025-01-20 08:41:19 +01:00
Dr. David von Oheimb
b48ed24737 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)
2025-01-20 08:41:02 +01:00
otherddn1978
3c7db9e0fd 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)
2025-01-20 18:22:48 +11:00
Richard Levitte
1df07c761b 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)
2025-01-17 18:54:51 +01:00
Jonathan M. Wilbur
635ad41cd9 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)
2025-01-17 18:39:24 +01:00
Jonathan M. Wilbur
7346348779 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)
2025-01-17 18:39:24 +01:00
Jonathan M. Wilbur
0d8cc7c699 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)
2025-01-17 18:39:24 +01:00
Viktor Dukhovni
38a0926528 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)
2025-01-18 03:46:37 +11:00
Alexandr Nedvedicky
42aced5c9f 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)
2025-01-17 17:43:39 +01:00
Alexey Moksyakov
5b36728d97 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)
2025-01-17 17:33:41 +01:00
Dmitry Belyavskiy
e8387ed61c 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)
2025-01-17 15:06:32 +01:00
Dmitry Belyavskiy
116c0ad952 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)
2025-01-17 15:04:35 +01:00
onexyoung
8fb6c8154b 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)
2025-01-17 11:36:26 +01:00