summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-12-03If we really get a situation where the underlying mtu is less than the minimumMatt Caswell
we will support then dtls1_do_write can go into an infinite loop. This commit fixes that. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit d3d9eef31661633f5b003a9e115c1822f79d1870)
2014-12-03Fix dtls_query_mtu so that it will always either complete with an mtu that isMatt Caswell
at least the minimum or it will fail. There were some instances in dtls1_query_mtu where the final mtu can end up being less than the minimum, i.e. where the user has set an mtu manually. This shouldn't be allowed. Also remove dtls1_guess_mtu that, despite having logic for guessing an mtu, was actually only ever used to work out the minimum mtu to use. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 1620a2e49c777f31f2ce57966ae74006b48ad759)
2014-12-03Remove instances in libssl of the constant 28 (for size of IPv4 header + UDP)Matt Caswell
and instead use the value provided by the underlying BIO. Also provide some new DTLS_CTRLs so that the library user can set the mtu without needing to know this constant. These new DTLS_CTRLs provide the capability to set the link level mtu to be used (i.e. including this IP/UDP overhead). The previous DTLS_CTRLs required the library user to subtract this overhead first. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 59669b6abf620d1ed2ef4d1e2df25c998b89b64d) Conflicts: ssl/d1_both.c ssl/ssl.h ssl/ssl_lib.c
2014-12-03There are a number of instances throughout the code where the constant 28 isMatt Caswell
used with no explanation. Some of this was introduced as part of RT#1929. The value 28 is the length of the IP header (20 bytes) plus the UDP header (8 bytes). However use of this constant is incorrect because there may be instances where a different value is needed, e.g. an IPv4 header is 20 bytes but an IPv6 header is 40. Similarly you may not be using UDP (e.g. SCTP). This commit introduces a new BIO_CTRL that provides the value to be used for this mtu "overhead". It will be used by subsequent commits. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 0d3ae34df573f477b6b1aaf614d52dcdfcff5fce) Conflicts: crypto/bio/bio.h crypto/bio/bss_dgram.c
2014-12-03The first call to query the mtu in dtls1_do_write correctly checks that theMatt Caswell
mtu that we have received is not less than the minimum. If its less it uses the minimum instead. The second call to query the mtu does not do that, but instead uses whatever comes back. We have seen an instance in RT#3592 where we have got an unreasonably small mtu come back. This commit makes both query checks consistent. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 6abb0d1f8e702a0daa9c32b8021d01eda0483018)
2014-12-03The SSL_OP_NO_QUERY_MTU option is supposed to stop the mtu from beingMatt Caswell
automatically updated, and we should use the one provided instead. Unfortunately there are a couple of locations where this is not respected. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 001235778a6e9c645dc0507cad6092d99c9af8f5)
2014-12-03Verify that we have a sensible message len and fail if notMatt Caswell
RT#3592 provides an instance where the OPENSSL_assert that this commit replaces can be hit. I was able to recreate this issue by forcing the underlying BIO to misbehave and come back with very small mtu values. This happens the second time around the while loop after we have detected that the MTU has been exceeded following the call to dtls1_write_bytes. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit cf75017bfd60333ff65edf9840001cd2c49870a3)
2014-11-28Check for FindNextFile when defining it rather than FindFirstFileRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2014-11-28[PR3597] Advance to the next state variant when reusing messages.Richard Levitte
Previously, state variant was not advanced, which resulted in state being stuck in the st1 variant (usually "_A"). This broke certificate callback retry logic when accepting connections that were using SSLv2 ClientHello (hence reusing the message), because their state never advanced to SSL3_ST_SR_CLNT_HELLO_C variant required for the retry code path. Reported by Yichun Zhang (agentzh). Signed-off-by: Piotr Sikora <piotr@cloudflare.com> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-11-28Correct some layout issues, convert all remaining tabs to appropriate ↵Richard Levitte
amounts of spaces. Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 8123d158ab6f0a6a468748c133e33c2063ff36b5)
2014-11-28Improves the proxy certificates howto doc.Alok Menghrajani
The current documentation contains a bunch of spelling and grammar mistakes. I also found it hard to understand some paragraphs, so here is my attempt to improve its readability. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 03b637a730e4a298c360cc143de7564060c06324)
2014-11-27Fixed warning in ssl2_encMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 2db95e094d23b41d2305c0a01db66694ea77f936)
2014-11-27Check EVP_Cipher return values for SSL2Matt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 5fc8bb6ab71b5f7ce2dd67a47494bb5b5c6dc374)
2014-11-27Add checks to the return value of EVP_Cipher to prevent silent encryption ↵Matt Caswell
failure. PR#1767 Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 244d0955adc027c0f41a3251e55d145bf940f9ce)
2014-11-27Remove redundant checks in ssl_cert_dup. This was causing spurious error ↵Matt Caswell
messages when using GOST PR#3613 Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit fc3968a25ce0c16cab8730ec0d68a59856158029)
2014-11-27Remove duplicated codeMatt Caswell
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2014-11-27Tidy up ocsp help outputMatt Caswell
Reviewed-by: Dr. Stephen Henson <steve@openssl.org> (cherry picked from commit 5e31a40f47c6bfd09c718d2af42ba8d8fe6bb932) Conflicts: apps/ocsp.c (cherry picked from commit e16458269036f4334525009906d346f68a73b2a4)
2014-11-27Add documentation on -timeout option in the ocsp utilityAndré Guerreiro
PR#3612 Reviewed-by: Dr. Stephen Henson <steve@openssl.org> (cherry picked from commit de87dd46c1283f899a9ecf4ccc72db74f36afbf2) (cherry picked from commit 4d3df37bc7fd33d0bec5da04d2572caa0cdbab75)
2014-11-26Fixed memory leak due to incorrect freeing of DTLS reassembly bit maskMatt Caswell
PR#3608 Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 8a35dbb6d89a16d792b79b157b3e89443639ec94)
2014-11-25Corrected comments in ssl.h about SSLv23_method and friendsMatt Caswell
PR#3574 Reviewed-by: Dr. Stephen Henson <steve@openssl.org> (cherry picked from commit 3a0765882c4b3b67960b7efb203570764dd4ed29)
2014-11-13Fix cross reference table generator.Dr. Stephen Henson
If the hash or public key algorithm is "undef" the signature type will receive special handling and shouldn't be included in the cross reference table. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 55f7fb8848b6e4bec291724a479e1580d6f407d6) Conflicts: crypto/objects/obj_xref.h
2014-11-12Fixes a minor typo in the EVP docs.Alok Menghrajani
Out is the buffer which needs to contain at least inl + cipher_block_size - 1 bytes. Outl is just an int*. Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 5211e094dec9486a540ac480f345df1a8d2b2862)
2014-11-12Correct timestamp output when clock_precision_digits > 0Michal Bozon
PR#3535 Reviewed-by: Stephen Henson <steve@openssl.org>
2014-11-12Fix free of garbage pointer. PR#3595Matt Caswell
Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit e04d426bf98ebb22abf0f15b6f09d333a6e8b2ad)
2014-11-11Fix warning about negative unsigned intergersKurt Roeckx
Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-10-28Use only unsigned arithmetic in constant-time operationsSamuel Neves
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-10-21Fix and improve SSL_MODE_SEND_FALLBACK_SCSV documentation.Bodo Moeller
Reviewed-by: Rich Salz <rsalz@openssl.org>
2014-10-21When processing ClientHello.cipher_suites, don't ignore cipher suitesBodo Moeller
listed after TLS_FALLBACK_SCSV. RT: 3575 Reviewed-by: Emilia Kasper <emilia@openssl.org>
2014-10-21Keep old method in case of an unsupported protocolKurt Roeckx
When we're configured with no-ssl3 and we receive an SSL v3 Client Hello, we set the method to NULL. We didn't used to do that, and it breaks things. This is a regression introduced in 62f45cc27d07187b59551e4fad3db4e52ea73f2c. Keep the old method since the code is not able to deal with a NULL method at this time. CVE-2014-3569, PR#3571 Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 392fa7a952e97d82eac6958c81ed1e256e6b8ca5)
2014-10-20no-ssl2 with no-ssl3 does not mean drop the ssl libTim Hudson
Reviewed-by: Geoff Thorpe <geoff@openssl.org> (cherry picked from commit c882abd52269a59ed8e0510e5febf667428ece85)
2014-10-17e_os.h: refine inline override logic (to address warnings in debug build).Andy Polyakov
Reviewed-by: Dr Stephen Henson <steve@openssl.org> (cherry picked from commit 55c7a4cf112bf154ed405ee05a6b7924b6b1ba92)
2014-10-17e_os.h: allow inline functions to be compiled by legacy compilers.Andy Polyakov
Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 40155f408985aff2e9f1b61b7cb04a3e518633a1)
2014-10-17RT3547: Add missing static qualifierKurt Cancemi
Reviewed-by: Ben Laurie <ben@openssl.org> (cherry picked from commit 87d388c955c14a7c1371f9c7555fb429a406a3d3)
2014-10-15Prepare for 1.0.0p-devMatt Caswell
Reviewed-by: Stephen Henson <steve@openssl.org>
2014-10-15Prepare for 1.0.0o releaseOpenSSL_1_0_0oMatt Caswell
Reviewed-by: Stephen Henson <steve@openssl.org>
2014-10-15Updates to NEWSMatt Caswell
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
2014-10-15Update to CHANGES fileMatt Caswell
Reviewed-by: Bodo Möller <bodo@openssl.org>
2014-10-15Fix no-ssl3 configuration optionGeoff Thorpe
CVE-2014-3568 Reviewed-by: Emilia Kasper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2014-10-15Fix for session tickets memory leak.Dr. Stephen Henson
CVE-2014-3567 Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-10-15Fix SSL_R naming inconsistency.Bodo Moeller
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-10-15Add constant_time_locl.h to HEADERS,Tim Hudson
so the Win32 compile picks it up correctly. Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-10-15Add the constant time test to the VMS build and testsRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org> Conflicts: test/maketests.com test/tests.com
2014-10-15Include "constant_time_locl.h" rather than "../constant_time_locl.h".Richard Levitte
The different -I compiler parameters will take care of the rest... Reviewed-by: Tim Hudson <tjh@openssl.org> Conflicts: crypto/evp/evp_enc.c
2014-10-15Spaces were added in some strings for better readability. However, those ↵Richard Levitte
spaces do not belong in file names, so when picking out the individual parts, remove the spaces Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-10-15Adjust VMS build to Unix build. Most of all, make it so the disabledRichard Levitte
algorithms MD2 and RC5 don't get built. Also, disable building the test apps in crypto/des and crypto/pkcs7, as they have no support at all. Reviewed-by: Tim Hudson <tjh@openssl.org> Conflicts: crypto/crypto-lib.com makevms.com ssl/ssl-lib.com
2014-10-15Make sure test/tests.com exit gracefully, even when openssl.exe wasn't ↵Richard Levitte
properly built. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-10-15Make sure that disabling the MAYLOSEDATA3 warning is only done when the ↵Richard Levitte
compiler supports it. Otherwise, there are warnings about it lacking everywhere, which is quite tedious to read through while trying to check for other warnings. Reviewed-by: Tim Hudson <tjh@openssl.org> Conflicts: ssl/ssl-lib.com
2014-10-15Add TLS_FALLBACK_SCSV documentation, and move s_client -fallback_scsvBodo Moeller
handling out of #ifndef OPENSSL_NO_DTLS1 section. Reviewed-by: Rich Salz <rsalz@openssl.org>
2014-10-15Oops -- fix typo in coment added with TLS_FALLBACK_SCSV support.Bodo Moeller
Reviewed-by: Steve Henson <steve@openss.org>
2014-10-15Support TLS_FALLBACK_SCSV.Bodo Moeller
Reviewed-by: Rich Salz <rsalz@openssl.org>