8858 Commits

Author SHA1 Message Date
Dr. Stephen Henson
246b35a96e Make OCSP response verification more flexible.
If a set of certificates is supplied to OCSP_basic_verify use those in
addition to any present in the OCSP response as untrusted CAs when
verifying a certificate chain.

PR#3668

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 4ca5efc2874e094d6382b30416824eda6dde52fe)
2015-03-24 12:15:17 +00:00
Matt Caswell
79cc5417a4 Prepare for 0.9.8zg-dev
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-19 13:50:06 +00:00
Matt Caswell
db8334be06 Prepare for 0.9.8zf release
Reviewed-by: Richard Levitte <levitte@openssl.org>
OpenSSL_0_9_8zf
2015-03-19 13:47:27 +00:00
Matt Caswell
fcc5e899aa make update
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-19 13:47:27 +00:00
Matt Caswell
b78c9e4a2b Fix unsigned/signed warnings
Fix some unsigned/signed warnings introduced as part of the fix
for CVE-2015-0293

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-19 13:00:45 +00:00
Matt Caswell
c380bff888 Fix a failure to NULL a pointer freed on error.
Reported by the LibreSSL project as a follow on to CVE-2015-0209

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-19 13:00:45 +00:00
Richard Levitte
6655ac4e45 VMS build fix
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-03-19 13:00:45 +00:00
Matt Caswell
c7395fb999 Update NEWS file
Update the NEWS file with the latest entries from CHANGES ready for the
release.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-19 13:00:45 +00:00
Matt Caswell
d53f920365 Update CHANGES for release
Update CHANGES fiel with all the latest fixes ready for the release.

Conflicts:
	CHANGES

Conflicts:
	CHANGES

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-19 13:00:45 +00:00
Emilia Kasper
65c588c140 Fix reachable assert in SSLv2 servers.
This assert is reachable for servers that support SSLv2 and export ciphers.
Therefore, such servers can be DoSed by sending a specially crafted
SSLv2 CLIENT-MASTER-KEY.

Also fix s2_srvr.c to error out early if the key lengths are malformed.
These lengths are sent unencrypted, so this does not introduce an oracle.

CVE-2015-0293

This issue was discovered by Sean Burford (Google) and Emilia Käsper of
the OpenSSL development team.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-03-19 13:00:45 +00:00
Emilia Kasper
544e3e3b69 PKCS#7: avoid NULL pointer dereferences with missing content
In PKCS#7, the ASN.1 content component is optional.
This typically applies to inner content (detached signatures),
however we must also handle unexpected missing outer content
correctly.

This patch only addresses functions reachable from parsing,
decryption and verification, and functions otherwise associated
with reading potentially untrusted data.

Correcting all low-level API calls requires further work.

CVE-2015-0289

Thanks to Michal Zalewski (Google) for reporting this issue.

Reviewed-by: Steve Henson <steve@openssl.org>

Conflicts:
	crypto/pkcs7/pk7_doit.c
2015-03-19 13:00:45 +00:00
Dr. Stephen Henson
497d0b00dc Fix ASN1_TYPE_cmp
Fix segmentation violation when ASN1_TYPE_cmp is passed a boolean type. This
can be triggered during certificate verification so could be a DoS attack
against a client or a server enabling client authentication.

CVE-2015-0286

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-19 13:00:44 +00:00
Dr. Stephen Henson
674341f1b0 Free up ADB and CHOICE if already initialised.
CVE-2015-0287

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2015-03-18 11:52:58 +00:00
Dr. Stephen Henson
c58f4f73bd Tolerate test_sqr errors for FIPS builds.
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-03-14 22:21:21 +00:00
Kurt Roeckx
c85c1e08ce Disable export and SSLv2 ciphers by default
They are moved to the COMPLEMENTOFDEFAULT instead.

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2015-03-14 18:46:31 +01:00
Matt Caswell
c2f5de13cd Cleanse buffers
Cleanse various intermediate buffers used by the PRF (backported version
from master).

Conflicts:
	ssl/s3_enc.c

Conflicts:
	ssl/t1_enc.c

Conflicts:
	ssl/t1_enc.c

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-11 10:57:14 +00:00
Dr. Stephen Henson
01320ad3b9 Fix warnings.
Fix compiler warnings (similar to commit 25012d5e79)

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-08 17:23:40 +00:00
Matt Caswell
a065737afb Update mkerr.pl for new format
Make the output from mkerr.pl consistent with the newly reformatted code.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-06 14:10:30 +00:00
Dr. Stephen Henson
241cff623e Check public key is not NULL.
CVE-2015-0288
PR#3708

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 28a00bcd8e318da18031b2ac8778c64147cd54f9)
2015-03-02 15:26:57 +00:00
Dr. Stephen Henson
8a8ba07167 Fix format script.
The format script didn't correctly recognise some ASN.1 macros and
didn't reformat some files as a result. Fix script and reformat
affected files.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 437b14b533fe7f7408e3ebca6d5569f1d3347b1a)

Conflicts:
	crypto/asn1/x_long.c
2015-03-02 13:50:01 +00:00
Matt Caswell
1b4a8df38f Fix a failure to NULL a pointer freed on error.
Inspired by BoringSSL commit 517073cd4b by Eric Roman <eroman@chromium.org>

CVE-2015-0209

Reviewed-by: Emilia Käsper <emilia@openssl.org>
2015-02-25 20:40:38 +00:00
Andy Polyakov
6d4655c27e Bring objects.pl output even closer to new format.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 849037169d98d070c27d094ac341fc6aca1ed2ca)
2015-02-09 16:07:51 +01:00
Andy Polyakov
9eca2cbc16 Harmonize objects.pl output with new format.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 7ce38623194f6df6a846cd01753b63f361c88e57)
2015-02-09 10:03:30 +01:00
Matt Caswell
d7efe7ea18 Fix error handling in ssltest
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit ae632974f905c59176fa5f312826f8f692890b67)
2015-02-06 10:15:22 +00:00
Rich Salz
49fa6b6c2d Fixed bad formatting in crypto/des/spr.h
Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit 7e35f06ea908e47f87b723b5e951ffc55463eb8b)
2015-02-05 09:46:24 -05:00
Dr. Stephen Henson
d64a227f1f Check PKCS#8 pkey field is valid before cleansing.
PR:3683
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 52e028b9de371da62c1e51b46592517b1068d770)
2015-02-03 14:02:51 +00:00
Matt Caswell
6844c12968 Fix for reformat problems with e_padlock.c
Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit d3b7cac41b957704932a0cdbc74d4d48ed507cd0)
2015-01-22 14:17:04 +00:00
Matt Caswell
ead95e760c Fix formatting error in pem.h
Reviewed-by: Andy Polyakov <appro@openssl.org>

Conflicts:
	crypto/pem/pem.h

Conflicts:
	crypto/pem/pem.h
2015-01-22 14:17:02 +00:00
Matt Caswell
02f0c26cea Re-align some comments after running the reformat script.
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>
OpenSSL_0_9_8-post-reformat
2015-01-22 09:53:07 +00:00
Matt Caswell
6f1f3c6653 Rerun util/openssl-format-source -v -c .
Reviewed-by: Tim Hudson <tjh@openssl.org>
OpenSSL_0_9_8-post-auto-reformat
2015-01-22 09:53:02 +00:00
Matt Caswell
40720ce3ca Run util/openssl-format-source -v -c .
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:52:55 +00:00
Matt Caswell
9d03aabea3 More comment changes required for indent
Reviewed-by: Tim Hudson <tjh@openssl.org>
OpenSSL_0_9_8-pre-auto-reformat
2015-01-22 09:52:49 +00:00
Matt Caswell
117e79dd88 Yet more changes to comments
Conflicts:
	ssl/t1_enc.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:52:44 +00:00
Matt Caswell
bc91221636 More tweaks for comments due indent issues
Conflicts:
	ssl/ssl_ciph.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:52:40 +00:00
Matt Caswell
b9006da5d7 Backport hw_ibmca.c from master due to failed merge
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:52:34 +00:00
Matt Caswell
d26667b28f Tweaks for comments due to indent's inability to handle them
Conflicts:
	ssl/s3_srvr.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:52:28 +00:00
Matt Caswell
13270477f4 Move more comments that confuse indent
Conflicts:
	crypto/dsa/dsa.h
	demos/engines/ibmca/hw_ibmca.c
	ssl/ssl_locl.h

Conflicts:
	crypto/bn/rsaz_exp.c
	crypto/evp/e_aes_cbc_hmac_sha1.c
	crypto/evp/e_aes_cbc_hmac_sha256.c
	ssl/ssl_locl.h

Conflicts:
	crypto/ec/ec2_oct.c
	crypto/ec/ecp_nistp256.c
	crypto/ec/ecp_nistp521.c
	crypto/ec/ecp_nistputil.c
	crypto/ec/ecp_oct.c
	crypto/modes/gcm128.c
	ssl/ssl_locl.h

Conflicts:
	apps/apps.c
	crypto/crypto.h
	crypto/rand/md_rand.c
	ssl/d1_pkt.c
	ssl/ssl.h
	ssl/ssl_locl.h
	ssl/ssltest.c
	ssl/t1_enc.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:52:21 +00:00
Dr. Stephen Henson
3600d5a744 Delete trailing whitespace from output.
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:52:17 +00:00
Dr. Stephen Henson
2b2f5ac045 Add -d debug option to save preprocessed files.
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:52:12 +00:00
Dr. Stephen Henson
7d3081c5ae Test option -nc
Add option -nc which sets COMMENTS=true but disables all indent comment
reformatting options.

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:52:05 +00:00
Matt Caswell
9a5d775320 Add ecp_nistz256.c to list of files skipped by openssl-format-source
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:52:00 +00:00
Matt Caswell
e29126f99a Manually reformat aes_x86core.c and add it to the list of files skipped by
openssl-format-source

Conflicts:
	crypto/aes/aes_x86core.c

Conflicts:
	crypto/aes/aes_x86core.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:51:54 +00:00
Matt Caswell
175af9de89 Fix indent comment corruption issue
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:51:49 +00:00
Matt Caswell
53d6e678dc Amend openssl-format-source so that it give more repeatable output
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:51:43 +00:00
Andy Polyakov
4191a11f36 bn/bn_const.c: make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:51:38 +00:00
Andy Polyakov
f6e4701f2a bn/asm/x86_64-gcc.cL make it indent-friendly.
Conflicts:
	crypto/bn/asm/x86_64-gcc.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:51:32 +00:00
Andy Polyakov
86183798f3 bn/bn_asm.c: make it indent-friendly.
Conflicts:
	crypto/bn/bn_asm.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:51:26 +00:00
Andy Polyakov
b527959318 bn/bn_exp.c: make it indent-friendly.
Conflicts:
	crypto/bn/bn_exp.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:51:21 +00:00
Matt Caswell
25ca15e9a3 Manually reformat aes_core.c
Add aes_core.c to the list of files not processed by openssl-format-source

Conflicts:
	crypto/aes/aes_core.c

Conflicts:
	crypto/aes/aes_core.c

Conflicts:
	crypto/aes/aes_core.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:51:15 +00:00
Matt Caswell
d1d4b4f398 Add obj_dat.h to the list of files that will not be processed by
openssl-format-source

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:51:09 +00:00