Commit graph

9877 commits

Author SHA1 Message Date
Rob Stradling
48f91f6a88 Backport TLS 1.1/1.2 #defines 2013-09-09 21:08:17 +01:00
Rob Stradling
6f1c8d45f7 Don't prefer ECDHE-ECDSA ciphers when the client appears to be Safari on OS X.
OS X 10.8..10.8.3 has broken support for ECDHE-ECDSA ciphers.
2013-09-09 14:13:59 +01:00
Dr. Stephen Henson
56023bc405 Correct ECDSA example.
(cherry picked from commit 3a918ea2bbf4175d9461f81be1403d3781b2c0dc)
2013-08-20 17:31:17 +01:00
Michael Tuexen
6f87807e62 DTLS message_sequence number wrong in rehandshake ServerHello
This fix ensures that
* A HelloRequest is retransmitted if not responded by a ClientHello
* The HelloRequest "consumes" the sequence number 0. The subsequent
ServerHello uses the sequence number 1.
* The client also expects the sequence number of the ServerHello to
be 1 if a HelloRequest was received earlier.
This patch fixes the RFC violation.
(cherry picked from commit b62f4daac0)

Conflicts:

	ssl/d1_pkt.c
2013-08-13 18:59:41 +01:00
Michael Tuexen
799f203ff6 DTLS handshake fix.
Reported by: Prashant Jaikumar <rmstar@gmail.com>

Fix handling of application data received before a handshake.
(cherry picked from commit 0c75eeacd3)
2013-08-08 13:32:26 +01:00
Dr. Stephen Henson
34eee35479 Fix verify loop with CRL checking.
PR #3090
Reported by: Franck Youssef <fry@open.ch>

If no new reason codes are obtained after checking a CRL exit with an
error to avoid repeatedly checking the same CRL.

This will only happen if verify errors such as invalid CRL scope are
overridden in a callback.
(cherry picked from commit 4b26645c1a)
2013-08-06 16:08:15 +01:00
Kaspar Brand
bcd092d706 Fix for PEM_X509_INFO_read_bio.
PR: 3028
Fix bug introduced in PEM_X509_INFO_bio which wouldn't process RSA keys
correctly if they appeared first.
(cherry picked from commit 5ae8d6bcba)
2013-08-06 16:05:52 +01:00
Andy Polyakov
713f110f53 config: fix executable format detection on latest FreeBSD.
Submitted by: Bryan Drewery
PR: 3075
(cherry picked from commit c256e69d3f)
2013-07-01 00:01:26 +02:00
Dr. Stephen Henson
4d11426716 Set s->d1 to NULL after freeing it.
(cherry picked from commit 04638f2fc3)
2013-04-08 18:40:08 +01:00
Dr. Stephen Henson
3087bd32ff Typo.
(cherry picked from commit 0ded2a0689)
2013-03-31 17:44:07 +01:00
Dr. Stephen Henson
a47060f1c9 Disable compression for DTLS.
The only standard compression method is stateful and is incompatible with
DTLS.
(cherry picked from commit e14b8410ca)
2013-03-19 13:47:51 +00:00
Andy Polyakov
b04c0d805c x86cpuid.pl: make it work with older CPUs.
PR: 3005
(cherry picked from commit 5702e965d7)
2013-03-18 19:51:13 +01:00
Michael Tuexen
a1a45c59ec Avoid unnecessary fragmentation.
(cherry picked from commit 80ccc66d7e)
2013-03-18 14:33:15 +00:00
Dr. Stephen Henson
64841ed746 Encode INTEGER correctly.
If an ASN1_INTEGER structure is allocated but not explicitly set encode
it as zero: don't generate an invalid zero length INTEGER.
(cherry picked from commit 1643edc63c)
2013-03-18 14:21:03 +00:00
Dr. Stephen Henson
901554b355 Typo.
(cherry picked from commit 1546fb780b)
2013-03-18 13:59:25 +00:00
Nick Alcock
0e05f88ebf Fix POD errors to stop make install_docs dying with pod2man 2.5.0+
podlators 2.5.0 has switched to dying on POD syntax errors. This means
that a bunch of long-standing erroneous POD in the openssl documentation
now leads to fatal errors from pod2man, halting installation.

Unfortunately POD constraints mean that you have to sort numeric lists
in ascending order if they start with 1: you cannot do 1, 0, 2 even if
you want 1 to appear first. I've reshuffled such (alas, I wish there
were a better way but I don't know of one).
(cherry picked from commit 5cc2707742)
2013-02-15 19:40:22 +01:00
Andy Polyakov
6715f00081 cms-test.pl: make it work with not-so-latest perl.
(cherry picked from commit 9c437e2fad)
2013-02-14 16:39:53 +01:00
David Woodhouse
6a14feb048 Check DTLS_BAD_VER for version number.
Need to check DTLS_BAD_VER as well as DTLS1_VERSION.
PR:2984
2013-02-12 15:09:44 +00:00
Dr. Stephen Henson
02c54f7c22 Fix in ssltest is no-ssl2 configured
(cherry picked from commit cbf9b4aed3)
2013-02-11 18:27:06 +00:00
Dr. Stephen Henson
243dac0af0 Fix for SSL_get_certificate
Now we set the current certificate to the one used by a server
there is no need to call ssl_get_server_send_cert which will
fail if we haven't sent a certificate yet.
(cherry picked from commit 147dbb2fe3)
2013-02-11 18:26:33 +00:00
Lutz Jaenicke
da018b129e FAQ/README: we are now using Git instead of CVS
(cherry picked from commit f88dbb8385)
2013-02-11 11:32:34 +01:00
Andy Polyakov
e9554f7f9b sparccpuid.S: work around emulator bug on T1.
(cherry picked from commit 3caeef94bd)
2013-02-11 10:42:32 +01:00
Andy Polyakov
71a1ac9398 ssl/s3_[clnt|srvr].c: fix warnings and linking error. 2013-02-09 19:48:34 +01:00
Andy Polyakov
6a2f94b39a s3_cbc.c: make CBC_MAC_ROTATE_IN_PLACE universal.
(cherry picked from commit f93a41877d)
2013-02-08 21:37:30 +01:00
Andy Polyakov
6ba1d561eb s3_cbc.c: get rid of expensive divisions [from master].
(cherry picked from commit e9baceab5a)
2013-02-08 17:01:31 +01:00
Andy Polyakov
f73546df92 ssl/[d1|s3]_pkt.c: harmomize orig_len handling.
(cherry picked from commit 8545f73b89)
2013-02-08 11:14:12 +01:00
Dr. Stephen Henson
be125aa5ba Fix IV check and padding removal.
Fix the calculation that checks there is enough room in a record
after removing padding and optional explicit IV. (by Steve)

For AEAD remove the correct number of padding bytes (by Andy)
(cherry picked from commit 32cc2479b4)

Resolved conflicts:

	ssl/s3_cbc.c
2013-02-08 11:12:49 +01:00
Andy Polyakov
413cbfe68d ssl/*: remove SSL3_RECORD->orig_len to restore binary compatibility.
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 8bfd4c659f)
2013-02-07 13:43:51 +00:00
Adam Langley
ee463921ed Fix for EXP-RC2-CBC-MD5
MD5 should use little endian order. Fortunately the only ciphersuite
affected is EXP-RC2-CBC-MD5 (TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5) which
is a rarely used export grade ciphersuite.
2013-02-06 15:50:42 +00:00
Dr. Stephen Henson
76e7744bef prepare for next version 2013-02-06 02:27:23 +00:00
Dr. Stephen Henson
d9e048ceac prepare for release 2013-02-05 16:46:21 +00:00
Dr. Stephen Henson
65a9383e6b make update 2013-02-05 16:46:21 +00:00
Dr. Stephen Henson
c6b82f7ee9 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-05 16:46:20 +00:00
Dr. Stephen Henson
25590043d1 Fix error codes.
(cherry picked from commit 35d732fc2e)
2013-02-05 16:46:19 +00:00
Dr. Stephen Henson
8a5d624d5b Update CHANGES and NEWS 2013-02-05 16:46:19 +00:00
Andy Polyakov
ae4a75cecf bn_word.c: fix overflow bug in BN_add_word.
(cherry picked from commit 134c00659a)
2013-02-05 16:46:19 +00:00
Andy Polyakov
2e884ce11d x86_64 assembly pack: keep making Windows build more robust.
PR: 2963 and a number of others
(cherry picked from commit 4568182a8b)
2013-02-05 16:46:19 +00:00
Dr. Stephen Henson
da8f1b738c update NEWS 2013-02-05 16:46:18 +00:00
Andy Polyakov
33f44acbbe s3/s3_cbc.c: allow for compilations with NO_SHA256|512.
(cherry picked from commit d5371324d9)
2013-02-05 16:46:18 +00:00
Andy Polyakov
11c48a0fd2 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-05 16:46:18 +00:00
Andy Polyakov
3cdaca2436 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-05 16:46:17 +00:00
Ben Laurie
b23da2919b 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-05 16:46:17 +00:00
Ben Laurie
610dfc3ef4 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-05 16:46:17 +00:00
Ben Laurie
080f395392 Fixups from previous commit. 2013-02-05 16:46:17 +00:00
Ben Laurie
f852b60797 Oops. Add missing file.
(cherry picked from commit 014265eb02)
2013-02-05 16:46:16 +00:00
Ben Laurie
e2356454c8 Add a target so I can build this. 2013-02-05 16:46:16 +00:00
Ben Laurie
e5420be6cd 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)

Conflicts:
	crypto/evp/c_allc.c
	ssl/ssl_algs.c
	ssl/ssl_locl.h
	ssl/t1_enc.c
2013-02-05 16:46:16 +00:00
Ben Laurie
9c00a95060 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)

Conflicts:
	crypto/crypto.h
	ssl/t1_lib.c
2013-02-05 16:46:15 +00:00
Dr. Stephen Henson
ebc71865f0 Don't try and verify signatures if key is NULL (CVE-2013-0166)
Add additional check to catch this in ASN1_item_verify too.
2013-02-05 16:46:15 +00:00
Dr. Stephen Henson
1dfa62d4c8 Don't include comp.h in cmd_cd.c if OPENSSL_NO_COMP set 2013-01-23 01:14:13 +00:00