summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-03-27Prepare for 1.1.0h releaseOpenSSL_1_1_0hMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2018-03-27Update copyright yearMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2018-03-27Update CHANGES and NEWS for the new releaseMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2018-03-27pariscid.pl: fix nasty typo in CRYPTO_memcmp.Andy Polyakov
Comparison was effectively reduced to least significant bits. CVE-2018-0733 Reviewed-by: Matt Caswell <matt@openssl.org>
2018-03-27Add fuzz corpora file that found the ASN.1 stack depth issueMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org>
2018-03-27Limit ASN.1 constructed types recursive definition depthMatt Caswell
Constructed types with a recursive definition (such as can be found in PKCS7) could eventually exceed the stack given malicious input with excessive recursion. Therefore we limit the stack depth. CVE-2018-0739 Credit to OSSFuzz for finding this issue. Reviewed-by: Rich Salz <rsalz@openssl.org>
2018-03-27Copy the produced .dll files to fuzz/ as well (Cygwin & mingw)Richard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5759)
2018-03-26Previously this x509 command line was working, restore thatBernd Edlinger
openssl x509 -in server.pem -signkey privkey.pem -out server.pem Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5747)
2018-03-26Fix dsaparam -genkey with DER outformBernd Edlinger
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5744) (cherry picked from commit 5281435258b5d8201a00b4a9781bb724d99630f0)
2018-03-25Fix ecparam -genkey with point compression or DER outformBernd Edlinger
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5741) (cherry picked from commit 4bdc25b07f007d9c383fbad159f81543f2e95965)
2018-03-22Handle partial messages in TLSProxyBernd Edlinger
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5726)
2018-03-21The default conv_form is uncompressedMatt Caswell
Fixes #5711 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5712) (cherry picked from commit ab0a3914a64d8f1fce22795c02269e1288df52b1)
2018-03-21consttime flag changedSamuel Weiser
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5170)
2018-03-21used ERR set/pop markSamuel Weiser
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5170)
2018-03-21Replaced variable-time GCD with consttime inversion to avoid side-channel ↵Samuel Weiser
attacks on RSA key generation Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5170)
2018-03-21Cleanup the s_time command.Bernd Edlinger
Various code-cleanups. Use SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY) insead of handling SSL_ERROR_WANT_READ everywhere. Turn off the linger option on connected sockets to avoid failure. Add BIO_set_conn_mode(conn, BIO_SOCK_NODELAY) to improve thruput. Continue test even without -cipher option as in 1.0.2. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5698)
2018-03-21Don't wait for dry at the end of a handshakeMatt Caswell
For DTLS/SCTP we were waiting for a dry event during the call to tls_finish_handshake(). This function just tidies up various internal things, and after it completes the handshake is over. I can find no good reason for waiting for a dry event here, and nothing in RFC6083 suggests to me that we should need to. More importantly though it seems to be wrong. It is perfectly possible for a peer to send app data/alerts/new handshake while we are still cleaning up our handshake. If this happens then we will never get the dry event and so we cannot continue. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5085)
2018-03-21Check for alerts while waiting for a dry eventMatt Caswell
At a couple of points in a DTLS/SCTP handshake we need to wait for a dry event before continuing. However if an alert has been sent by the peer then we will never receive that dry event and an infinite loop results. This commit changes things so that we attempt to read a message if we are waiting for a dry event but haven't got one yet. This should never succeed, but any alerts will be processed. Fixes #4763 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5085)
2018-03-20Do not cache sessions with zero sid_ctx_length when SSL_VERIFY_PEERBenjamin Kaduk
The sid_ctx is something of a "certificate request context" or a "session ID context" -- something from the application that gives extra indication of what sort of thing this session is/was for/from. Without a sid_ctx, we only know that there is a session that we issued, but it could have come from a number of things, especially with an external (shared) session cache. Accordingly, when resuming, we will hard-error the handshake when presented with a session with zero-length sid_ctx and SSL_VERIFY_PEER is set -- we simply have no information about the peer to verify, so the verification must fail. In order to prevent these future handshake failures, proactively decline to add the problematic sessions to the session cache. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5175) (cherry picked from commit d316cdcf6d8d6934663278145fe0a8191e14a8c5)
2018-03-21Remove mentioned link between message digests and public key algorithms.Pauli
Refer #5682 This is the same but for 1.1.0 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5683)
2018-03-20Make pkeyutl a bit more user-friendlyJohannes Bauer
Give meaningful error messages when the user incorrectly uses pkeyutl; backport to OpenSSL_1_1_0-stable, cherrypicked from f6add6ac2c42df37d63b36dbef43e701875893d7. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5699)
2018-03-19s_client, s_server: do generic SSL configuration first, specialization afterRichard Levitte
We did the SSL_CONF_cmd() pass last of all things that could affect the SSL ctx. However, the results of this, for example: -max_protocol TLSv1.3 -tls1_2 ... would mean that the protocol min got set to TLSv1.2 and the protocol max to TLSv1.3, when they should clearly both be TLSv1.2. However, if we see the SSL_CONF_cmd() switches as generic and those internal to s_client and s_server as specialisations, we get something that makes a little more sense. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5679) (cherry picked from commit 8f8be103fd7d8b5992724d618c99cbddd7dd00d7)
2018-03-19Enhance ssltestlib's create_ssl_ctx_pair to take min and max proto versionRichard Levitte
Have all test programs using that function specify those versions. Additionally, have the remaining test programs that use SSL_CTX_new directly specify at least the maximum protocol version. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5662)
2018-03-19In TLSProxy::Proxy, specify TLSv1.2 as maximum allowable protocolRichard Levitte
Partially fixes #5661 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5662)
2018-03-19Support "-min_protocol" and "-max_protocol" in s_server and s_clientRichard Levitte
If for nothing else, they are needed when doing a regression test Partially fixes #5661 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5662)
2018-03-19Stop test/shlibloadtest.c from failing in a regression testRichard Levitte
When doing a regression test, it's obvious that the version test/shlibloadtest is built for will not be the same as the library version. So we change the test to check for assumed compatibility. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5620)
2018-03-19Add a simple method to run regression testsRichard Levitte
This is only useful when building shared libraries. This allows us to run our tests against newer libraries when the time comes. Simply do this: OPENSSL_REGRESSION=/other/OpenSSL/build/tree make test ($OPENSSL_REGRESSION *must* be an absolute path) Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5620)
2018-03-17Fix a memory leak in tls1_macBernd Edlinger
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5651)
2018-03-17Fix a memory leak in n_ssl3_macBernd Edlinger
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5649)
2018-03-17Fix error handling in b2i_dss and b2i_rsaBernd Edlinger
Fixes: #5567 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5624) (cherry picked from commit d288d7fc7beaa1d720a539d6ae27dba2c910ee68)
2018-03-15Windows makefile: don't use different looking variants of same cmdRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5635) (cherry picked from commit ad3350a90b81275ed2357cad0b9d435d6077bf9d)
2018-03-15Fix a memory leak in the ca applicationMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5627)
2018-03-15Allow multiple entries without a Subject even if unique_subject == yesMatt Caswell
It is quite likely for there to be multiple certificates with empty subjects, which are still distinct because of subjectAltName. Therefore we allow multiple certificates with an empty Subject even if unique_subject is set to yes. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5627)
2018-03-15Report a readable error on a duplicate cert in ca appMatt Caswell
Commit 87e8feca (16 years ago!) introduced a bug where if we are attempting to insert a cert with a duplicate subject name, and duplicate subject names are not allowed (which is the default), then we get an unhelpful error message back (error number 2). Prior to that commit we got a helpful error message which displayed details of the conflicting entry in the database. That commit was itself attempting to fix a bug with the noemailDN option where we were setting the subject field in the database too early (before extensions had made any amendments to it). This PR moves the check for a conflicting Subject name until after all changes to the Subject have been made by extensions etc. This also, co-incidentally fixes the ca crashing bug described in issue 5109. Fixes #5109 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5627)
2018-03-15Revert "Don't allow an empty Subject when creating a Certificate"Matt Caswell
This reverts commit f2982ad79c9eeac4d8ee4225056f971eadf9302b. Empty Subjects should be permissible. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5627)
2018-03-15Revert "Don't crash on a missing Subject in index.txt"Matt Caswell
This reverts commit 462163e91a6f06e8bf0791a01f6e0a1897ad2081. Empty subjects should be permissible. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5627)
2018-03-12Free the correct type in OBJ_add_object()Matt Caswell
We should be using ASN1_OBJECT_free() not OPENSSL_free(). Fixes #5568 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5598)
2018-03-12Improve error handling in pk7_doitMatt Caswell
If a mem allocation failed we would ignore it. This commit fixes it to always check. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5596) (cherry picked from commit 4718f449a3ecd5efac62b22d0fa9a759a7895dbc)
2018-03-12Configurations/unix-Makefile.tmpl: overhaul assembler make rules.Andy Polyakov
So far assembly modules were built as .pl->.S->.s followed by .s->.o. This posed a problem in build_all_generated rule if it was executed on another computer. So we change rule sequence to .pl->.S and then .S->.s->.o. (backport of a23f03166e0ec49ac09b3671e7ab4ba4fa57d42a) Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5581)
2018-03-11Fix propotype to include the const qualifierKurt Roeckx
Reviewed-by: Andy Polyakov <appro@openssl.org> GH: #5582
2018-03-10Configure: catch the build tree configdata.pmRichard Levitte
There are things depending on configdata.pm. However, it's perfectly possible that there is one in the source directory from a previous build, and that might disrupt an out of source build. To avoid this conflict, make sure never to use the source tree configdata.pm in that case, i.e. make the hard assumption that it's a generated file in the build tree, which it is. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5546) (cherry picked from commit 846e4c4d650da50f049ee74901e840ffe409fa69)
2018-03-10Configure: don't mangle the directory again when checking DEPEND inclusionRichard Levitte
When generating the correct inclusion directory for DEPEND, we mangled it to be relative to the build or the source directory. However, the value we handle already come with a correct directory, so we only need to use it as is. Fixes #5543 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5546) (cherry picked from commit 906032d5a04f8cf8af5f515e0a8ea44a2285a2cc)
2018-03-09Restore the display of options with 'openssl version -a'Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5572) (cherry picked from commit b971b05ec6893fe7a3416a3b34d50a52b6cfe9bc)
2018-03-08Configurations/10-main.conf: add -fno-common back to darwin-ppc-cc.Andy Polyakov
-fno-common was removed for all Darwin targets in 0c8734198d4282f6997965a03cd2e0ceaf207549 with rationale "it's either 'ranlib -c' or '-fno-common'." However, it's still absolutely required in 32-bit darwin-ppc-cc. And when trying things out I didn't quite see why it was formulated as one-or-another choice, as 'ranlib -c' shouldn't [and doesn't] have problems with object modules without commons. [Well, to be frank, I didn't manage to reproduce the problem the modification was meaning to resolve either...] (backport of 107783d9c56e7dcb338c011fa202ffa8f066dbca) Reviewed-by: Richard Levitte <levitte@openssl.org>
2018-03-08Remove useless -D_ENDIAN from MPE/iX-gcc configRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5565)
2018-03-08Make a few more asm modules conform: last argument is output fileRichard Levitte
Fixes #5310 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5316)
2018-03-07Configurations/unix-Makefile.tmpl: remove assignment of AS and ASFLAGSRichard Levitte
We have never used these variables with the Unix Makefile, and there's no reason for us to change this, so to avoid confusion, we remove them. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5545) (cherry picked from commit 61ab6919183fe804f3ed5cf26fcc121a4ecbb6af)
2018-03-07BIO_s_mem.pod: fix indirection for out parameter **ppDr. Matthias St. Pierre
BIO_get_mem_data() and BIO_get_mem_ptr() assign to *pp, not pp Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5544)
2018-03-06util/dofile.pl: only quote stuff that actually needs quotingRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5533) (cherry picked from commit 49cd47eaababc8c57871b929080fc1357e2ad7b8)
2018-03-06opensslconf.h.in: Use all the "openssl_api_defines"Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5533) (cherry picked from commit cd15cb4d21fce81c94bc16f991c4bb1c73e71bfe)