Commit Graph

11264 Commits

Author SHA1 Message Date
Andy Polyakov
bbb4ee8574 s3/s3_cbc.c: allow for compilations with NO_SHA256|512.
(cherry picked from commit d5371324d9)
2013-02-06 14:19:10 +00:00
Andy Polyakov
4af91ec072 ssl/s3_cbc.c: md_state alignment portability fix.
RISCs are picky and alignment granted by compiler for md_state can be
insufficient for SHA512.
(cherry picked from commit 36260233e7)
2013-02-06 14:19:09 +00:00
Andy Polyakov
6b2a843970 ssl/s3_cbc.c: uint64_t portability fix.
Break dependency on uint64_t. It's possible to declare bits as
unsigned int, because TLS packets are limited in size and 32-bit
value can't overflow.
(cherry picked from commit cab13fc847)
2013-02-06 14:19:09 +00:00
Dr. Stephen Henson
6b1f7beeee typo.
(cherry picked from commit 34ab3c8c71)
2013-02-06 14:19:09 +00:00
Dr. Stephen Henson
8109e8305b Add ordinal for CRYPTO_memcmp: since this will affect multiple
branches it needs to be in a "gap".
(cherry picked from commit 81ce0e14e7)
2013-02-06 14:19:08 +00:00
Dr. Stephen Henson
c4e6fb1524 Timing fix mitigation for FIPS mode.
We have to use EVP in FIPS mode so we can only partially mitigate
timing differences.

Make an extra call to EVP_DigestSignUpdate to hash additonal blocks
to cover any timing differences caused by removal of padding.
(cherry picked from commit b908e88ec1)
2013-02-06 14:19:08 +00:00
Ben Laurie
a693ead6dc Oops. Add missing file.
(cherry picked from commit 014265eb02)
2013-02-06 14:19:08 +00:00
Ben Laurie
e33ac0e71d Update DTLS code to match CBC decoding in TLS.
This change updates the DTLS code to match the constant-time CBC
behaviour in the TLS.
(cherry picked from commit 9f27de170d)
2013-02-06 14:19:07 +00:00
Ben Laurie
93cab6b319 Don't crash when processing a zero-length, TLS >= 1.1 record.
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 6cb19b7681)
2013-02-06 14:19:07 +00:00
Ben Laurie
2acc020b77 Make CBC decoding constant time.
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 e130841bcc)
2013-02-06 14:19:07 +00:00
Ben Laurie
7c770d572a Add and use a constant-time memcmp.
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 2ee798880a)
2013-02-06 14:16:55 +00:00
Dr. Stephen Henson
ea34a58385 Fix for trace code: SSL3 doesn't include a length value for
encrypted premaster secret value.
2013-02-04 15:13:12 +00:00
Andy Polyakov
4568182a8b x86_64 assembly pack: keep making Windows build more robust.
PR: 2963 and a number of others
2013-02-02 19:54:59 +01:00
Dr. Stephen Henson
e511c64a24 Don't use C++ style comments. 2013-01-24 23:22:33 +00:00
Dr. Stephen Henson
c38b76bf69 Fix warning: lenmax isn't used any more. 2013-01-24 14:06:54 +00:00
Dr. Stephen Henson
1703627ba8 Don't include comp.h in cmd_cd.c if OPENSSL_NO_COMP set 2013-01-23 01:09:38 +00:00
Dr. Stephen Henson
498e89fe9d fix domd 2013-01-23 00:43:09 +00:00
Andy Polyakov
46bf83f07a x86_64 assembly pack: make Windows build more robust.
PR: 2963 and a number of others
2013-01-22 22:27:28 +01:00
Andy Polyakov
7c47f0d946 TABLE update. 2013-01-22 21:21:03 +01:00
Andy Polyakov
058843bd0f Configure: update linux-mips* lines. 2013-01-22 21:20:34 +01:00
Andy Polyakov
543fd85460 bn/asm/mips.pl: hardwire local call to bn_div_words. 2013-01-22 21:13:37 +01:00
Andy Polyakov
1598af9ac9 sha512-ppc.pl: minimize stack frame. 2013-01-22 21:09:14 +01:00
Andy Polyakov
06b3b640eb gost2814789t.c: portability fixes. 2013-01-22 14:37:03 +01:00
Ben Laurie
5bdf1f1a89 Fix warnings. 2013-01-21 23:02:17 +00:00
Dr. Stephen Henson
f20c673d0d Don't include comp.h if no-comp set. 2013-01-20 02:34:25 +00:00
Andy Polyakov
a006fef78e Improve WINCE support.
Submitted by: Pierre Delaage
2013-01-19 21:23:13 +01:00
Ben Laurie
0e5cf7bc09 Merge branch 'master' of openssl.net:openssl 2013-01-19 18:30:10 +00:00
Andy Polyakov
bd2bceb91b More .gitignore adjustments. 2013-01-19 18:41:44 +01:00
Ben Laurie
6f0a93b069 Merge branch 'master' of openssl.net:openssl 2013-01-19 17:35:41 +00:00
Ben Laurie
ed60d9ded0 Remove kludge to use RC4 asm. 2013-01-19 17:31:46 +00:00
Ben Laurie
e721909d7f Build/test cleanly on MacOS. 2013-01-19 17:24:40 +00:00
Andy Polyakov
a0dcb8d821 gost_crypt.c: add assertions.
Submitted by: Seguei Leontiev
PR: 2821
2013-01-19 18:10:05 +01:00
Andy Polyakov
26906f2d93 engines/ccgost: add test case.
Submitted by: Serguei Leontiev
PR: 2821
2013-01-19 17:56:56 +01:00
Andy Polyakov
d4571f43e8 sha512-ppc.pl: add PPC32 code, >2x improvement on in-order cores. 2013-01-19 17:22:05 +01:00
Ben Laurie
eef6935426 Remove extraneous brackets (clang doesn't like them). 2013-01-19 15:12:08 +00:00
Ben Laurie
517dd307f9 Can't check a size_t for < 0. 2013-01-19 15:00:27 +00:00
Ben Laurie
a6bbbf2ff5 Make "make depend" work on MacOS out of the box. 2013-01-19 14:14:30 +00:00
Andy Polyakov
bba43f3f43 .gitignore adjustments 2013-01-19 13:20:21 +01:00
Dr. Stephen Henson
4badfebefc Typo (PR2959). 2013-01-17 18:20:18 +00:00
Ben Laurie
08e5536445 Fix some clang warnings. 2013-01-13 21:04:39 +00:00
Ben Laurie
e54e123549 Correct EVP_PKEY_verifyrecover to EVP_PKEY_verify_recover (RT 2955). 2013-01-12 12:25:30 +00:00
Dr. Stephen Henson
abd01ea214 Change default bits to 1024 2013-01-07 16:18:31 +00:00
Ben Laurie
a5b2791cc9 Add some missing files, make paths absolute. 2013-01-06 19:06:40 +00:00
Ben Laurie
f00c54ae2e Fix warning. 2013-01-06 19:03:48 +00:00
Dr. Stephen Henson
e71972d177 Initial .gitignore 2013-01-06 16:47:36 +00:00
Dr. Stephen Henson
c1faa8b5b2 make no-comp compile 2012-12-30 16:04:51 +00:00
Dr. Stephen Henson
b252cf0d98 make JPAKE work again, fix memory leaks 2012-12-29 23:38:20 +00:00
Dr. Stephen Henson
a4c4a7d5ca stop warning when compiling with no-comp 2012-12-29 23:37:56 +00:00
Dr. Stephen Henson
bdcf772aa5 Portability fix: use BIO_snprintf and pick up strcasecmp alternative
definitions from e_os.h
2012-12-26 23:51:56 +00:00
Dr. Stephen Henson
89a5e2f704 missing tab 2012-12-26 19:12:57 +00:00