summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Prepare for 1.0.2k releaseOpenSSL_1_0_2kMatt Caswell2017-01-264-6/+6
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Update CHANGES and NEWS for new releaseMatt Caswell2017-01-262-0/+32
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Better check of DH parameters in TLS dataRichard Levitte2017-01-261-11/+33
| | | | | | | | | | | When the client reads DH parameters from the TLS stream, we only checked that they all are non-zero. This change updates the check as follows: check that p is odd check that 1 < g < p - 1 Reviewed-by: Matt Caswell <matt@openssl.org>
* bn/asm/x86_64-mont5.pl: fix carry bug in bn_sqr8x_internal.Andy Polyakov2017-01-261-9/+7
| | | | | | CVE-2017-3732 Reviewed-by: Rich Salz <rsalz@openssl.org>
* crypto/evp: harden RC4_MD5 cipher.Andy Polyakov2017-01-261-0/+2
| | | | | | | | | | | | | | | Originally a crash in 32-bit build was reported CHACHA20-POLY1305 cipher. The crash is triggered by truncated packet and is result of excessive hashing to the edge of accessible memory (or bogus MAC value is produced if x86 MD5 assembly module is involved). Since hash operation is read-only it is not considered to be exploitable beyond a DoS condition. Thanks to Robert Święcki for report. CVE-2017-3731 Reviewed-by: Rich Salz <rsalz@openssl.org>
* Fix error handling in compute_key, BN_CTX_get can return NULLBernd Edlinger2017-01-241-0/+2
| | | | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2132) (cherry picked from commit 7928ee4d685b727619555bc1ec0aee805f6fc8c4)
* Fix a ssl session leak due to OOM in lh_SSL_SESSION_insertBernd Edlinger2017-01-241-0/+9
| | | | | | | | | | | | - s == NULL can mean c is a new session *or* lh_insert was unable to create a hash entry. - use lh_SSL_SESSION_retrieve to check for this error condition. - If it happens simply remove the extra reference again. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2138) (cherry picked from commit 38088ce9934a90d4aea486edbff864f3935342e6)
* Fix SSL_VERIFY_CLIENT_ONCEMatt Caswell2017-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The flag SSL_VERIFY_CLIENT_ONCE is documented as follows: B<Server mode:> only request a client certificate on the initial TLS/SSL handshake. Do not ask for a client certificate again in case of a renegotiation. This flag must be used together with SSL_VERIFY_PEER. B<Client mode:> ignored But the implementation actually did nothing. After the server sends its ServerKeyExchange message, the code was checking s->session->peer to see if it is NULL. If it was set then it did not ask for another client certificate. However s->session->peer will only be set in the event of a resumption, but a ServerKeyExchange message is only sent in the event of a full handshake (i.e. no resumption). The documentation suggests that the original intention was for this to have an effect on renegotiation, and resumption doesn't come into it. The fix is to properly check for renegotiation, not whether there is already a client certificate in the session. As far as I can tell this has been broken for a *long* time. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1984)
* Add missing va_endRich Salz2017-01-201-0/+1
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2267)
* Fix DSA parameter generation control errorRichard Levitte2017-01-201-1/+1
| | | | | | | | | | | | | | When setting the digest parameter for DSA parameter generation, the signature MD was set instead of the parameter generation one. Fortunately, that's also the one that was used for parameter generation, but it ultimately meant the parameter generator MD and the signature MD would always be the same. Fixes github issue #2016 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2250) (cherry picked from commit 8a05c4d3b5a1bfb9193ea24e71735e11de7168d2)
* Clean one unused variable, plus an useless one.FdaSilvaYY2017-01-181-6/+2
| | | | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1906) (cherry picked from commit 2191dc846a85ce82925cb06b4dd8649da7fc403c)
* GH1986: Document -header flag.Rich Salz2017-01-101-0/+9
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2209)
* Fix error handling in SSL_CTX_newBernd Edlinger2017-01-101-3/+1
| | | | | | | | Dont free rbuf_freelist here, SSL_CTX_free will do that. Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #2129
* Fix a memory leak in RSA_padding_add_PKCS1_OAEP_mgf1Bernd Edlinger2017-01-091-2/+6
| | | | | | | Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org> GH: #2140 (cherry picked from commit c6d215e0d278fcd51ad474a3647b61e1b67290bb)
* replace "will lookup up" by "will look up"Markus Triska2016-12-291-1/+1
| | | | | | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> CLA: trivial (Merged from https://github.com/openssl/openssl/pull/2145) (cherry picked from commit 67adf0a7c273a82901ce8705ae8d71ee2f1c959c)
* Reformat M_check_autoarg to match our coding styleRichard Levitte2016-12-201-19/+16
| | | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2121) (cherry picked from commit 2629440d42e4d64cd0cb849c1b19fa87a4fcb90f)
* M_check_autoarg: sanity check the keyRichard Levitte2016-12-203-4/+12
| | | | | | | | For now, checking that the size is non-zero will suffice. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2120) (cherry picked from commit d7c8f142ea5953bf260b70a58739c1c9b0f038eb)
* Fix typo.Finn Hakansson2016-12-181-1/+1
| | | | | | | | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> CLA: trivial (Merged from https://github.com/openssl/openssl/pull/2086) (cherry picked from commit 0b742f93ea7882a447f6523ac56a6f847d9f8e92) (cherry picked from commit f7a2da1d584bed2e05774f92d69fee39ce3edda2)
* zero pad DHE public key in ServerKeyExchange message for interoprussor2016-12-141-0/+27
| | | | | | | | Some versions of the Microsoft TLS stack have problems when the DHE public key is encoded with fewer bytes than the DHE prime. (Backported from master) Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1350)
* Fix ssl_cert_dup: change one 'return NULL' to 'goto err'Richard Levitte2016-12-141-1/+1
| | | | Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2082)
* Make 'err' lable in ssl_cert_dup unconditionalRichard Levitte2016-12-141-2/+0
| | | | Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2082)
* Fix a bug in clienthello processingBenjamin Kaduk2016-12-133-54/+37
| | | | | | | | | | | | | | - Always process ALPN (previously there was an early return in the certificate status handling) 1.0.2 did not have the double-alert issue from master, but it seems cleanest to pull in the structural change to alert handling anyway and jump to f_err instead of err to send the alert in the caller. (cherry picked from commit 70c22888c1648fe8652e77107f3c74bf2212de36) Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* perlasm/x86_64-xlate.pl: refine sign extension in ea package.Andy Polyakov2016-12-121-2/+9
| | | | | | | | | | | | $1<<32>>32 worked fine with either 32- or 64-bit perl for a good while, relying on quirk that [pure] 32-bit perl performed it as $1<<0>>0. But this apparently changed in some version past minimally required 5.10, and operation result became 0. Yet, it went unnoticed for another while, because most perl package providers configure their packages with -Duse64bitint option. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 82e089308bd9a7794a45f0fa3973d7659420fbd8)
* UI_OpenSSL()'s session opener fails on MacOS XRichard Levitte2016-12-101-0/+9
| | | | | | | | | If on a non-tty stdin, TTY_get() will fail with errno == ENODEV. We didn't catch that. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2039) (cherry picked from commit c901bccec6f747467e1af31473655c8290e32309)
* VMS UI_OpenSSL: if the TT device isn't a tty, flag instead of errorRichard Levitte2016-12-101-20/+28
| | | | | | | | On all platforms, if the controlling tty isn't an actual tty, this is flagged by setting is_a_tty to zero... except on VMS, where this was treated as an error. Change this to behave like the other platforms. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2064)
* Check input length to pkey_rsa_verify()Dr. Stephen Henson2016-12-101-0/+4
| | | | | | | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2065) (cherry picked from commit 71bbc79b7d3b1195a7a7dd5f547d52ddce32d6f0) Conflicts: crypto/rsa/rsa_err.c include/openssl/rsa.h
* Remove extra bangRichard Levitte2016-12-081-1/+1
| | | | | | | | A bang (!) slipped through in the recent UI cleanup Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2051) (cherry picked from commit 949320c567811e714216ea987fe24eea1b56da5e)
* UI code style cleanupRichard Levitte2016-12-082-67/+73
| | | | | | | | Mostly condition check changes. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2047) (cherry picked from commit 120fb9e43656e1801c75a4fbb7c178ebec9bac18)
* Revert "Fix heartbeat_test"Matt Caswell2016-11-291-4/+4
| | | | | | | | | Commit fa4c37457 got reverted, so this one also needs to be reverted as a result. This reverts commit ad69a30323cbc6723c2387d6ce546a51b10c42d0. Reviewed-by: Richard Levitte <levitte@openssl.org>
* apps/speed.c: Fix crash when config loading failsVitezslav Cizek2016-11-261-6/+4
| | | | | | | | | | Move rsa_key initialization in front of load_config(). If loading the config fails, rsa_key isn't initialized and may cause invalid free() in the end: cleanup. Remove superfluous memset. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* INSTALL: clarify 386 and no-sse2 options.Andy Polyakov2016-11-262-21/+29
| | | | | | This is 1.0.2-specific reformat of 5ae5dc96610f0a598dac9d2f267b5c0ddd77b2e4. Reviewed-by: Rich Salz <rsalz@openssl.org>
* modes/ctr128.c: fix false carry in counter increment procedure.Andy Polyakov2016-11-251-1/+1
| | | | | | | | GH issue #1916 affects only big-endian platforms. TLS is not affected, because TLS fragment is never big enough. Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 76f572ed0469a277d92378848250b7a9705d3071)
* Clarify what X509_NAME_online does with the given buffer and sizeRichard Levitte2016-11-231-3/+5
| | | | | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1980) (cherry picked from commit 19cb71ef6e414759d737918bab10be2cc1d8bd99) (cherry picked from commit 793d9b79033c2fffc8e781dab2fd678661b348cd)
* Make SSL_read and SSL_write return the old behaviour and document it.Kurt Roeckx2016-11-216-72/+45
| | | | | | | | | | | Backport of beacb0f0c1ae7b0542fe053b95307f515b578eb7, revert of fa4c374572e94f467900f5820cd1d00af2470a17 Fixes: #1903 Reviewed-by: Matt Caswell <matt@openssl.org> GH: #1967
* Use consistent variable namesBeat Bolli2016-11-181-2/+1
| | | | | | | | | | | | In the X509_NAME_get_index_by_NID.pod example, the initialized variable is called "loc", but the one used in the for loop is called "lastpos". Make the names match. CLA: trivial Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1949) (cherry picked from commit 4b9c2669f31da26bfe56f629973fa014083dc2a0)
* domd: Preserve Makefile time when it is unchangedOrgad Shaneh2016-11-161-2/+5
| | | | | | | | | | | also on systems with makedepend that does not report its version, or that its version does not contain "gcc" or "clang". Some versions of makedepends just overwrite Makefile. Preserve the timestamp of the previous Makefile, and copy it back if it is unchanged. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1370)
* mklink: Do not needlessly overwrite linked files...Orgad Shaneh2016-11-161-2/+4
| | | | | | | | | | | | ... on systems with symlinks. Creating or overwriting a symlink sets the file ctime to the current time. This causes needless rebuilds because the time of all the headers is changed, and apparently make considers the link's time rather than the time of the target. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1370)
* domd: Do not needlessly overwrite MakefilesOrgad Shaneh2016-11-161-1/+5
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1370)
* mklink: Do not needlessly overwrite linked files...Orgad Shaneh2016-11-161-1/+1
| | | | | | | | | | ... on systems without symlinks. Overwriting all the headers on each Configure causes full rebuild even if nothing has changed. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1370)
* Configure: Improve incremental build timeOrgad Shaneh2016-11-161-5/+24
| | | | | | | | | | | | | When Makefile/opensslconf.h is unchanged, don't write it at all. Currently every time Configure is executed, these files are overwritten. Makefile leads to regeneration of buildinf.h, and opensslconf.h is itself a central header. As a result, Configure triggers full rebuild, even if nothing is changed. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1370)
* Check return value of some BN functions.Rich Salz2016-11-156-17/+24
| | | | | | | | | | | | Factorise multiple bn_get_top(group->field) calls Add missing checks on some conditional BN_copy return value Add missing checks on some BN_copy return value Add missing checks on a few bn_wexpand return value Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1626) (cherry picked from commit 78e09b53a40729f5e99829ccc733b592bd22fea1)
* Solution proposal for issue #1647.Matthias Kraft2016-11-121-1/+4
| | | | | | | | | | Avoid a memory alignment issue. Signed-off-by: Matthias Kraft <Matthias.Kraft@softwareag.com> CLA: trivial Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1650)
* Update CHANGES and NEWSMatt Caswell2016-11-102-1/+24
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* bn/asm/x86_64-mont.pl: fix for CVE-2016-7055 (Low severity).Andy Polyakov2016-11-101-3/+2
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 2fac86d9abeaa643677d1ffd0a139239fdf9406a)
* Makefile.org: clear APPS environment variable.Andy Polyakov2016-11-081-1/+2
| | | | | | | Build failure was reported in GH#1818 if APPS environment was defined. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1864)
* Missed a mention of RTRich Salz2016-11-041-12/+12
| | | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1849) (cherry picked from commit 1e62cc12f35408508594be254f40bf9b65d2a3a9)
* Add a CHANGES entry for the unrecognised record type changeMatt Caswell2016-11-021-1/+5
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fail if an unrecognised record type is receivedMatt Caswell2016-11-021-8/+5
| | | | | | | | | | | | TLS1.0 and TLS1.1 say you SHOULD ignore unrecognised record types, but TLS 1.2 says you MUST send an unexpected message alert. We swap to the TLS 1.2 behaviour for all protocol versions to prevent issues where no progress is being made and the peer continually sends unrecognised record types, using up resources processing them. Issue reported by 郭志攀 Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix heartbeat_testMatt Caswell2016-11-021-4/+4
| | | | | | | | | | | The heartbeat_test reaches into the internals of libssl and calls some internal functions. It then checks the return value to check its what it expected. However commit fa4c37457 changed the return value of these internal functions, and now the test is failing. The solution is to update the test to look for the new return value. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Secure our notification email.Richard Levitte2016-11-021-1/+1
| | | | | | | | Forks will have to define their own Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1821) (cherry picked from commit 5e28b1c1e048eef600dc49820934a5e1531186d4)