6195c08d | 07-Apr-2024 |
Neil Horman |
make addr_len the right sign in sslecho cygwin caught a signedness difference in this pointer. Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openss
make addr_len the right sign in sslecho cygwin caught a signedness difference in this pointer. Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/24047)
show more ...
|
793a4056 | 07-Apr-2024 |
Neil Horman |
Replace getline with fgets in sslecho demo Windows doesn't support getline, so we need to use fgets here Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <
Replace getline with fgets in sslecho demo Windows doesn't support getline, so we need to use fgets here Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/24047)
show more ...
|
4ad6e549 | 06-Apr-2024 |
Neil Horman |
dont include unistd.h on windows for sslecho Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Re
dont include unistd.h on windows for sslecho Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/24047)
show more ...
|
3b56cd4f | 06-Apr-2024 |
Neil Horman |
Don't include unistd.h in sconnect for windows The platform doesn't support it Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Revie
Don't include unistd.h in sconnect for windows The platform doesn't support it Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/24047)
show more ...
|
7acdd776 | 06-Apr-2024 |
Neil Horman |
Fix signal handling in saccept for windows Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Revi
Fix signal handling in saccept for windows Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/24047)
show more ...
|
f2f13cff | 06-Apr-2024 |
Neil Horman |
Fix warnings found by clang in CI Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by:
Fix warnings found by clang in CI Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/24047)
show more ...
|
44f05ded | 06-Apr-2024 |
Neil Horman |
Enable demos in select builds Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tom
Enable demos in select builds Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/24047)
show more ...
|
7a7fbeb9 | 06-Apr-2024 |
Neil Horman |
fix all the warnings in our demos and make them enableable Fix up the warnings in the demos and make them configurable with enable-demos Reviewed-by: Nicola Tuveri <nic.tuv@gmai
fix all the warnings in our demos and make them enableable Fix up the warnings in the demos and make them configurable with enable-demos Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/24047)
show more ...
|
2000281d | 05-Apr-2024 |
Neil Horman |
Convert demos to primary build system Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-
Convert demos to primary build system Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/24047)
show more ...
|
875db35a | 11-Apr-2024 |
Tomas Mraz |
ossl_provider_new(): Fix memory leak on error Fixes #24095 Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from h
ossl_provider_new(): Fix memory leak on error Fixes #24095 Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24100)
show more ...
|
682ed1b8 | 11-Apr-2024 |
Tomas Mraz |
make_addressPrefix(): Fix a memory leak in error case Fixes #24098 Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merge
make_addressPrefix(): Fix a memory leak in error case Fixes #24098 Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24102)
show more ...
|
8e5918fb | 10-Apr-2024 |
Neil Horman |
Fix duplicate mutex allocation in threads_win.c Creating an rcu lock does a double allocation of the underlying mutex. Not sure how asan didn't catch this, but we clearly have a duplicat
Fix duplicate mutex allocation in threads_win.c Creating an rcu lock does a double allocation of the underlying mutex. Not sure how asan didn't catch this, but we clearly have a duplicate line here Fixes #24085 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24086)
show more ...
|
491bbb44 | 10-Apr-2024 |
Richard Levitte |
VMS: Move defining _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED to config target For all other platforms that need these macros defined, that's how it's done, so we have VMS follow suit. T
VMS: Move defining _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED to config target For all other platforms that need these macros defined, that's how it's done, so we have VMS follow suit. That avoids a crash between in source definitions and command line definitions on some other platforms. Fixes #24075 Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24083) (cherry picked from commit 7f04bb065d9d948d049ef1ef1bd4062cb7831392)
show more ...
|
2fd6c12e | 09-Apr-2024 |
Oleg Bulatov |
crypto/provider_core.c: Allocate activatecnt_lock CRYPTO_atomic_add has a lock as a parameter, which is often ignored, but in some cases (for example, when BROKEN_CLANG_ATOMICS is define
crypto/provider_core.c: Allocate activatecnt_lock CRYPTO_atomic_add has a lock as a parameter, which is often ignored, but in some cases (for example, when BROKEN_CLANG_ATOMICS is defined) it is required. There is no easy way to determine if the lock is needed or not. The current logic looks like this: if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG) && !defined(OPENSSL_SYS_WINDOWS) if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS) - It works without the lock, but in general the need for the lock depends on __atomic_is_lock_free results elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11)) - The lock is not needed (unless ret is NULL, which should never happen?) else - The lock is required endif else - The lock is not needed endif Adding such conditions outside of crypto.h is error-prone, so it is better to always allocate the lock, otherwise CRYPTO_atomic_add may silently fail. Fixes #23376. CLA: trivial Fixes: fc570b2605 ("Avoid taking a write lock in ossl_provider_doall_activated()") Signed-off-by: Oleg Bulatov <oleg@bulatov.me> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24081)
show more ...
|
8cd3f347 | 29-Mar-2024 |
Hugo Landau |
Change approach to SSL_pending API Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/240
Change approach to SSL_pending API Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24040) (cherry picked from commit 5a13d35f243be66f6ad914aefe99fb708812dff1)
show more ...
|
da012356 | 28-Mar-2024 |
Hugo Landau |
QUIC APL: Revise SSL_pending and SSL_has_pending handling for s_client compat Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from
QUIC APL: Revise SSL_pending and SSL_has_pending handling for s_client compat Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24040) (cherry picked from commit 7c33eb1e7fd3248ad29c172b5b4c0658a7be3adc)
show more ...
|
26dd6ba0 | 28-Mar-2024 |
Hugo Landau |
QUIC QSM: Add function to determine if data is waiting Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/open
QUIC QSM: Add function to determine if data is waiting Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24040) (cherry picked from commit 3c2bc702eb9287b84e8584ad427e72da0ab21ec1)
show more ...
|
60f69680 | 09-Apr-2024 |
Dimitri John Ledkov |
test: fix 20-test_dgst.t to use hexkey Currently 20-test_dgst.t calls a quite bogus command: $ openssl dgst -sha256 -hmac -macopt hexkey:FFFF test/data.bin test/data.bin
test: fix 20-test_dgst.t to use hexkey Currently 20-test_dgst.t calls a quite bogus command: $ openssl dgst -sha256 -hmac -macopt hexkey:FFFF test/data.bin test/data.bin hexkey:FFFF: No such file or directory HMAC-SHA2-256(test/data.bin)= b6727b7bb251dfa65846e0a8223bdd57d244aa6d7e312cb906d8e21f2dee3a57 HMAC-SHA2-256(test/data.bin)= b6727b7bb251dfa65846e0a8223bdd57d244aa6d7e312cb906d8e21f2dee3a57 805B632D4A730000:error:80000002:system library:file_ctrl:No such file or directory:crypto/bio/bss_file.c:297:calling fopen(hexkey:FFF, r) 805B632D4A730000:error:10080002:BIO routines:file_ctrl:system lib:crypto/bio/bss_file.c:300: Does not check status code, discards stderr, and verifies the checksums as per above. Note that the checksum is for the HMAC key "-macopt", and `hexkey:FFFF` is attempted to be opened as a file. See HMAC values for key `-macopt` and `hexkey:FFFF` using `openssl-mac`: $ openssl mac -digest SHA256 -macopt hexkey:$(printf '%s' '-macopt' | xxd -p -u) -in ./test/data.bin HMAC B6727B7BB251DFA65846E0A8223BDD57D244AA6D7E312CB906D8E21F2DEE3A57 $ openssl mac -digest SHA256 -macopt hexkey:FFFF -in ./test/data.bin HMAC 7C02D4A17D2560A5BB6763EDBF33F3A34F415398F8F2E07F04B83FFD7C087DAE Fix this test case to actually use HMAC with hexkey:FFFF as intended. Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@surgut.co.uk> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <ppzgs1@gmail.com> (Merged from https://github.com/openssl/openssl/pull/24068)
show more ...
|
27005cec | 05-Apr-2024 |
Tomas Mraz |
Document that private and pairwise checks are not bounded by key size Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from
Document that private and pairwise checks are not bounded by key size Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/24049)
show more ...
|
9fc61ba0 | 05-Apr-2024 |
Tomas Mraz |
fuzz/decoder.c: Limit the key sizes on which checks are run In particular the DH safe prime check will be limited to 8192 bits and the private and pairwise checks are limited to 16384 bi
fuzz/decoder.c: Limit the key sizes on which checks are run In particular the DH safe prime check will be limited to 8192 bits and the private and pairwise checks are limited to 16384 bits on any key types. Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/24049)
show more ...
|
c89baf87 | 04-Apr-2024 |
olszomal |
Fix socket descriptor checks on Windows Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pul
Fix socket descriptor checks on Windows Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24035)
show more ...
|
15eb7b68 | 14-Feb-2024 |
Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> |
Fix typos found by codespell Reviewed-by: Todd Short <todd.short@me.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24013) |
9b87c5a3 | 27-Mar-2024 |
Hubert Kario |
man EVP_PKEY_CTX_set_params: document params is a list Signed-off-by: Hubert Kario <hkario@redhat.com> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mra
man EVP_PKEY_CTX_set_params: document params is a list Signed-off-by: Hubert Kario <hkario@redhat.com> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23986)
show more ...
|
88c74fe0 | 26-Mar-2024 |
Tom Cosgrove |
aarch64: fix BTI in bsaes assembly code Change-Id: I63f0fb2af5eb9cea515dec96485325f8efd50511 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Kurt Roeckx <kurt@r
aarch64: fix BTI in bsaes assembly code Change-Id: I63f0fb2af5eb9cea515dec96485325f8efd50511 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/23982)
show more ...
|
f5b5a35c | 26-Mar-2024 |
Neil Horman |
Ensure proper memory barriers around ossl_rcu_deref/ossl_rcu_assign_ptr Since the addition of macos14 M1 runners in our CI jobs we've been seeing periodic random failures in the test_thr
Ensure proper memory barriers around ossl_rcu_deref/ossl_rcu_assign_ptr Since the addition of macos14 M1 runners in our CI jobs we've been seeing periodic random failures in the test_threads CI job. Specifically we've seen instances in which the shared pointer in the test (which points to a monotonically incrementing uint64_t went backwards. From taking a look at the disassembled code in the failing case, we see that __atomic_load_n when emitted in clang 15 looks like this 0000000100120488 <_ossl_rcu_uptr_deref>: 100120488: f8bfc000 ldapr x0, [x0] 10012048c: d65f03c0 ret Notably, when compiling with gcc on the same system we get this output instead: 0000000100120488 <_ossl_rcu_uptr_deref>: 100120488: f8bfc000 ldar x0, [x0] 10012048c: d65f03c0 ret Checking the arm docs for the difference between ldar and ldapr: https://developer.arm.com/documentation/ddi0602/2023-09/Base-Instructions/LDAPR--Load-Acquire-RCpc-Register- https://developer.arm.com/documentation/dui0802/b/A64-Data-Transfer-Instructions/LDAR It seems that the ldar instruction provides a global cpu fence, not completing until all writes in a given cpus writeback queue have completed Conversely, the ldapr instruction attmpts to achieve performance improvements by honoring the Local Ordering register available in the system coprocessor, only flushing writes in the same address region as other cpus on the system. I believe that on M1 virtualized cpus the ldapr is not properly ordering writes, leading to an out of order read, despite the needed fencing. I've opened an issue with apple on this here: https://developer.apple.com/forums/thread/749530 I believe that it is not safe to issue an ldapr instruction unless the programmer knows that the Local order registers are properly configured for use on the system. So to fix it I'm proposing with this patch that we, in the event that: 1) __APPLE__ is defined AND 2) __clang__ is defined AND 3) __aarch64__ is defined during the build, that we override the ATOMIC_LOAD_N macro in the rcu code such that it uses a custom function with inline assembly to emit the ldar instruction rather than the ldapr instruction. The above conditions should get us to where this is only used on more recent MAC cpus, and only in the case where the affected clang compiler emits the offending instruction. I've run this patch 10 times in our CI and failed to reproduce the issue, whereas previously I could trigger it within 5 runs routinely. 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/23974)
show more ...
|