summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Prepare for 1.1.1j releaseOpenSSL_1_1_1jMatt Caswell2021-02-164-5/+5
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Update copyright yearMatt Caswell2021-02-1648-48/+48
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Update CHANGES and NEWS for new releaseMatt Caswell2021-02-162-2/+33
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Don't overflow the output length in EVP_CipherUpdate callsMatt Caswell2021-02-164-6/+35
| | | | | | CVE-2021-23840 Reviewed-by: Paul Dale <pauli@openssl.org>
* Fix rsa_test to properly test RSA_SSLV23_PADDINGMatt Caswell2021-02-161-9/+34
| | | | | | | | | | We test all three cases: - An SSLv2 only client talking to a TLS capable server - A TLS capable client talking to an SSLv2 only server - A TLS capable client talking to a TLS capable server (should fail due to detecting a rollback attack) Reviewed-by: Paul Dale <pauli@openssl.org>
* Fix the RSA_SSLV23_PADDING padding typeMatt Caswell2021-02-161-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also fixes the public function RSA_padding_check_SSLv23. Commit 6555a89 changed the padding check logic in RSA_padding_check_SSLv23 so that padding is rejected if the nul delimiter byte is not immediately preceded by at least 8 bytes containing 0x03. Prior to that commit the padding is rejected if it *is* preceded by at least 8 bytes containing 0x03. Presumably this change was made to be consistent with what it says in appendix E.3 of RFC 5246. Unfortunately that RFC is in error, and the original behaviour was correct. This is fixed in later errata issued for that RFC. This has no impact on libssl for modern versions of OpenSSL because there is no protocol support for SSLv2 in these versions. However applications that call RSA_paddin_check_SSLv23 directly, or use the RSA_SSLV23_PADDING mode may still be impacted. The effect of the original error is that an RSA message encrypted by an SSLv2 only client will fail to be decrypted properly by a TLS capable server, or a message encrypted by a TLS capable client will fail to decrypt on an SSLv2 only server. Most significantly an RSA message encrypted by a TLS capable client will be successfully decrypted by a TLS capable server. This last case should fail due to a rollback being detected. Thanks to D. Katz and Joel Luellwitz (both from Trustwave) for reporting this issue. CVE-2021-23839 Reviewed-by: Paul Dale <pauli@openssl.org>
* Refactor rsa_testMatt Caswell2021-02-161-61/+25
| | | | | | Reduce code copying by factoring out common code into a separate function. Reviewed-by: Paul Dale <pauli@openssl.org>
* Test that X509_issuer_and_serial_hash doesn't crashMatt Caswell2021-02-162-0/+2
| | | | | | | | | Provide a certificate with a bad issuer and check that X509_issuer_and_serial_hash doesn't crash. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (cherry picked from commit 55869f594f052561b11a2db6a7c42690051868de)
* Fix Null pointer deref in X509_issuer_and_serial_hash()Matt Caswell2021-02-161-0/+2
| | | | | | | | | | | | | | | | | | | | | The OpenSSL public API function X509_issuer_and_serial_hash() attempts to create a unique hash value based on the issuer and serial number data contained within an X509 certificate. However it fails to correctly handle any errors that may occur while parsing the issuer field (which might occur if the issuer field is maliciously constructed). This may subsequently result in a NULL pointer deref and a crash leading to a potential denial of service attack. The function X509_issuer_and_serial_hash() is never directly called by OpenSSL itself so applications are only vulnerable if they use this function directly and they use it on certificates that may have been obtained from untrusted sources. CVE-2021-23841 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (cherry picked from commit 8130d654d1de922ea224fa18ee3bc7262edc39c0)
* VMS documentation fixesRichard Levitte2021-02-122-9/+18
| | | | | | | | | This mostly clarifies details. Fixes #13789 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13834)
* Configurations/descrip.mms.tmpl: avoid enormous PIPE commandsRichard Levitte2021-02-123-21/+71
| | | | | | | | | | | | DCL has a total command line limitation that's too easily broken by them. We solve them by creating separate message scripts and using them. Fixes #13789 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13834)
* Remove unused 'peer_type' from SSL_SESSIONBenjamin Kaduk2021-02-092-2/+0
| | | | | | | | | | | This field has not been used since #3858 was merged in 2017 when we moved to a table-based lookup for certificate type properties instead of an index-based one. Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/13991) (cherry picked from commit 3bc0b621a7baf1a11bc5cad69a287ad093674d68)
* Configuration: ensure that 'no-tests' works correctlyRichard Levitte2021-02-071-1/+1
| | | | | | | 'no-tests' wasn't entirely respected by test/build.info. Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14081)
* configdata.pm: Better display of enabled/disabled optionsRichard Levitte2021-02-071-8/+11
| | | | | | | | | | | | | | | | | | | | The options listed in the array @disablables are regular expressions. For most of them, it's not visible, but there are a few. However, configdata.pm didn't quite treat them that way, which meant that the few that are visibly regular expressions, there's a difference between that and the corresponding the key in %disabled, which is never a regular expression. To correctly display the enabled and disabled options with --dump, we must therefore go through a bit of Perl gymnastics to get the output correct enough, primarly so that disabled features don't look enabled. Fixes #13790 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14081)
* NOTES.WIN: fix typoJay Satiro2021-02-051-2/+2
| | | | | | | | | CLA: trivial Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/14078)
* Prevent creating empty folder "../apps/include"Bernd Edlinger2021-02-041-1/+1
| | | | | | | | | | This folder "../apps/include" is accidentally created. This prevents this glitch. Fixes 19b4fe5844b ("Add a CMAC test") Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14051)
* apps/ca: Properly handle certificate expiration times in do_updatedbArmin Fuerst2021-02-031-31/+20
| | | | | | | | | | | | Fixes #13944 + changed ASN1_UTCTIME to ASN1_TIME + removed all Y2K code from do_updatedb + changed compare to ASN1_TIME_compare Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14026)
* Add some missing committers to the AUTHORS listDr. Matthias St. Pierre2021-02-021-0/+7
| | | | | | | | | | Fixes #13815 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14029) (cherry picked from commit af403db090ee66715e81f0062d1ef614e8d921b5)
* check_sig_alg_match(): weaken sig nid comparison to base algDr. David von Oheimb2021-01-287-13/+106
| | | | | | | | | This (re-)allows RSA-PSS signers Fixes #13931 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13982)
* Drop TravisRichard Levitte2021-01-252-313/+2
| | | | | | | | At this point, we have transitioned completely from Travis to GitHub Actions Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13941)
* CI: Add some legacy stuff that we do not test in GitHub CI yetTomas Mraz2021-01-211-1/+1
| | | | | | | | | There are some options that seem to belong to the legacy build. Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13903) (cherry picked from commit adcaebc3148fe0fde3f7641c4b607f30e1479986)
* Fix typo in crl2pkcs documentationTim Hitchins2021-01-211-1/+1
| | | | | | | | | | | | | Fixes #13910 CLA: trivial Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13911) (cherry picked from commit 6857058016e91d3182c2117922dd8001b27f5639)
* Ensure SRP BN_mod_exp follows the constant time pathMatt Caswell2021-01-202-4/+17
| | | | | | | | | | | | | | | | SRP_Calc_client_key calls BN_mod_exp with private data. However it was not setting BN_FLG_CONSTTIME and therefore not using the constant time implementation. This could be exploited in a side channel attack to recover the password. Since the attack is local host only this is outside of the current OpenSSL threat model and therefore no CVE is assigned. Thanks to Mohammed Sabt and Daniel De Almeida Braga for reporting this issue. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13889)
* Fix regression in no-deprecated buildTomas Mraz2021-01-192-1/+12
| | | | | | | | | Also add a new no-deprecated CI build to test it. Fixes #13896 Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/13902)
* DOCS: Fix incorrect pass phrase options referencesRichard Levitte2021-01-1921-34/+30
| | | | | | | | | | There were a number of older style references to the pass phrase options section, now streamlined with the current openssl(1). Fixes #13883 Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/13886)
* x509_vfy.c: Fix a regression in find_isser()Dr. David von Oheimb2021-01-143-12/+57
| | | | | | | | | ...in case the candidate issuer cert is identical to the target cert. Fixes #13739 Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13749)
* X509_cmp(): Fix comparison in case x509v3_cache_extensions() failed to due ↵Dr. David von Oheimb2021-01-148-26/+62
| | | | | | | | | | to invalid cert This is the backport of #13755 to v1.1.1. Fixes #13698 Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13756)
* Skip BOM when reading the config fileDmitry Belyavskiy2021-01-141-0/+14
| | | | | | | | | Fixes #13840 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13857) (cherry picked from commit 4369a882a565c42673b28c586a5c46a8bca98d17)
* Fix -static buildsTodd Short2021-01-141-4/+4
| | | | | | | | | | | | Pull in check from #10878 Move disabling of pic, threads and statics up higher before they are checked. Fixes #12772 Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12773)
* OPENSSL_cpuid_setup FreeBSD arm update.David Carlier2021-01-141-0/+17
| | | | | | | | | | when possible using the getauxval equivalent which has similar ids as Linux, instead of bad instructions catch approach. Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13650) (cherry picked from commit 5eb24fbd1c3e0d130ba7f81f1ccf457a2b9d75ad)
* OPENSSL_cpuid_setup FreeBSD PowerPC updateDavid Carlier2021-01-141-0/+18
| | | | | | | | Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13821) (cherry picked from commit b57ec7394aace731c460b509aa84039274337600)
* [crypto/dh] side channel hardening for computing DH shared keys (1.1.1)Billy Brumley2021-01-102-6/+50
| | | | | | Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13772)
* Fix for negative return value from `SSL_CTX_sess_accept()`anupamam132021-01-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Fixes #13183 From the original issue report, before this commit, on master and on 1.1.1, the issue can be detected with the following steps: - Start with a default SSL_CTX, initiate a TLS 1.3 connection with SNI, "Accept" count of default context gets incremented - After servername lookup, "Accept" count of default context gets decremented and that of SNI context is incremented - Server sends a "Hello Retry Request" - Client sends the second "Client Hello", now again "Accept" count of default context is decremented. Hence giving a negative value. This commit fixes it by adding a check on `s->hello_retry_request` in addition to `SSL_IS_FIRST_HANDSHAKE(s)`, to ensure the counter is moved only on the first ClientHello. CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13297)
* Ensure DTLS free functions can handle NULLMatt Caswell2021-01-082-4/+8
| | | | | | | | | | | | | Our free functions should be able to deal with the case where the object being freed is NULL. This turns out to not be quite the case for DTLS related objects. Fixes #13649 Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13655) (cherry picked from commit d0afb30ef3950cacff50ec539e90073b95a276df)
* poly1305/asm/poly1305-armv4.pl: fix Clang compatibility issueOle André Vadla Ravnås2021-01-071-4/+7
| | | | | | | | | | | | | | | | I.e.: error: out of range immediate fixup value This fix is identical to one of the changes made in 3405db9, which I discovered right after taking a quick stab at fixing this. CLA: trivial Fixes #7878 Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13757)
* Update copyright years of auto-generated headers (make update)Dr. David von Oheimb2021-01-046-6/+6
| | | | | | | This backports #13764. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13769)
* CRYPTO_secure_malloc_init: BSD support improvements.David Carlier2020-12-301-1/+7
| | | | | | | | Backport of #13394 Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Ben Kaduk <kaduk@mit.edu> (Merged from https://github.com/openssl/openssl/pull/13637)
* Fix NULL pointer access caused by X509_ATTRIBUTE_create()Ingo Schwarze2020-12-211-1/+4
| | | | | | | | | | | | | | | | | | | | When X509_ATTRIBUTE_create() receives an invalid NID (e.g., -1), return failure rather than silently constructing a broken X509_ATTRIBUTE object that might cause NULL pointer accesses later on. This matters because X509_ATTRIBUTE_create() is used by API functions like PKCS7_add_attribute(3) and the NID comes straight from the user. This bug was found while working on LibreSSL documentation. Reviewed-by: Theo Buehler <tb@openbsd.org> CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/12052) (cherry picked from commit c4b2c53fadb158bee34aef90d5a7d500aead1f70)
* GitHub CI: Add 'check-update' and 'check-docs'Richard Levitte2020-12-191-2/+24
| | | | | | | | | | | | | 'check-update' runs a 'make update' to check that it wasn't forgotten. 'check-docs' runs 'make doc-nits'. We have that as a separate job to make it more prominent. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/13701) (cherry picked from commit 8175476b81c6b54bfa1c8555b35561099b202c4d)
* Document OCSP_REQ_CTX_i2d.Rich Salz2020-12-181-5/+23
| | | | | | | | This is a backport of the documentation from #13620. Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13691)
* Github CI: run also on repository pushesTomas Mraz2020-12-171-1/+1
| | | | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13686) (cherry picked from commit 4159ebca3cb3d9586d6709c7a0166a4af5676f91)
* Configurations: PowerPC is big endianSebastian Andrzej Siewior2020-12-141-0/+1
| | | | | | | | | | | | | | | | Define B_ENDIAN on PowerPC because it is a big endian architecture. With this change the BN* related tests pass. Fixes: #12199 Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/12371) (cherry picked from commit 52c6c12c1cad6f1046b34f4139d1aa3e967a5530)
* Test that we can negotiate TLSv1.3 if we have an SNI callbackMatt Caswell2020-12-101-0/+59
| | | | | | | | | | If an SNI callback has been set then we may have no certificuates suitable for TLSv1.3 use configured for the current SSL_CTX. This should not prevent us from negotiating TLSv1.3, since we may change the SSL_CTX by the time we need a suitable certificate. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13305)
* Modify is_tls13_capable() to take account of the servername cbMatt Caswell2020-12-101-2/+13
| | | | | | | | | | | A servername cb may change the available certificates, so if we have one set then we cannot rely on the configured certificates to determine if we are capable of negotiating TLSv1.3 or not. Fixes #13291 Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13305)
* v3nametest: Make the gennames structure staticTomas Mraz2020-12-091-1/+1
| | | | | | | Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13635) (cherry picked from commit 7eea331eabe8b0a7ce03c9602a2bc72e9ddfe676)
* Fix typo in OPENSSL_malloc.podNan Xiao2020-12-091-1/+1
| | | | | | | | | | CLA: trivial Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13632) (cherry picked from commit 74c8dd1c516c7017477a205fd1f5f975cfa86722)
* Prepare for 1.1.1j-devMatt Caswell2020-12-084-3/+11
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Prepare for 1.1.1i releaseOpenSSL_1_1_1iMatt Caswell2020-12-084-5/+5
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Update copyright yearMatt Caswell2020-12-0817-17/+17
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Update CHANGES and NEWS for new releaseMatt Caswell2020-12-082-1/+14
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>