Commit graph

10551 commits

Author SHA1 Message Date
Andy Polyakov
1dfb4b9400 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 13:56:14 +00:00
Dr. Stephen Henson
e5cb774323 typo.
(cherry picked from commit 34ab3c8c71)
2013-02-06 13:56:14 +00:00
Dr. Stephen Henson
73390e6ba5 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 13:56:13 +00:00
Dr. Stephen Henson
d91d9acc58 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 13:56:13 +00:00
Ben Laurie
820988a0c0 Oops. Add missing file.
(cherry picked from commit 014265eb02)
2013-02-06 13:56:13 +00:00
Ben Laurie
1326a64a33 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 13:56:13 +00:00
Ben Laurie
e0da2c2ed2 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 13:56:13 +00:00
Ben Laurie
fb0a59cc58 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 13:56:12 +00:00
Ben Laurie
f5cd3561ba 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 13:56:12 +00:00
Dr. Stephen Henson
115f7fa562 Merge branch 'OpenSSL_1_0_2-stable' of /home/steve/src/git/openssl into OpenSSL_1_0_2-stable 2013-02-04 15:14:11 +00:00
Dr. Stephen Henson
c867d87180 Fix for trace code: SSL3 doesn't include a length value for
encrypted premaster secret value.
(cherry picked from commit ea34a58385)
2013-02-04 15:14:00 +00:00
Andy Polyakov
2a713eadc3 bn_word.c: fix overflow bug in BN_add_word.
(cherry picked from commit 134c00659a)
2013-02-02 22:37:35 +01:00
Andy Polyakov
2e7900b624 x86_64 assembly pack: keep making Windows build more robust.
PR: 2963 and a number of others
(cherry picked from commit 4568182a8b)
2013-02-02 19:56:43 +01:00
Dr. Stephen Henson
f8435919a1 Fix warning: lenmax isn't used any more. 2013-01-24 14:08:28 +00:00
Dr. Stephen Henson
1db4354b53 Don't include comp.h in cmd_cd.c if OPENSSL_NO_COMP set 2013-01-23 01:11:05 +00:00
Andy Polyakov
3f233a1e77 x86_64 assembly pack: make Windows build more robust [from master].
PR: 2963 and a number of others
2013-01-22 22:51:29 +01:00
Andy Polyakov
25917e972d TABLE update. 2013-01-22 21:22:20 +01:00
Andy Polyakov
8812a81bdd Configure: update linux-mips* lines [from master]. 2013-01-22 21:21:44 +01:00
Andy Polyakov
b17ffba915 bn/asm/mips.pl: hardwire local call to bn_div_words. 2013-01-22 21:16:02 +01:00
Dr. Stephen Henson
3619e34f50 Don't include comp.h if no-comp set. 2013-01-20 01:10:03 +00:00
Ben Laurie
6924686b78 Merge branch 'OpenSSL_1_0_2-stable' of openssl.net:openssl into OpenSSL_1_0_2-stable 2013-01-19 18:36:44 +00:00
Ben Laurie
92745f8116 Remove extraneous brackets (clang doesn't like them). 2013-01-19 18:24:00 +00:00
Ben Laurie
17cf9864e0 Add MacOS 64-bit debug target. 2013-01-19 18:23:36 +00:00
Andy Polyakov
5cfefd3ce3 engines/ccgost: GOST fixes [from master].
Submitted by: Dmitry Belyavsky, Seguei Leontiev
PR: 2821
2013-01-19 18:24:03 +01:00
Ben Laurie
9ccc6f4382 Can't check a size_t for < 0. 2013-01-19 15:01:18 +00:00
Andy Polyakov
3c92471723 .gitignore adjustments 2013-01-19 13:31:29 +01:00
Dr. Stephen Henson
1a932ae094 -named_curve option handled automatically now. 2013-01-18 15:41:06 +00:00
Dr. Stephen Henson
57912ed329 Add code to download CRLs based on CRLDP extension.
Just a sample, real world applications would have to be cleverer.
2013-01-18 15:38:13 +00:00
Dr. Stephen Henson
e998f8aeb8 cipher is not used in s_server any more. 2013-01-18 15:05:28 +00:00
Dr. Stephen Henson
e318431e54 New option to add CRLs for s_client and s_server. 2013-01-18 14:37:14 +00:00
Dr. Stephen Henson
6a10f38daa initial support for delta CRL generations by diffing two full CRLs 2013-01-17 18:51:50 +00:00
Dr. Stephen Henson
c095078890 Typo (PR2959). 2013-01-17 18:21:54 +00:00
Dr. Stephen Henson
c644b83227 constify 2013-01-17 16:35:50 +00:00
Dr. Stephen Henson
75f535315a New functions to set lookup_crls callback and to retrieve internal X509_STORE
from X509_STORE_CTX.
2013-01-17 16:32:33 +00:00
Dr. Stephen Henson
7c283d9e97 add option to get a certificate or CRL from a URL 2013-01-17 16:08:02 +00:00
Dr. Stephen Henson
2aa3ef78b6 print out issuer and subject unique identifier fields in certificates 2013-01-16 15:08:34 +00:00
Dr. Stephen Henson
1c0964e87f add wrapper function for certificate download 2013-01-15 18:01:54 +00:00
Dr. Stephen Henson
5c8d41be85 Generalise OCSP I/O functions to support dowloading of other ASN1
structures using HTTP. Add wrapper function to handle CRL download.
2013-01-15 18:01:31 +00:00
Dr. Stephen Henson
b286640360 Update default dependency flags. 2013-01-15 16:26:04 +00:00
Dr. Stephen Henson
75a8ff9263 make update 2013-01-15 16:24:07 +00:00
Dr. Stephen Henson
50b5966e57 Add support for broken protocol tests (backport from master branch) 2013-01-15 16:18:13 +00:00
Dr. Stephen Henson
8eb4456f93 Make whitespace consistent with master branch. 2013-01-15 15:55:54 +00:00
Ben Laurie
24c45faba0 Fix some clang warnings. 2013-01-13 21:06:36 +00:00
Ben Laurie
010ac38a98 Correct EVP_PKEY_verifyrecover to EVP_PKEY_verify_recover (RT 2955). 2013-01-12 12:51:58 +00:00
Dr. Stephen Henson
1c25ed5dbb In FIPS mode use PKCS#8 format when writing private keys:
traditional format uses MD5 which is prohibited in FIPS mode.
2013-01-07 16:16:43 +00:00
Dr. Stephen Henson
bf1d32e52a Change default bits to 1024 2013-01-07 16:13:48 +00:00
Dr. Stephen Henson
6c86b69729 Add .gitignore from master branch. 2013-01-06 21:34:51 +00:00
Ben Laurie
72dfff2d5e Fix warning. 2013-01-06 21:03:05 +00:00
Dr. Stephen Henson
3341b820cc add support for separate verify can chain stores to s_client (backport from HEAD) 2012-12-30 16:27:15 +00:00
Dr. Stephen Henson
ede5f6cf74 add -chain options to s_client (backrpot from HEAD) 2012-12-30 16:17:29 +00:00