aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-05-01Prepare for 1.1.1-pre6 releaseOpenSSL_1_1_1-pre6Matt Caswell2-2/+2
Reviewed-by: Rich Salz <rsalz@openssl.org>
2018-05-01Update copyright yearMatt Caswell35-35/+35
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6145)
2018-04-30Use the config file from the source not the host for the testsKurt Roeckx1-0/+2
Fixes: #6046 Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #6125
2018-04-29Configurations/unix-Makefile.tmpl: harmonize with no-engine.Andy Polyakov1-1/+1
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6106)
2018-04-29Configurations/10-main.conf: force no-engine on ios targets.Andy Polyakov1-0/+3
Rationale for enforcing no-engine is because of disconnect between compile-time config and run-time, which is a per-application sandbox directory which one can't predict in advance. Besides, none of the bundled engines actually give an edge on iOS... Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6106)
2018-04-28Don't cleanup uninitialized thread local slotsBernd Edlinger1-4/+6
Fixes: #6120 Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/6123)
2018-04-27Fix drbg thread cleanup and error handlingBernd Edlinger1-17/+23
Fixes: #6081 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6089)
2018-04-27Update version docsMatt Caswell1-7/+6
Make it clear that you should not attempt to get the version before the first handshake is complete. Fixes #2893 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6013)
2018-04-27apps/s_server.c: Avoid unused variable due to 'no-dtls'Richard Levitte1-6/+4
Fixes #6098 Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/6104)
2018-04-27fix: BN_swap mishandles flagsBilly Brumley2-4/+80
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6099)
2018-04-26Fix mixed indentation (and other whitespace issues)Dr. Matthias St. Pierre6-54/+56
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6094)
2018-04-2615-test_out_option: Refactor and don't test directory write on VMSRichard Levitte1-30/+39
To my surprise, it turns out that on OpenVMS, opening './' (which is translated to '[]') for writing actually creates a file, '[].'. On OpenVMS, this is a perfectly valid file with no name or extension, just the delimiter between the two. Because of the mess the exception would generate in the test recipe, it gets refactored again, to clearly separate each test inside it, and use skips to avoid some of them (that makes it clear that they are skipped and why, when running the recipe). Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6100)
2018-04-26Fix last(?) batch of malloc-NULL placesRich Salz12-7/+59
Add a script to find them in the future Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/6103)
2018-04-26Fix memleaks in async apiBernd Edlinger3-30/+49
Fixes: #5950 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6038)
2018-04-26Wait max. 60 seconds for s_client to connectBernd Edlinger1-1/+1
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5964)
2018-04-26Add missing error code when alloc-return-nullFdaSilvaYY23-16/+82
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6085)
2018-04-26Update the *use_certificate* docsMatt Caswell1-0/+7
Note that calling the *use_certificate* functions will replace any existing certificate of the same type. The same thing applies for private keys. Fixes #2147 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6092)
2018-04-26Fix typo in the definition of tls13_ciphersMatt Caswell1-3/+3
SSL_kANY, and SSL_aANY were placed in the wrong fields. It makes no functional difference since these macros evaluate to 0 anyway, which is the correct value for these fields. Fixes #6048 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6095)
2018-04-26Use get_last_sys_error() instead of get_last_rtl_error()Richard Levitte1-2/+2
get_last_sys_error() already exists, so there's no need for yet another macro that fulfills the same purpose. Fixes #4120 Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6088)
2018-04-26PEM_def_callback(): use same parameter names as for pem_password_cbRichard Levitte2-9/+14
Add a bit more commentary to explain what's going on. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6080)
2018-04-26PEM_def_callback(): don't loop because of too short password givenRichard Levitte1-21/+12
That error is already caught by EVP_read_pw_string_min, and causes this function to return -1, so the code detecting too short passwords in this function is practically dead. Fixes #5465 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6080)
2018-04-25openssl rehash: exit 0 on warnings, same as c_rehashRichard Levitte1-5/+6
Fixes #6083 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/6084)
2018-04-25ms/uplink-x86.pl: close the file handle that was openedRichard Levitte1-1/+1
Fixes #5656 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6079)
2018-04-25Fix documentation for the -showcerts s_client optionMatt Caswell2-4/+7
This option shows the certificates as sent by the server. It is not the full verified chain. Fixes #4933 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6067)
2018-04-25apps/opt.c: Remove the access checks of input and output filesRichard Levitte1-12/+2
open() will take care of the checks anyway Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6033)
2018-04-25Better check of return values from app_isdir and app_accessRichard Levitte1-3/+3
[extended tests] Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6033)
2018-04-25Revert "Check directory is able to create files for various -out option"Richard Levitte3-104/+5
This reverts commit 555c94a0db9661428da0a45cb32b9f002324eefd. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6033)
2018-04-25Revert "Add VMS version of app_dirname()"Richard Levitte1-52/+3
This reverts commit 215a6730f1eaf53b01a4eb10d75bd09fd74f70cc. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6033)
2018-04-25Revert "Check on VMS as well"Richard Levitte1-2/+2
This reverts commit f6d765988f37c43edb1056ab83165f2569182e9d. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6033)
2018-04-25test/recipes/15-test_out_option.t: refine testsRichard Levitte1-34/+37
Test writing to the null device. This should be successful. Also, refactor so the planned number of tests is calculated. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6033)
2018-04-25[SM2_sign] add minimal EVP_PKEY functionality testingNicola Tuveri1-0/+9
The actual functionality of generating signatures through the `EVP_PKEY` API is completely untested. Current tests under the `EVP_PKEY` API (`test/recipes/30-test_evp_data/evppkey.txt`) only cover `Verify` and `Decrypt`, while encryption and signature generation are tested with ad-hoc clients (`test/sm2crypttest.c`, `test/sm2signtest.c`) that do not call the `EVP_PKEY` interface at all but soon-to-be private functions that bypass it (cf. PR#5895 ). It is my opinion that an ideal solution for the future would consist on enhancing the `test/evp_pkey` facility and syntax to allow tests to take control of the PRNG to inject known nonces and validate the results of `EVP_PKEY` implementations against deterministic known answer tests, but it is probably too late to work on this feature in time for next release. Given that commit b5a85f70d8 highlights some critical bugs in the hook between the `EVP_PKEY` interface and SM2 signature generation and that these defects escaped testing and code review, I think that at least for now it is beneficial to at least add the kind of "bogus" testing provided by this patch: this is a "fake" test as it does only verify that the SM2 `EVP_PKEY` interface is capable of creating a signature without failing, but it does not say anything about the generated signature being valid, nor does it test the functional correctness of the cryptosystem. Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6066)
2018-04-25[SM2_sign] fix double free and return valueNicola Tuveri1-3/+1
Currently, critical bugs prevent using SM2 signatures through the `EVP_PKEY` interface: any application that managed to satisfy the requirement of forcing SM3 as the message digest – even if this is currently not possible transparently through the `EVP_PKEY` interface and requires manually forcing the MD selection – would crash with a segmentation fault upon calling the `SM2_sign()` function. This is easily verified using the OpenSSL CLI to execute this critical code path under the right conditions: `openssl dgst -sm3 -hex -sign sm2.eckey /path/to/file/to/sign` The issue is caused by a double free at the end of `SM2_sign()` in `crypto/sm2/sm2_sign.c` in case of successful signature generation. In addition, even if the double free was not causing segfaults, the function returns the wrong return value in case of success (it would return 0 rather than 1). This patch fixes both problems. Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6066)
2018-04-25Fix the MAX_CURVELIST definitionMatt Caswell1-1/+1
The MAX_CURVELIST macro defines the total number of in-built SSL/TLS curves that we support. However it has not been updated as new curves are added. Fixes #5232 Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/6065)
2018-04-24Add missing malloc-return-null instanceRich Salz4-5/+8
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6071)
2018-04-24x509/by_dir.c: Remove dead codeDr. Matthias St. Pierre1-6/+0
Noticed in #5837 Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6064)
2018-04-24Add a test to verify the ClientHello version is the same in a renegMatt Caswell1-1/+29
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6059)
2018-04-24In a reneg use the same client_version we used last timeMatt Caswell1-0/+7
In 1.0.2 and below we always send the same client_version in a reneg ClientHello that we sent the first time around, regardless of what version eventually gets negotiated. According to a comment in statem_clnt.c this is a workaround for some buggy servers that choked if we changed the version used in the RSA encrypted premaster secret. In 1.1.0+ this behaviour no longer occurs. This restores the original behaviour. Fixes #1651 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6059)
2018-04-24Don't build AFALG on androidMatt Caswell1-0/+1
This didn't get built anyway for gcc because it was detected as a cross compile. But it did get built for clang - even though this is still a cross compile build. This disables it in all cases for Android. Fixes #5748 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/6057)
2018-04-24Allow TLSv1.3 EC certs to use compressed pointsMatt Caswell3-9/+17
The spec does not prohib certs form using compressed points. It only requires that points in a key share are uncompressed. It says nothing about point compression for certs, so we should not fail if a cert uses a compressed point. Fixes #5743 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/6055)
2018-04-24Document when a session gets removed from cacheMatt Caswell1-0/+5
Document the fact that if a session is not closed down cleanly then the session gets removed from the cache and marked as non-resumable. Fixes #4720 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/6053)
2018-04-24Remove some logically dead codeMatt Caswell1-3/+0
This dead code should have been removed as part of #5874 but got missed. Found by Coverity. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/6049)
2018-04-24Improve backwards compat with 1.0.2 for ECDHParametersMatt Caswell2-6/+3
In 1.0.2 you could configure automatic ecdh params by using the ECDHParameters config directive and setting it to the value "+Automatic" or just "Automatic". This is no longer required in 1.1.0+ but we still recognise the "+Automatic" keyword for backwards compatibility. However we did not recognise just "Automatic" without the leading "+" which is equally valid. This commit fixes that omission. Fixes #4113 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6035)
2018-04-24X509: add more error codes on malloc or sk_TYP_push failureFdaSilvaYY17-71/+175
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/5837)
2018-04-24a_strex.c: improve documentation of 'tag2nbyte' lookup tableDr. Matthias St. Pierre1-6/+16
The 'tag2nbyte' lookup table maps the tags of ASN1 string types to their respective character widths. It is used for example by ASN1_STRING_to_UTF8(). This commit adds the tag names as comments. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6062)
2018-04-23Remove superfluous NULL checks. Add Andy's BN_FLG comment.Billy Brumley2-10/+20
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6009)
2018-04-23Move up check for EC_R_INCOMPATIBLE_OBJECTS and for the point at infinity caseNicola Tuveri1-9/+9
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6009)
2018-04-23Pass throughNicola Tuveri1-27/+30
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6009)
2018-04-23ladder description: why it worksBilly Brumley1-0/+60
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6009)
2018-04-23Address code style commentsNicola Tuveri1-31/+33
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6009)
2018-04-23Elliptic curve scalar multiplication with timing attack defensesBilly Brumley2-0/+195
Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com> Co-authored-by: Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi> Co-authored-by: Sohaib ul Hassan <soh.19.hassan@gmail.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6009)