summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2022-01-05TLSfuzzer: submodulesDmitry Belyavskiy
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17340)
2022-01-05check the return value of OSSL_PARAM_BLD_new in dsa_kmgmt.c:195x2018
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17155)
2022-01-05sm2: fix {i2d,d2i}_PublicKey EC_KEY is EVP_PKEY_SM2zhaozg
CLA: trivial Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17389)
2022-01-05apps/passwd.c: free before error exitingPeiwei Hu
use goto instead of returning directly while error handling Signed-off-by: Peiwei Hu <jlu.hpw@foxmail.com> Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17404)
2022-01-05fix building failure when using -Wconditional-uninitializedfangming.fang
Use clang -Wconditional-uninitialized to build, the error "initialize the variable 'buffer_size' to silence this warning" will be reported. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17375)
2022-01-05trace.c: Add missing trace category entryTomas Mraz
Fixes #17397 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17399)
2022-01-04CMP mock server: add -ref_cert option and corresponding ↵Dr. David von Oheimb
ossl_cmp_mock_srv_set1_refCert() Fixes #16041 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16050)
2022-01-04X509_cmp.pod: Point out that the X509_NAME_cmp() arguments may be NULLDr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16050)
2022-01-04app_http_tls_cb: Fix double-free in case TLS not usedDr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17400)
2022-01-04check-format.pl: Fix report on constant on LHS of comparison or assignmentDr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17396)
2022-01-04HTTP client: Work around HTTPS proxy use bug due to callback design flawDr. David von Oheimb
See discussion in #17088, where the real solution was postponed to 4.0. This preliminarily fixes the issue that the HTTP(S) proxy environment vars were neglected when determining whether a proxy should be used for HTTPS. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17310)
2022-01-04Fix compile error when building with no-asmfangming.fang
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17376)
2022-01-04check the return value of EVP_MD_fetch in ecdh_exch.c:285 & dh_exch.c:347x2018
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17153)
2022-01-04Use USE_SWAPCONTEXT on IA64.Sebastian Andrzej Siewior
On IA64 the use of setjmp()/ longjmp() does not properly save the state of the register stack engine (RSE) and requires extra care. The use of it in the async interface led to a failure in the test_async.t test since its introduction in 1.1.0 series. Instead of properly adding the needed assembly bits here use the swapcontext() function which properly saves the whole context. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> 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/17370)
2022-01-04Validate the category in OSSL_trace_end()Matt Caswell
OSSL_trace_end() should validate that the category it has been passed by the caler is valid, and return immediately if not. Fixes #17353 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17371)
2022-01-03Update troublesome copyright years of auto-generated files to 2022Dr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17398)
2022-01-03X509V3_set_ctx(): Improve documentationDr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17358)
2022-01-03ec.h: Explain use of strstr() for EVP_EC_gen() and add #include <string.h>Dr. David von Oheimb
Fixes #17362 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17380)
2022-01-03Check the return value of ossl_bio_new_from_core_bio()x2018
There are missing checks of its return value in 8 different spots. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17154)
2022-01-03close_console: Always unlock as the lock is always heldTomas Mraz
Fixes #17364 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17365)
2022-01-03try_pkcs12(): cleanse passphrase so it is not left on the stackTomas Mraz
Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/17320)
2022-01-03try_pkcs12(): Correct handling of NUL termination of passphrasesTomas Mraz
Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/17320)
2022-01-03Test that PEM_BUFSIZE is passed into pem_password_cbTomas Mraz
When pem_password_cb is used from SSL_CTX, its size parameter should be equal to PEM_BUFSIZE. Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/17320)
2022-01-03pem_password_cb: Clarify the documentation on passphrasesTomas Mraz
Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/17320)
2022-01-03Compensate for UI method always adding NUL terminationTomas Mraz
The UI method always adds NUL termination and we need to compensate for that when using it from a pem_password_cb because the buffer used in pem_password_cb does not account for that and the returned password should be able fill the whole buffer. Fixes #16601 Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/17320)
2022-01-01test: add some unit tests for the property to string functionsPauli
That is: ossl_property_name_str and ossl_property_value_str. These only have high level tests during the creation of child library contexts. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17325)
2022-01-01property: use a stack to efficiently convert index to stringPauli
The existing code does this conversion by searching the hash table for the appropriate index which is slow and expensive. Fixes #15867 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17325)
2021-12-30Fix the symbol_presence test with a shlib_variantMatt Caswell
If a shlib_variant is used then the dynamic version information for symbols will be different from what the symbol presence test was expecting. We just make it more liberal about what it accepts as dynamic version information. Fixes #17366 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17372)
2021-12-30APPS/cmp: improve diagnostics for presence of TLS optionsDr. David von Oheimb
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16747)
2021-12-30OSSL_CMP_CTX: rename get/set function for trustedStoreDr. David von Oheimb
This makes the naming more consistent, in a backward-compatible way Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17277)
2021-12-29Ensure s_client sends SNI data when used with -proxyMatt Caswell
The use of -proxy prevented s_client from correctly sending the target hostname as SNI data. Fixes #17232 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17248)
2021-12-29Fix a misuse of NULL checkWeiguo Li
Fixes: #17356 CLA: trivial Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17357)
2021-12-28document additional stack push error codeMichael Baentsch
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/17350) (cherry picked from commit 0caf2813245f7141b982fcfd9bda402117da115c)
2021-12-23improving tests for adding sigalg with empty digestMichael Baentsch
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17315)
2021-12-23Add static check in BN_hex2bnKan
Fixes #17298 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17299)
2021-12-23Fix Configure variable spillAlexandros Roussos
* Evaluating code-refs in Configure can sometimes set the default variable `$_` * Prevent spillage influencing the target property by using named variable in loop CLA: trivial Fixes gh-17321 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17322)
2021-12-23namemap: handle a NULL return when looking for a non-legacy cipher/MDPauli
Fixes #17313 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17324)
2021-12-22HTTP client: Fix cleanup of TLS BIO via 'bio_update_fn' callback functionDr. David von Oheimb
Make app_http_tls_cb() tidy up on disconnect the SSL BIO it pushes on connect. Make OSSL_HTTP_close() respect this. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17318)
2021-12-22Add support for BSD-riscv64 targetPiotr Kubaj
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17306)
2021-12-21HTTP client: Work around the 'gets' method not being supported by SSL BIOsDr. David von Oheimb
It turned out that loading non-ASN.1 contents using the HTTP client fails over TLS because SSL BIOs do not support the gets method. This PR provides a workaround by using the less efficient BIO_get_line() function in case BIO_gets() returns -2, which means that it is not supported by the BIO. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17317)
2021-12-21http_test.c: Simplify constant init of 'server_args' struct for gcc-4.8.xDr. David von Oheimb
Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17308)
2021-12-21add OSSL_STACK_OF_X509_free() for commonly used patternDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17307)
2021-12-20Fix fixup postrelease scripts to avoid creating errorsTomas Mraz
Otherwise the NEWS.md and CHANGES.md will contain trailing spaces. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17304) (cherry picked from commit 132ab70fd852729e7ce41ac7ef2cb2f9969f8b7e)
2021-12-20crypto/dsa.h: fix include guard nameCarlo Teubner
The current include guard name is a duplicate of the one in dsaerr.h. Noticed via https://lgtm.com/projects/g/openssl/openssl CLA: trivial Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17303)
2021-12-20Fix the null pointer dereferenceKan
Fixes #17296 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17297)
2021-12-20Fix deref after nullABautkin
ctx may be NULL at 178 line CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17293)
2021-12-18cmp_ctx.c: Remove redundancy form the defs of many getters and settersDr. David von Oheimb
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17284)
2021-12-18rsa exp: move declarations before codePauli
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17287)
2021-12-17context_init: Fix cleanup in error handlingTomas Mraz
Also never use OSSL_LIB_CTX_free() on incompletely initialized context. Fixes #17291 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17294)
2021-12-17ossl_provider_add_to_store: Avoid use-after-freeTomas Mraz
Avoid freeing a provider that was not up-ref-ed before. Fixes #17292 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17295)