summaryrefslogtreecommitdiffstats
path: root/ssl/s3_enc.c
AgeCommit message (Collapse)Author
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
2012-01-04Clear bytes used for block padding of SSL 3.0 records. (CVE-2011-4576)Dr. Stephen Henson
2010-06-12Fix gcc 4.6 warnings. Check TLS server hello extension length.Ben Laurie
2008-06-16Make ssl code consistent with FIPS branch. The new code has no effectDr. Stephen Henson
at present because it asserts either noop flags or is inside OPENSSL_FIPS #ifdef's.
2007-02-16ensure that the EVP_CIPHER_CTX object is initializedNils Larsch
PR: 1490
2005-10-01As HEAD.Dr. Stephen Henson
2005-09-30Update from HEAD.Dr. Stephen Henson
2005-04-26Add DTLS support.Ben Laurie
2003-11-04Avoid some shadowed variable names.Geoff Thorpe
Submitted by: Nils Larsch
2003-10-29A general spring-cleaning (in autumn) to fix up signed/unsigned warnings.Geoff Thorpe
I have tried to convert 'len' type variable declarations to unsigned as a means to address these warnings when appropriate, but when in doubt I have used casts in the comparisons instead. The better solution (that would get us all lynched by API users) would be to go through and convert all the function prototypes and structure definitions to use unsigned variables except when signed is necessary. The proliferation of (signed) "int" for strictly non-negative uses is unfortunate.
2003-02-12commentsBodo Möller
2002-11-28Cleanse memory using the new OPENSSL_cleanse() function.Richard Levitte
I've covered all the memset()s I felt safe modifying, but may have missed some.
2002-11-13Security fixes brought forward from 0.9.7.Ben Laurie
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-07-09emtpy fragments are not necessary for SSL_eNULLBodo Möller
(but noone uses it anyway) fix t1_enc.c: use OPENSSL_NO_RC4, not NO_RC4
2002-06-14New option SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS for disabling CBCBodo Möller
vulnerability workaround (included in SSL_OP_ALL). PR: #90
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().
2001-10-22Fix memory leak.Bodo Möller
2001-10-17Modify EVP cipher behaviour in a similar wayDr. Stephen Henson
to digests to retain compatibility.
2001-10-16Retain compatibility of EVP_DigestInit() and EVP_DigestFinal()Dr. Stephen Henson
with existing code. Modify library to use digest *_ex() functions.
2001-09-24commentBodo Möller
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-07-30Really add the EVP and all of the DES changes.Ben Laurie
2001-06-19Change all calls to low level digest routines in the library andDr. Stephen Henson
applications to use EVP. Add missing calls to HMAC_cleanup() and don't assume HMAC_CTX can be copied using memcpy(). Note: this is almost identical to the patch submitted to openssl-dev by Verdon Walker <VWalker@novell.com> except some redundant EVP_add_digest_()/EVP_cleanup() calls were removed and some changes made to avoid compiler warnings.
2001-06-15pay attention to blocksize before attempting decryptionBodo Möller
2001-06-07Use memmove() instead of memcpy() on areas that may overlap.Richard Levitte
Spotted by Nalin Dahyabhai <nalin@redhat.com>
2001-04-08Avoid assert() in the library.Bodo Möller
2001-04-08Resize a local buffer to accomodate the size requirements of AES.Richard Levitte
Protect against future mistakes with an assert().
2001-04-03This change should be suitable as a workaround for the Solaris x86Bodo Möller
compiler bug reported in <01032110293775.22278@weba3.iname.net> (the '++seq[i]' condition is evaluated as 256 rather than 0 when the previous value is 255).
2001-03-07Fix ERR_R_... problems.Bodo Möller
2000-06-01There have been a number of complaints from a number of sources that namesRichard Levitte
like Malloc, Realloc and especially Free conflict with already existing names on some operating systems or other packages. That is reason enough to change the names of the OpenSSL memory allocation macros to something that has a better chance of being unique, like prepending them with OPENSSL_. This change includes all the name changes needed throughout all C files.
2000-02-22Change EVP_MD_CTX_type so it is more logical and add EVP_MD_CTX_md forDr. Stephen Henson
the old functionality. Various warning fixes. Initial EVP symmetric cipher docs.
2000-02-20Tolerate fragmentation and interleaving in the SSL 3/TLS record layer.Bodo Möller
2000-02-03ispell (and minor modifications)Ulf Möller
2000-01-06Use separate arrays for certificate verify and for finished hashes.Bodo Möller
2000-01-05Use prototypes.Bodo Möller
1999-12-29Delete NO_PROTO section (which apparently was just a typo for NOPROTO --Bodo Möller
if anyone had actually ever needed that they should have fixed this typo)
1999-06-04Support the EBCDIC character set and BS2000/OSD-POSIX (work in progress).Ulf Möller
Submitted by: Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>
1999-04-27Message digest stuff.Ulf Möller
1999-04-23Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller
Submitted by: Reviewed by: PR:
1999-04-19Change functions to ANSI C.Ulf Möller
1999-04-17Massive constification.Ben Laurie
1999-02-21Add support for new TLS export ciphersuites.Ben Laurie
1999-02-16Updates to the new SSL compression codeMark J. Cox
[Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)] Fix so that the version number in the master secret, when passed via RSA, checks that if TLS was proposed, but we roll back to SSLv3 (because the server will not accept higher), that the version number is 0x03,0x01, not 0x03,0x00 [Eric A. Young, (from changes to C2Net SSLeay, integrated by Mark Cox)] Submitted by: Reviewed by: PR:
1999-02-13In the absence of feedback either way, commit the fix that looks right forBen Laurie
wrong keylength with export null ciphers.
1999-01-10Fix comment.Ben Laurie
1999-01-07Accept NULL in *_free.Ben Laurie