summaryrefslogtreecommitdiffstats
path: root/ssl/s3_pkt.c
AgeCommit message (Collapse)Author
2015-01-22Re-align some comments after running the reformat script.OpenSSL_0_9_8-post-reformatMatt Caswell
This should be a one off operation (subsequent invokation of the script should not move them) This commit is for the 0.9.8 changes Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22mark all block comments that need format preserving so thatTim Hudson
indent will not alter them when reformatting comments (cherry picked from commit 1d97c8435171a7af575f73c526d79e1ef0ee5960) Conflicts: crypto/bn/bn_lcl.h crypto/bn/bn_prime.c crypto/engine/eng_all.c crypto/rc4/rc4_utl.c crypto/sha/sha.h ssl/kssl.c ssl/t1_lib.c Conflicts: crypto/rc4/rc4_enc.c crypto/x509v3/v3_scts.c crypto/x509v3/v3nametest.c ssl/d1_both.c ssl/s3_srvr.c ssl/ssl.h ssl/ssl_locl.h ssl/ssltest.c ssl/t1_lib.c Conflicts: crypto/asn1/a_sign.c crypto/bn/bn_div.c crypto/dsa/dsa_asn1.c crypto/ec/ecp_nistp224.c crypto/ec/ecp_nistp256.c crypto/ec/ecp_nistp521.c crypto/ec/ecp_nistputil.c crypto/modes/gcm128.c crypto/opensslv.h ssl/d1_both.c ssl/heartbeat_test.c ssl/s3_clnt.c ssl/s3_srvr.c ssl/ssl_sess.c ssl/t1_lib.c test/testutil.h Conflicts: apps/openssl.c apps/ts.c apps/vms_decc_init.c crypto/aes/aes_core.c crypto/aes/aes_x86core.c crypto/dsa/dsa_ameth.c crypto/ec/ec2_mult.c crypto/evp/evp.h crypto/objects/objects.h crypto/rsa/rsa_pss.c crypto/stack/safestack.h crypto/ts/ts.h crypto/ts/ts_rsp_verify.c crypto/whrlpool/wp_dgst.c crypto/x509v3/v3_ncons.c e_os2.h engines/ccgost/gost89.c engines/ccgost/gost_ctl.c engines/ccgost/gost_keywrap.c engines/ccgost/gost_keywrap.h engines/ccgost/gost_sign.c ssl/kssl.c ssl/s3_srvr.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-08Fix crash in dtls1_get_record whilst in the listen state where you get twoDr. Stephen Henson
separate reads performed - one for the header and one for the body of the handshake record. CVE-2014-3571 Reviewed-by: Matt Caswell <matt@openssl.org> Conflicts: ssl/s3_pkt.c
2014-08-22RT3060: Limit the number of empty records.Adam Langley
Limit the number of empty records that will be processed consecutively in order to prevent ssl3_get_record from never returning. Reported by "oftc_must_be_destroyed" and George Kadianakis. Reviewed-by: Bodo Moeller <bodo@openssl.org> (cherry picked from commit 3aac17a82fbaf2bc23ee62f24611e5883d3e7b97)
2014-06-27Remove redundant check.Ken Ballou
PR#3174 (cherry picked from commit fd331c0bb9b557903dd2ce88398570a3327b5ef0)
2014-06-12Allow the maximum value.Ben Laurie
(Backported as a result of PR#3377 reported by Rainer Jung <rainer.jung@kippdata.de>)
2014-06-05Fixed Windows compilation failureMatt Caswell
2014-06-03Additional CVE-2014-0224 protection.Dr. Stephen Henson
Return a fatal error if an attempt is made to use a zero length master secret.
2014-06-03Fix for CVE-2014-0224Dr. Stephen Henson
Only accept change cipher spec when it is expected instead of at any time. This prevents premature setting of session keys before the master secret is determined which an attacker could use as a MITM attack. Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for reporting this issue and providing the initial fix this patch is based on.
2014-05-29Fix signed/unsigned warning.Ben Laurie
(cherry picked from commit 989d87cb1a174a951efd829ff6b2f68a322f9df8)
2014-05-11safety check to ensure we dont send out beyond the users bufferTim Hudson
2013-02-08ssl/[d1|s3]_pkt.c: harmomize orig_len handling.Andy Polyakov
(cherry picked from commit 8545f73b8919770a5d012fe7a82d6785b69baa27)
2013-02-07ssl/*: remove SSL3_RECORD->orig_len to restore binary compatibility.Andy Polyakov
Kludge alert. This is arranged by passing padding length in unused bits of SSL3_RECORD->type, so that orig_len can be reconstructed. (cherry picked from commit 413cbfe68d83f9afc726b7234c49bd5ccddb97b4)
2013-02-05Fix error codes.Dr. Stephen Henson
(cherry picked from commit 35d732fc2e1badce13be22a044187ebd4d769552)
2013-02-05Update DTLS code to match CBC decoding in TLS.Ben Laurie
This change updates the DTLS code to match the constant-time CBC behaviour in the TLS. (cherry picked from commit 9f27de170d1b7bef3d46d41382dc4dafde8b3900) (cherry picked from commit 5e4ca556e970edb8a7f364fcb6ee6818a965a60b) Conflicts: ssl/d1_enc.c ssl/d1_pkt.c ssl/s3_pkt.c
2013-02-05Don't crash when processing a zero-length, TLS >= 1.1 record.Ben Laurie
The previous CBC patch was bugged in that there was a path through enc() in s3_pkt.c/d1_pkt.c which didn't set orig_len. orig_len would be left at the previous value which could suggest that the packet was a sufficient length when it wasn't. (cherry picked from commit 6cb19b7681f600b2f165e4adc57547b097b475fd) (cherry picked from commit 2c948c1bb218f4ae126e14fd3453d42c62b93235) Conflicts: ssl/s3_enc.c
2013-02-05Fixups.Ben Laurie
2013-02-05Make CBC decoding constant time.Ben Laurie
This patch makes the decoding of SSLv3 and TLS CBC records constant time. Without this, a timing side-channel can be used to build a padding oracle and mount Vaudenay's attack. This patch also disables the stitched AESNI+SHA mode pending a similar fix to that code. In order to be easy to backport, this change is implemented in ssl/, rather than as a generic AEAD mode. In the future this should be changed around so that HMAC isn't in ssl/, but crypto/ as FIPS expects. (cherry picked from commit e130841bccfc0bb9da254dc84e23bc6a1c78a64e) Conflicts: crypto/evp/c_allc.c ssl/ssl_algs.c ssl/ssl_locl.h ssl/t1_enc.c (cherry picked from commit 3622239826698a0e534dcf0473204c724bb9b4b4) Conflicts: ssl/d1_enc.c ssl/s3_enc.c ssl/s3_pkt.c ssl/ssl3.h ssl/ssl_algs.c ssl/t1_enc.c
2013-02-05Add and use a constant-time memcmp.Ben Laurie
This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cherry picked from commit 2ee798880a246d648ecddadc5b91367bee4a5d98) Conflicts: crypto/crypto.h ssl/t1_lib.c (cherry picked from commit dc406b59f3169fe191e58906df08dce97edb727c) Conflicts: crypto/crypto.h ssl/d1_pkt.c ssl/s3_pkt.c
2010-03-24Submitted by: Bodo Moeller and Adam Langley (Google).Dr. Stephen Henson
Fix for "Record of death" vulnerability CVE-2010-0740.
2010-01-24oops revert test code from previous commitDr. Stephen Henson
2010-01-24The fix for PR#1949 unfortunately broke cases where the BIO_CTRL_WPENDINGDr. Stephen Henson
ctrl is incorrectly implemented (e.g. some versions of Apache). As a workaround call both BIO_CTRL_INFO and BIO_CTRL_WPENDING if it returns zero. This should both address the original bug and retain compatibility with the old behaviour.
2009-12-08Send no_renegotiation alert as required by spec.Dr. Stephen Henson
2009-07-13PR: 1984Dr. Stephen Henson
Submitted by: Michael Tüxen <Michael.Tuexen@lurchi.franken.de> Approved by: steve@openssl.org PR#1984 DTLS fix for 0.9.8.
2009-04-07Submitted by: Darryl Miles <darryl-mailinglists@netbauds.net>Dr. Stephen Henson
Approved by: steve@openssl.org Handle non-blocking I/O properly in SSL_shutdown() call.
2008-10-10When the underlying BIO_write() fails to send a datagram, we leave theLutz Jänicke
offending record queued as 'pending'. The DTLS code doesn't expect this, and we end up hitting an OPENSSL_assert() in do_dtls1_write(). The simple fix is just _not_ to leave it queued. In DTLS, dropping packets is perfectly acceptable -- and even preferable. If we wanted a service with retries and guaranteed delivery, we'd be using TCP. PR: #1703 Submitted by: David Woodhouse <dwmw2@infradead.org>
2008-08-13sanity checkBodo Möller
PR: 1679
2006-11-29fix support for receiving fragmented handshake messagesBodo Möller
2005-09-30Update from HEAD.Dr. Stephen Henson
2005-05-09Update util/ck_errf.pl script, and have it run automaticallyBodo Möller
during "make errors" and thus during "make update". Fix lots of bugs that util/ck_errf.pl can detect automatically. Various others of these are still left to fix; that's why "make update" will complain loudly when run now.
2005-05-03backport fix from the stable branchNils Larsch
2005-04-26Add DTLS support.Ben Laurie
2004-05-15Fixes so alerts are sent properly in s3_pkt.cDr. Stephen Henson
PR: 851
2003-02-19Security fix: Vaudenay timing attack on CBC.Richard Levitte
An advisory will be posted to the web. Expect a release within the hour.
2002-07-10Reorder inclusion of header files:Lutz Jänicke
des_old.h redefines crypt: #define crypt(b,s)\ DES_crypt((b),(s)) This scheme leads to failure, if header files with the OS's true definition of crypt() are processed _after_ des_old.h was processed. This is e.g. the case on HP-UX with unistd.h. As evp.h now again includes des.h (which includes des_old.h), this problem only came up after this modification. Solution: move header files (indirectly) including e_os.h before the header files (indirectly) including evp.h. Submitted by: Reviewed by: PR:
2002-05-06fix warningBodo Möller
2002-05-05fix castsBodo Möller
2002-04-29Synchronise with 0.9.7-stable.Richard Levitte
2002-04-20Signedness mismatch.Richard Levitte
Notified by Bernd Matthes <bernd.matthes@gemplus.com>
2002-04-13Implement known-IV countermeasure.Bodo Möller
Fix length checks in ssl3_get_client_hello(). Use s->s3->in_read_app_data differently to fix ssl3_read_internal().
2002-01-12Prototype info function.Ben Laurie
2001-12-28ssl3_read_bytes bug fixUlf Möller
Submitted by: D P Chang <dpc@qualys.com> Reviewed by: Bodo
2001-10-20New functions SSL[_CTX]_set_msg_callback().Bodo Möller
New macros SSL[_CTX]_set_msg_callback_arg(). Message callback imlementation for SSL 3.0/TLS 1.0 (no SSL 2.0 yet). New '-msg' option for 'openssl s_client' and 'openssl s_server' that enable a message callback that displays all protocol messages. In ssl3_get_client_hello (ssl/s3_srvr.c), generate a fatal alert if client_version is smaller than the protocol version in use. Also change ssl23_get_client_hello (ssl/s23_srvr.c) to select TLS 1.0 if the client demanded SSL 3.0 but only TLS 1.0 is enabled; then the client will at least see that alert. Fix SSL[_CTX]_ctrl prototype (void * instead of char * for generic pointer). Add/update some OpenSSL copyright notices.
2001-10-16Add per-SSL 'msg_callback' with 'msg_callback_arg'.Bodo Möller
Both have per-SSL_CTX defaults. These new values can be set by calling SSL[_CTX]_[callback_]ctrl with codes SSL_CTRL_SET_MSG_CALLBACK and SSL_CTRL_SET_MSG_CALLBACK_ARG. So far, the callback is never actually called. Also rearrange some SSL_CTX struct members (some exist just in SSL_CTXs, others are defaults for SSLs and are either copied during SSL_new, or used if the value in the SSL is not set; these three classes of members were not in a logical order), and add some missing assignments to SSL_dup.
2001-09-20Fix ssl/s3_enc.c, ssl/t1_enc.c and ssl/s3_pkt.c so that we don'tBodo Möller
reveal whether illegal block cipher padding was found or a MAC verification error occured. In ssl/s2_pkt.c, verify that the purported number of padding bytes is in the legal range.
2001-03-07Fix ERR_R_... problems.Bodo Möller
2001-02-20Use new-style system-id macros everywhere possible. I hope I haven'tRichard Levitte
missed any. This compiles and runs on Linux, and external applications have no problems with it. The definite test will be to build this on VMS.
2000-12-25Fix SSL_peek and SSL_pending.Bodo Möller
2000-12-14First step towards SSL_peek fix.Bodo Möller