summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2023-09-11Fix test_quic_multistream to allow multiple concurrent testsRichard Levitte
The server port was hard coded to 8186. That could make for some "interesting" effects if two instances of this same test was running on the same machine. This change binds the server interface with port 0, and captures the resulting random port. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22025)
2023-09-11Fix a build failure where recvmmsg is available but not sendmmsgMatt Caswell
Some old glibc versions have recvmmsg but not sendmmsg. We require both to use that functionality. Introduce a test to check we have a sufficiently recent version of glibc. Fixes #22021 Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/22036)
2023-09-11Prevent 80-test_cmp_http from accidentally killing perl in error.Randall S. Becker
If there is an issue with setting up the test environment in this test, pid is not set so stop_server kills the perl process. A guard has been added to prevent this situation. Fixes: #22014 Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22015)
2023-09-11LoongArch64 assembly pack: add ChaCha20 modulesMin Zhou
This assembly implementation for ChaCha20 includes three code paths: scalar path, 128-bit LSX path and 256-bit LASX path. We prefer the LASX path or LSX path if the hardware and system support these extensions. There are 32 vector registers avaialable in the LSX and LASX extensions. So, we can load the 16 initial states and the 16 intermediate states of ChaCha into the 32 vector registers for calculating in the implementation. The test results on the 3A5000 and 3A6000 show that this assembly implementation significantly improves the performance of ChaCha20 on LoongArch based machines. The detailed test results are as following. Test with: $ openssl speed -evp chacha20 3A5000 type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes C code 178484.53k 282789.93k 311793.70k 322234.99k 324405.93k 324659.88k assembly code 223152.28k 407863.65k 989520.55k 2049192.96k 2127248.70k 2131749.55k +25% +44% +217% +536% +556% +557% 3A6000 type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes C code 214945.33k 310041.75k 340724.22k 349949.27k 352925.01k 353140.74k assembly code 299151.34k 492766.34k 2070166.02k 4300909.91k 4473978.88k 4499084.63k +39% +59% +508% +1129% +1168% +1174% Signed-off-by: Min Zhou <zhoumin@loongson.cn> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21998)
2023-09-11Regexp modifier "r" needs perl 5.14; OpenSSL should build with 5.11, so do ↵Rainer Jung
not use the "r" shortcut. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22019)
2023-09-09Fix output corruption in req commandBernd Edlinger
when used in conjunction with -out and -modulus options. Fixes #21403 Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22026)
2023-09-08Exclude include of poll.h from NonStop builds - not defined on platform.Randall S. Becker
socket.h has been modified so that poll.h is omitted for OPENSSL_SYS_NONSTOP builds. The platform configuration is derived from UNIX so the include is only omitted for NonStop but kept in the OPENSSL_SYS_UNIX include block. Fixes: #22001 Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22006)
2023-09-08Modify 50-nonstop.conf to enable c99 extensions for uintptr_t.Randall S. Becker
This is done using the define __NSK_OPTIONAL_TYPES__ and is specific to the NonStop platform builds. Fixes: #22002 Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22005)
2023-09-08Return NULL if we fail to create a BIO in the demos/quicserverMatt Caswell
Strictly speaking the previous code was still correct since BIO_set_fd is tolerant of a NULL BIO. But this way is more clear. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21950)
2023-09-08Add a missing call to BIO_closesocket()Matt Caswell
A couple of the demos missed a call to this function in an error case. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21950)
2023-09-08Expand the explanation of how to go and do useful work in non-blockingMatt Caswell
Add additional commentary to the non-blocking examples explaining where to add code to go and do other useful work. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21950)
2023-09-08Add a new guide page on writing a non-blocking QUIC clientMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21950)
2023-09-08Add a new guide page on writing a non-blocking TLS clientMatt Caswell
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21950)
2023-09-08Add a QUIC non-blocking demoMatt Caswell
Show how to write a QUIC client using a non-blocking socket Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21950)
2023-09-08Add a TLS non-blocking demoMatt Caswell
Show how to write a TLS client using a non-blocking socket Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21950)
2023-09-08Bump coverallsapp/github-action from 2.2.1 to 2.2.3dependabot[bot]
Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 2.2.1 to 2.2.3. - [Release notes](https://github.com/coverallsapp/github-action/releases) - [Commits](https://github.com/coverallsapp/github-action/compare/v2.2.1...v2.2.3) --- updated-dependencies: - dependency-name: coverallsapp/github-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> CLA: trivial Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22012)
2023-09-08Fix a possible memleak in SRP_VBASE_newBernd Edlinger
In the error handling case the memory in vb->users_pwd was accidentally not released. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21981)
2023-09-08OSSL_STORE: Fix error flag clearing and setting (provider path only)Richard Levitte
When the provider's load function returned with an error, the libcrypto error flag was only set if EOF hadn't been reached. This is troublesome, as an error can very well occur during the last load before EOF is reached! Also, the error flag was never reset, even though documentation specifies that it should indicate an error in the last load (i.e. not the one before that). Fixes #21968 Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21976)
2023-09-08Add test case for #21986Pauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/21988)
2023-09-08Check error return from cms_sd_asn1_ctrl() correctly.Pauli
Fixes #21986 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/21988)
2023-09-08Fix 80-test_cmp_http.t to be more flexible regarding IP versionsRichard Levitte
Because apps/lib/http_server.c had a hard coded "[::]" for the accept host, 80-test_cmp_http.t assumed that it would always get a CMP server on an IPv6 address, and tested for that. With the fix in apps/lib/http_server.c, that test was of course doomed to fail. Since CMP should be about IP version testing, 80-test_cmp_http.t is adapted to allow the Mock server to accept connections on either IP version, and the test for IPv6 is removed. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21989)
2023-09-08BIO_set_accept_name(): To accept from any interface, use *Richard Levitte
Using "*:{port}" is preferred to "[::]:{port}", because it won't break on IPv4-only machines. This fixes test failures in 79-test_http.t and 80-test_ssl_new.t on machines without IPv6. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21989)
2023-09-08Modify the dkeyform type to support enginewangcheng
The valtype value of dkeyform defined in the s_server_options structure is F, which leads to the judgment that the engine is not supported when processing parameters in the opt_next function. This the valtype value of dkeyform should be changed to "f". CLA: trivial Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21982)
2023-09-07test/chacha: replace CPUID_OBJ with OPENSSL_CPUID_OBJMin Zhou
Fixes #21977 Signed-off-by: Min Zhou <zhoumin@loongson.cn> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21978)
2023-09-07Prepare for 3.2 alpha 2Matt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> Release: yes
2023-09-07Prepare for release of 3.2 alpha 1openssl-3.2.0-alpha1Matt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> Release: yes
2023-09-07make updateMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> Release: yes
2023-09-07Copyright year updatesMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> Release: yes
2023-09-06QUIC MULTISTREAM TEST: Add commentHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21827)
2023-09-06QUIC MULTISTREAM TEST: Adjust spin behaviourHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21827)
2023-09-06win32: Support condition variable broadcasting on XPHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21827)
2023-09-06QUIC MULTISTREAM TEST: Synchronize script 20 correctlyHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21827)
2023-09-06QUIC MULTISTREAM TEST: Run all scripts in both blocking and non-blocking modesHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21827)
2023-09-06fips compatibility: update 3.1.1 to 3.1.2Pauli
The plan at the moment is to validate 3.1.2 all going well. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21962)
2023-09-06Per other commands, make progress dots in req only w/ -verbosePhilip Prindeville
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21937)
2023-09-05CMP: generalize ossl_cmp_calc_protection() to handle Edwards curves correctlyDr. David von Oheimb
Fixes #21564 Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21884)
2023-09-05Update fuzz corpora to latest commitKurt Roeckx
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21927)
2023-09-05Fix internal memory leaks from OPENSSL_MALLOC_FAILURESBernd Edlinger
There is a rarely used feature that can be enabled with `./config enable-crypto-mdebug` when additionally the environment variable OPENSSL_MALLOC_FAILURES is used. It turns out to be possible that CRYPTO_zalloc may create a leak when the memory is allocated and then the shouldfail happens, then the memory is lost. Likewise when OPENSSL_realloc is used with size=0, then the memory is to be free'd but here the shouldfail check is too early, and the failure may prevent the memory to be freed thus creating a bogus memory leak. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21944)
2023-09-05Test that NULL BIGNUM is supported in OSSL_PARAM_BLD_push_BN()Tomas Mraz
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21945)
2023-09-05OSSL_PARAM_BLD_push_BN_pad(): Allow NULL BIGNUMTomas Mraz
This was supported previously and regressed with commit 17898ec6011cc583c5af69ca8f25f5d165ff3e6a Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21945)
2023-09-05apps/cmp.c: fix bug not allowing to reset -csr and -serial option valuesDr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21659)
2023-09-05apps.c: improve warning texts of parse_name() when skipping RDN inputDr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21659)
2023-09-05apps.c: fix error messages (newline and needless text) in load_key_certs_crls()Dr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21659)
2023-09-05MUTEX: Assert on locking failureHugo Landau
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21919)
2023-09-05Bump actions/checkout from 2 to 4dependabot[bot]
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> CLA: trivial Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21953)
2023-09-05VMS: More header inclusion compensation for VMS C compilerRichard Levitte
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/21959)
2023-09-05Use armv8 .quad instead of .dwordKai Pastor
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21939)
2023-09-0504-test_encoder_decoder.t: Use algorithm that is non-fips also on 3.0.0Tomas Mraz
The test encrypted RSA key with DES3 which is still allowed in the 3.0 fips provider. Instead use the traditional key format that uses MD5 to create the password based key. MD5 is disallowed in the 3.0 fips provider. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/21957)
2023-09-05quicserver.c: Fix build with no-ssl-traceTomas Mraz
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21958)
2023-09-04internal/numbers.h: Add fallback implementation for UINT32_C and UINT64_CRichard Levitte
Other similar macros can be implemented later. Right now, this are the most likely to be actually useful Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21951)