oweals/openssl.git
9 years agoCheck public key is not NULL.
Dr. Stephen Henson [Wed, 18 Feb 2015 00:34:59 +0000 (00:34 +0000)]
Check public key is not NULL.

CVE-2015-0288
PR#3708

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 28a00bcd8e318da18031b2ac8778c64147cd54f9)

9 years agoFix format script.
Dr. Stephen Henson [Mon, 2 Mar 2015 13:26:29 +0000 (13:26 +0000)]
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

9 years agoFix a failure to NULL a pointer freed on error.
Matt Caswell [Mon, 9 Feb 2015 11:38:41 +0000 (11:38 +0000)]
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>
9 years agoBring objects.pl output even closer to new format.
Andy Polyakov [Mon, 9 Feb 2015 14:59:09 +0000 (15:59 +0100)]
Bring objects.pl output even closer to new format.

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 849037169d98d070c27d094ac341fc6aca1ed2ca)

9 years agoHarmonize objects.pl output with new format.
Andy Polyakov [Sat, 7 Feb 2015 09:15:32 +0000 (10:15 +0100)]
Harmonize objects.pl output with new format.

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

9 years agoFix error handling in ssltest
Matt Caswell [Thu, 5 Feb 2015 10:19:55 +0000 (10:19 +0000)]
Fix error handling in ssltest

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit ae632974f905c59176fa5f312826f8f692890b67)

9 years agoFixed bad formatting in crypto/des/spr.h
Rich Salz [Thu, 5 Feb 2015 14:44:30 +0000 (09:44 -0500)]
Fixed bad formatting in crypto/des/spr.h

Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit 7e35f06ea908e47f87b723b5e951ffc55463eb8b)

9 years agoCheck PKCS#8 pkey field is valid before cleansing.
Dr. Stephen Henson [Sun, 1 Feb 2015 13:06:32 +0000 (13:06 +0000)]
Check PKCS#8 pkey field is valid before cleansing.

PR:3683
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 52e028b9de371da62c1e51b46592517b1068d770)

9 years agoFix for reformat problems with e_padlock.c
Matt Caswell [Thu, 22 Jan 2015 11:44:18 +0000 (11:44 +0000)]
Fix for reformat problems with e_padlock.c

Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit d3b7cac41b957704932a0cdbc74d4d48ed507cd0)

9 years agoFix formatting error in pem.h
Matt Caswell [Thu, 22 Jan 2015 10:42:48 +0000 (10:42 +0000)]
Fix formatting error in pem.h

Reviewed-by: Andy Polyakov <appro@openssl.org>
Conflicts:
crypto/pem/pem.h

Conflicts:
crypto/pem/pem.h

9 years agoRe-align some comments after running the reformat script. OpenSSL_0_9_8-post-reformat
Matt Caswell [Mon, 5 Jan 2015 11:30:03 +0000 (11:30 +0000)]
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>
9 years agoRerun util/openssl-format-source -v -c . OpenSSL_0_9_8-post-auto-reformat
Matt Caswell [Thu, 22 Jan 2015 02:48:18 +0000 (02:48 +0000)]
Rerun util/openssl-format-source -v -c .

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRun util/openssl-format-source -v -c .
Matt Caswell [Thu, 22 Jan 2015 02:47:42 +0000 (02:47 +0000)]
Run util/openssl-format-source -v -c .

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoMore comment changes required for indent OpenSSL_0_9_8-pre-auto-reformat
Matt Caswell [Thu, 22 Jan 2015 02:41:39 +0000 (02:41 +0000)]
More comment changes required for indent

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoYet more changes to comments
Matt Caswell [Thu, 22 Jan 2015 00:57:19 +0000 (00:57 +0000)]
Yet more changes to comments

Conflicts:
ssl/t1_enc.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoMore tweaks for comments due indent issues
Matt Caswell [Wed, 21 Jan 2015 23:54:59 +0000 (23:54 +0000)]
More tweaks for comments due indent issues

Conflicts:
ssl/ssl_ciph.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoBackport hw_ibmca.c from master due to failed merge
Matt Caswell [Wed, 21 Jan 2015 22:03:55 +0000 (22:03 +0000)]
Backport hw_ibmca.c from master due to failed merge

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoTweaks for comments due to indent's inability to handle them
Matt Caswell [Wed, 21 Jan 2015 21:22:49 +0000 (21:22 +0000)]
Tweaks for comments due to indent's inability to handle them

Conflicts:
ssl/s3_srvr.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoMove more comments that confuse indent
Matt Caswell [Wed, 21 Jan 2015 19:18:47 +0000 (19:18 +0000)]
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>
9 years agoDelete trailing whitespace from output.
Dr. Stephen Henson [Wed, 21 Jan 2015 15:32:54 +0000 (15:32 +0000)]
Delete trailing whitespace from output.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoAdd -d debug option to save preprocessed files.
Dr. Stephen Henson [Tue, 20 Jan 2015 18:53:56 +0000 (18:53 +0000)]
Add -d debug option to save preprocessed files.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoTest option -nc
Dr. Stephen Henson [Tue, 20 Jan 2015 18:49:04 +0000 (18:49 +0000)]
Test option -nc

Add option -nc which sets COMMENTS=true but disables all indent comment
reformatting options.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoAdd ecp_nistz256.c to list of files skipped by openssl-format-source
Matt Caswell [Wed, 21 Jan 2015 16:37:58 +0000 (16:37 +0000)]
Add ecp_nistz256.c to list of files skipped by openssl-format-source

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoManually reformat aes_x86core.c and add it to the list of files skipped by
Matt Caswell [Wed, 21 Jan 2015 16:34:27 +0000 (16:34 +0000)]
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>
9 years agoFix indent comment corruption issue
Matt Caswell [Wed, 21 Jan 2015 16:12:59 +0000 (16:12 +0000)]
Fix indent comment corruption issue

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoAmend openssl-format-source so that it give more repeatable output
Matt Caswell [Wed, 21 Jan 2015 15:28:57 +0000 (15:28 +0000)]
Amend openssl-format-source so that it give more repeatable output

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agobn/bn_const.c: make it indent-friendly.
Andy Polyakov [Wed, 21 Jan 2015 12:18:42 +0000 (13:18 +0100)]
bn/bn_const.c: make it indent-friendly.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agobn/asm/x86_64-gcc.cL make it indent-friendly.
Andy Polyakov [Wed, 21 Jan 2015 10:54:03 +0000 (11:54 +0100)]
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>
9 years agobn/bn_asm.c: make it indent-friendly.
Andy Polyakov [Wed, 21 Jan 2015 10:50:56 +0000 (11:50 +0100)]
bn/bn_asm.c: make it indent-friendly.

Conflicts:
crypto/bn/bn_asm.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agobn/bn_exp.c: make it indent-friendly.
Andy Polyakov [Wed, 21 Jan 2015 10:45:23 +0000 (11:45 +0100)]
bn/bn_exp.c: make it indent-friendly.

Conflicts:
crypto/bn/bn_exp.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoManually reformat aes_core.c
Matt Caswell [Wed, 21 Jan 2015 14:01:16 +0000 (14:01 +0000)]
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>
9 years agoAdd obj_dat.h to the list of files that will not be processed by
Matt Caswell [Wed, 21 Jan 2015 13:51:38 +0000 (13:51 +0000)]
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>
9 years agoFix strange formatting by indent
Matt Caswell [Wed, 21 Jan 2015 12:19:08 +0000 (12:19 +0000)]
Fix strange formatting by indent

Conflicts:
crypto/hmac/hmac.h

Conflicts:
crypto/evp/e_aes_cbc_hmac_sha256.c

Conflicts:
crypto/ec/ecp_nistp224.c
crypto/ec/ecp_nistp256.c
crypto/ec/ecp_nistp521.c
crypto/ec/ectest.c

Conflicts:
crypto/asn1/asn1_par.c
crypto/evp/e_des3.c
crypto/hmac/hmac.h
crypto/sparcv9cap.c
engines/ccgost/gost94_keyx.c
ssl/t1_enc.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoindent has problems with comments that are on the right hand side of a line.
Matt Caswell [Wed, 21 Jan 2015 11:09:58 +0000 (11:09 +0000)]
indent has problems with comments that are on the right hand side of a line.
Sometimes it fails to format them very well, and sometimes it corrupts them!
This commit moves some particularly problematic ones.

Conflicts:
crypto/bn/bn.h
crypto/ec/ec_lcl.h
crypto/rsa/rsa.h
demos/engines/ibmca/hw_ibmca.c
ssl/ssl.h
ssl/ssl3.h

Conflicts:
crypto/ec/ec_lcl.h
ssl/tls1.h

Conflicts:
crypto/ec/ecp_nistp224.c
crypto/evp/evp.h
ssl/d1_both.c
ssl/ssl.h
ssl/ssl_lib.c

Conflicts:
crypto/bio/bss_file.c
crypto/ec/ec_lcl.h
crypto/evp/evp.h
crypto/store/str_mem.c
crypto/whrlpool/wp_block.c
crypto/x509/x509_vfy.h
ssl/ssl.h
ssl/ssl3.h
ssl/ssltest.c
ssl/t1_lib.c
ssl/tls1.h

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agocrypto/mem_dbg.c: make it indent-friendly.
Andy Polyakov [Tue, 20 Jan 2015 22:45:19 +0000 (23:45 +0100)]
crypto/mem_dbg.c: make it indent-friendly.

Conflicts:
crypto/mem_dbg.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoMore indent fixes for STACK_OF
Matt Caswell [Wed, 21 Jan 2015 09:33:22 +0000 (09:33 +0000)]
More indent fixes for STACK_OF

Conflicts:
ssl/s3_lib.c

Conflicts:
apps/cms.c
crypto/x509/x509_lu.c
crypto/x509/x509_vfy.h
ssl/s3_lib.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoFix indent issue with engine.h
Matt Caswell [Tue, 20 Jan 2015 22:17:03 +0000 (22:17 +0000)]
Fix indent issue with engine.h

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoFix logic to check for indent.pro
Matt Caswell [Tue, 20 Jan 2015 22:13:39 +0000 (22:13 +0000)]
Fix logic to check for indent.pro

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agocrypto/cryptlib.c: make it indent-friendly.
Andy Polyakov [Tue, 20 Jan 2015 14:49:55 +0000 (15:49 +0100)]
crypto/cryptlib.c: make it indent-friendly.

Conflicts:
crypto/cryptlib.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agobn/bntest.c: make it indent-friendly.
Andy Polyakov [Tue, 20 Jan 2015 14:22:42 +0000 (15:22 +0100)]
bn/bntest.c: make it indent-friendly.

Conflicts:
crypto/bn/bntest.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agobn/bn_recp.c: make it indent-friendly.
Andy Polyakov [Tue, 20 Jan 2015 14:12:07 +0000 (15:12 +0100)]
bn/bn_recp.c: make it indent-friendly.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoengines/e_ubsec.c: make it indent-friendly.
Andy Polyakov [Tue, 20 Jan 2015 13:57:46 +0000 (14:57 +0100)]
engines/e_ubsec.c: make it indent-friendly.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoapps/speed.c: make it indent-friendly.
Andy Polyakov [Tue, 20 Jan 2015 13:15:44 +0000 (14:15 +0100)]
apps/speed.c: make it indent-friendly.

Conflicts:
apps/speed.c

Conflicts:
apps/speed.c

Conflicts:
apps/speed.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoFix make errors
Matt Caswell [Wed, 14 Jan 2015 21:26:14 +0000 (21:26 +0000)]
Fix make errors

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoMake the script a little more location agnostic
Richard Levitte [Tue, 20 Jan 2015 15:18:23 +0000 (16:18 +0100)]
Make the script a little more location agnostic

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoProvide script for filtering data initialisers for structs/unions. indent just can...
Matt Caswell [Tue, 20 Jan 2015 12:37:42 +0000 (12:37 +0000)]
Provide script for filtering data initialisers for structs/unions. indent just can't handle it.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoScript fixes.
Dr. Stephen Henson [Tue, 20 Jan 2015 14:12:10 +0000 (14:12 +0000)]
Script fixes.

Don't use double newline for headers.
Don't interpret ASN1_PCTX as start of an ASN.1 module.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRun expand before perl, to make sure things are properly aligned
Richard Levitte [Tue, 20 Jan 2015 14:17:02 +0000 (15:17 +0100)]
Run expand before perl, to make sure things are properly aligned

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoForce the use of our indent profile
Richard Levitte [Tue, 20 Jan 2015 14:14:24 +0000 (15:14 +0100)]
Force the use of our indent profile

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoProvide source reformating script. Requires GNU indent to be
Tim Hudson [Mon, 5 Jan 2015 10:17:50 +0000 (10:17 +0000)]
Provide source reformating script. Requires GNU indent to be
available.

Script written by Tim Hudson, with amendments by Steve Henson, Rich Salz and
Matt Caswell

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoFix source where indent will not be able to cope
Matt Caswell [Mon, 19 Jan 2015 12:42:01 +0000 (12:42 +0000)]
Fix source where indent will not be able to cope

Conflicts:
apps/ciphers.c
ssl/s3_pkt.c

Conflicts:
crypto/ec/ec_curve.c

Conflicts:
crypto/ec/ec_curve.c
ssl/s3_clnt.c
ssl/s3_srvr.c
ssl/ssl_sess.c

Conflicts:
apps/ciphers.c
crypto/bn/bn.h
crypto/ec/ec_curve.c
ssl/t1_enc.c
ssl/t1_lib.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoAdditional comment changes for reformat of 0.9.8
Matt Caswell [Fri, 16 Jan 2015 09:21:50 +0000 (09:21 +0000)]
Additional comment changes for reformat of 0.9.8

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoFurther comment amendments to preserve formatting prior to source reformat
Matt Caswell [Mon, 5 Jan 2015 00:34:00 +0000 (00:34 +0000)]
Further comment amendments to preserve formatting prior to source reformat

(cherry picked from commit 4a7fa26ffd65bf36beb8d1cb8f29fc0ae203f5c5)

Conflicts:
crypto/x509v3/pcy_tree.c

Conflicts:
apps/apps.c
ssl/ssltest.c

Conflicts:
apps/apps.c
crypto/ec/ec2_oct.c
crypto/ec/ecp_nistp224.c
crypto/ec/ecp_nistp256.c
crypto/ec/ecp_nistp521.c
ssl/s3_cbc.c
ssl/ssl_sess.c
ssl/t1_lib.c

Conflicts:
crypto/bio/b_sock.c
crypto/pem/pem.h
crypto/x509/x509_vfy.c
crypto/x509v3/pcy_tree.c
ssl/s3_both.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agomark all block comments that need format preserving so that
Tim Hudson [Sun, 28 Dec 2014 02:48:40 +0000 (12:48 +1000)]
mark all block comments that need format preserving so that
indent will not alter them when reformatting comments

(cherry picked from commit 1d97c8435171a7af575f73c526d79e1ef0ee5960)

Conflicts:
crypto/bn/bn_lcl.h
crypto/bn/bn_prime.c
crypto/engine/eng_all.c
crypto/rc4/rc4_utl.c
crypto/sha/sha.h
ssl/kssl.c
ssl/t1_lib.c

Conflicts:
crypto/rc4/rc4_enc.c
crypto/x509v3/v3_scts.c
crypto/x509v3/v3nametest.c
ssl/d1_both.c
ssl/s3_srvr.c
ssl/ssl.h
ssl/ssl_locl.h
ssl/ssltest.c
ssl/t1_lib.c

Conflicts:
crypto/asn1/a_sign.c
crypto/bn/bn_div.c
crypto/dsa/dsa_asn1.c
crypto/ec/ecp_nistp224.c
crypto/ec/ecp_nistp256.c
crypto/ec/ecp_nistp521.c
crypto/ec/ecp_nistputil.c
crypto/modes/gcm128.c
crypto/opensslv.h
ssl/d1_both.c
ssl/heartbeat_test.c
ssl/s3_clnt.c
ssl/s3_srvr.c
ssl/ssl_sess.c
ssl/t1_lib.c
test/testutil.h

Conflicts:
apps/openssl.c
apps/ts.c
apps/vms_decc_init.c
crypto/aes/aes_core.c
crypto/aes/aes_x86core.c
crypto/dsa/dsa_ameth.c
crypto/ec/ec2_mult.c
crypto/evp/evp.h
crypto/objects/objects.h
crypto/rsa/rsa_pss.c
crypto/stack/safestack.h
crypto/ts/ts.h
crypto/ts/ts_rsp_verify.c
crypto/whrlpool/wp_dgst.c
crypto/x509v3/v3_ncons.c
e_os2.h
engines/ccgost/gost89.c
engines/ccgost/gost_ctl.c
engines/ccgost/gost_keywrap.c
engines/ccgost/gost_keywrap.h
engines/ccgost/gost_sign.c
ssl/kssl.c
ssl/s3_srvr.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoPrepare for 0.9.8zf-dev OpenSSL_0_9_8-pre-reformat
Matt Caswell [Thu, 15 Jan 2015 15:08:48 +0000 (15:08 +0000)]
Prepare for 0.9.8zf-dev

Reviewed-by: Stephen Henson <steve@openssl.org>
9 years agoPrepare for 0.9.8ze release OpenSSL_0_9_8ze
Matt Caswell [Thu, 15 Jan 2015 15:05:59 +0000 (15:05 +0000)]
Prepare for 0.9.8ze release

Reviewed-by: Stephen Henson <steve@openssl.org>
9 years agomake update
Matt Caswell [Thu, 15 Jan 2015 15:05:59 +0000 (15:05 +0000)]
make update

Reviewed-by: Stephen Henson <steve@openssl.org>
9 years agoUpdates to CHANGES and NEWS
Matt Caswell [Thu, 15 Jan 2015 13:04:01 +0000 (13:04 +0000)]
Updates to CHANGES and NEWS

Reviewed-by: Dr Stephen Henson <steve@openssl.org>
9 years agoFix warning where BIO_FLAGS_UPLINK was being redefined.
Matt Caswell [Sat, 10 Jan 2015 23:36:28 +0000 (23:36 +0000)]
Fix warning where BIO_FLAGS_UPLINK was being redefined.
This warning breaks the build in 1.0.0 and 0.9.8

Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit b1ffc6ca1c387efad0772c16dfe426afef45dc4f)

9 years agoAvoid deprecation problems in Visual Studio 13
Matt Caswell [Fri, 9 Jan 2015 14:06:36 +0000 (14:06 +0000)]
Avoid deprecation problems in Visual Studio 13

Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit 86d21d0b9577322ac5da0114c5fac16eb49b4cef)

Conflicts:
e_os.h

9 years agoAvoid Windows 8 Getversion deprecated errors.
Dr. Stephen Henson [Tue, 25 Feb 2014 12:11:22 +0000 (12:11 +0000)]
Avoid Windows 8 Getversion deprecated errors.

Windows 8 SDKs complain that GetVersion() is deprecated.

We only use GetVersion like this:

(GetVersion() < 0x80000000)

which checks if the Windows version is NT based. Use a macro check_winnt()
which uses GetVersion() on older SDK versions and true otherwise.
(cherry picked from commit a4cc3c8041104896d51ae12ef7b678c31808ce52)

Conflicts:
apps/apps.c
crypto/bio/bss_log.c

Backported by Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openss.org>
9 years agoFurther windows specific .gitignore entries
Matt Caswell [Fri, 9 Jan 2015 23:01:20 +0000 (23:01 +0000)]
Further windows specific .gitignore entries

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 41c9cfbc4ee7345547fb98cccb8511f082f0910b)

9 years agoUpdate .gitignore with windows files to be excluded from git
Matt Caswell [Fri, 9 Jan 2015 10:19:10 +0000 (10:19 +0000)]
Update .gitignore with windows files to be excluded from git

Reviewed-by: Tim Hudson <tjh@openssl.org>
Conflicts:
.gitignore

(cherry picked from commit 04f670cf3d8f22e0d197a071d2db536fb7ebd9c7)

Conflicts:
.gitignore

9 years agoPrepare for 0.9.8ze-dev
Matt Caswell [Thu, 8 Jan 2015 14:36:15 +0000 (14:36 +0000)]
Prepare for 0.9.8ze-dev

Reviewed-by: Stephen Henson <steve@openssl.org>
9 years agoPrepare for 0.9.8zd release OpenSSL_0_9_8zd
Matt Caswell [Thu, 8 Jan 2015 14:33:47 +0000 (14:33 +0000)]
Prepare for 0.9.8zd release

Reviewed-by: Stephen Henson <steve@openssl.org>
9 years agomake update
Matt Caswell [Thu, 8 Jan 2015 14:33:47 +0000 (14:33 +0000)]
make update

Reviewed-by: Stephen Henson <steve@openssl.org>
9 years agoCHANGES and NEWS updates for release
Matt Caswell [Thu, 8 Jan 2015 13:37:28 +0000 (13:37 +0000)]
CHANGES and NEWS updates for release

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Steve Henson <steve@openssl.org>
9 years agoFix typo.
Dr. Stephen Henson [Tue, 6 Jan 2015 14:28:34 +0000 (14:28 +0000)]
Fix typo.

Fix typo in ssl3_get_cert_verify: we can only skip certificate verify
message if certificate is absent.

NB: OpenSSL 0.9.8 is NOT vulnerable to CVE-2015-0205 as it doesn't
support DH certificates and this typo prohibits skipping of
certificate verify message for sign only certificates anyway.

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoFollow on from CVE-2014-3571. This fixes the code that was the original source
Matt Caswell [Sat, 3 Jan 2015 00:54:35 +0000 (00:54 +0000)]
Follow on from CVE-2014-3571. This fixes the code that was the original source
of the crash due to p being NULL. Steve's fix prevents this situation from
occuring - however this is by no means obvious by looking at the code for
dtls1_get_record. This fix just makes things look a bit more sane.

Conflicts:
ssl/d1_pkt.c

Reviewed-by: Dr Stephen Henson <steve@openssl.org>
9 years agoFix crash in dtls1_get_record whilst in the listen state where you get two
Dr. Stephen Henson [Sat, 3 Jan 2015 00:45:13 +0000 (00:45 +0000)]
Fix crash in dtls1_get_record whilst in the listen state where you get two
separate reads performed - one for the header and one for the body of the
handshake record.

CVE-2014-3571

Reviewed-by: Matt Caswell <matt@openssl.org>
Conflicts:
ssl/s3_pkt.c

9 years agoFix for CVE-2014-3570.
Andy Polyakov [Mon, 5 Jan 2015 13:52:56 +0000 (14:52 +0100)]
Fix for CVE-2014-3570.

Reviewed-by: Emilia Kasper <emilia@openssl.org>
(cherry picked from commit e793809ba50c1e90ab592fb640a856168e50f3de)

9 years agofix error discrepancy
Dr. Stephen Henson [Wed, 7 Jan 2015 17:36:17 +0000 (17:36 +0000)]
fix error discrepancy

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 4a4d4158572fd8b3dc641851b8378e791df7972d)

9 years agouse correct credit in CHANGES
Dr. Stephen Henson [Tue, 6 Jan 2015 21:12:15 +0000 (21:12 +0000)]
use correct credit in CHANGES

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 4138e3882556c762d77eb827b8be98507cde48df)

Conflicts:
CHANGES

9 years agouse correct function name
Dr. Stephen Henson [Tue, 6 Jan 2015 20:55:38 +0000 (20:55 +0000)]
use correct function name

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit cb62ab4b17818fe66d2fed0a7fe71969131c811b)

9 years agoOnly allow ephemeral RSA keys in export ciphersuites.
Dr. Stephen Henson [Thu, 23 Oct 2014 16:09:57 +0000 (17:09 +0100)]
Only allow ephemeral RSA keys in export ciphersuites.

OpenSSL clients would tolerate temporary RSA keys in non-export
ciphersuites. It also had an option SSL_OP_EPHEMERAL_RSA which
enabled this server side. Remove both options as they are a
protocol violation.

Thanks to Karthikeyan Bhargavan for reporting this issue.
(CVE-2015-0204)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 4b4c1fcc88aec8c9e001b0a0077d3cd4de1ed0e6)

Conflicts:
CHANGES
doc/ssl/SSL_CTX_set_options.pod
ssl/d1_srvr.c
ssl/s3_srvr.c

9 years agoECDH downgrade bug fix.
Dr. Stephen Henson [Fri, 24 Oct 2014 11:30:33 +0000 (12:30 +0100)]
ECDH downgrade bug fix.

Fix bug where an OpenSSL client would accept a handshake using an
ephemeral ECDH ciphersuites with the server key exchange message omitted.

Thanks to Karthikeyan Bhargavan for reporting this issue.

CVE-2014-3572
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit b15f8769644b00ef7283521593360b7b2135cb63)

Conflicts:
CHANGES
ssl/s3_clnt.c

9 years agoFix various certificate fingerprint issues.
Dr. Stephen Henson [Sat, 20 Dec 2014 15:09:50 +0000 (15:09 +0000)]
Fix various certificate fingerprint issues.

By using non-DER or invalid encodings outside the signed portion of a
certificate the fingerprint can be changed without breaking the signature.
Although no details of the signed portion of the certificate can be changed
this can cause problems with some applications: e.g. those using the
certificate fingerprint for blacklists.

1. Reject signatures with non zero unused bits.

If the BIT STRING containing the signature has non zero unused bits reject
the signature. All current signature algorithms require zero unused bits.

2. Check certificate algorithm consistency.

Check the AlgorithmIdentifier inside TBS matches the one in the
certificate signature. NB: this will result in signature failure
errors for some broken certificates.

3. Check DSA/ECDSA signatures use DER.

Reencode DSA/ECDSA signatures and compare with the original received
signature. Return an error if there is a mismatch.

This will reject various cases including garbage after signature
(thanks to Antti Karjalainen and Tuomo Untinen from the Codenomicon CROSS
program for discovering this case) and use of BER or invalid ASN.1 INTEGERs
(negative or with leading zeroes).

CVE-2014-8275
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit 208a6012be3077d83df4475f32dd1b1446f3a02e)

Conflicts:
crypto/dsa/dsa_vrf.c

9 years agoUpdate ordinals.
Dr. Stephen Henson [Mon, 5 Jan 2015 15:35:55 +0000 (15:35 +0000)]
Update ordinals.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoAdd ASN1_TYPE_cmp and X509_ALGOR_cmp.
Dr. Stephen Henson [Sun, 14 Dec 2014 23:14:15 +0000 (23:14 +0000)]
Add ASN1_TYPE_cmp and X509_ALGOR_cmp.

(these are needed for certificate fingerprint fixes)
Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoReturn error when a bit string indicates an invalid amount of bits left
Kurt Roeckx [Mon, 15 Dec 2014 16:15:16 +0000 (17:15 +0100)]
Return error when a bit string indicates an invalid amount of bits left

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 86edf13b1c97526c0cf63c37342aaa01f5442688)

9 years agoReject invalid constructed encodings.
Dr. Stephen Henson [Wed, 17 Dec 2014 14:34:36 +0000 (14:34 +0000)]
Reject invalid constructed encodings.

According to X6.90 null, object identifier, boolean, integer and enumerated
types can only have primitive encodings: return an error if any of
these are received with a constructed encoding.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit f5e4b6b5b566320a8d774f9475540f7d0e6a704d)

Conflicts:
crypto/asn1/asn1_err.c

9 years agoRevert "RT3425: constant-time evp_enc"
Emilia Kasper [Wed, 17 Dec 2014 13:52:13 +0000 (14:52 +0100)]
Revert "RT3425: constant-time evp_enc"

Causes more problems than it fixes: even though error codes
are not part of the stable API, several users rely on the
specific error code, and the change breaks them. Conversely,
we don't have any concrete use-cases for constant-time behaviour here.

This reverts commit 1bb01b1b5f27a7de33e7a67946b8c001b54e09e9.

Reviewed-by: Andy Polyakov <appro@openssl.org>
10 years agoFix warning about negative unsigned intergers
Kurt Roeckx [Mon, 10 Nov 2014 18:03:03 +0000 (19:03 +0100)]
Fix warning about negative unsigned intergers

Reviewed-by: Richard Levitte <levitte@openssl.org>
10 years agomd32_common.h: address compiler warning in HOST_c2l.
Andy Polyakov [Wed, 29 Oct 2014 09:48:39 +0000 (10:48 +0100)]
md32_common.h: address compiler warning in HOST_c2l.

Reviewed-by: Stephen Henson <steve@openssl.org>
(cherry picked from commit d45282fc7cd9b97ed1479f8b8af713337fce57f5)

10 years agoUse only unsigned arithmetic in constant-time operations
Samuel Neves [Fri, 3 Oct 2014 23:13:36 +0000 (00:13 +0100)]
Use only unsigned arithmetic in constant-time operations

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
10 years agoFix and improve SSL_MODE_SEND_FALLBACK_SCSV documentation.
Bodo Moeller [Tue, 21 Oct 2014 20:41:27 +0000 (22:41 +0200)]
Fix and improve SSL_MODE_SEND_FALLBACK_SCSV documentation.

Reviewed-by: Rich Salz <rsalz@openssl.org>
10 years agoWhen processing ClientHello.cipher_suites, don't ignore cipher suites
Bodo Moeller [Tue, 21 Oct 2014 20:33:03 +0000 (22:33 +0200)]
When processing ClientHello.cipher_suites, don't ignore cipher suites
listed after TLS_FALLBACK_SCSV.

RT: 3575
Reviewed-by: Emilia Kasper <emilia@openssl.org>
10 years agoFix warning
Kurt Roeckx [Tue, 21 Oct 2014 19:32:50 +0000 (21:32 +0200)]
Fix warning

Reviewed-by: Emilia Käsper <emilia@openssl.org>
10 years agoKeep old method in case of an unsupported protocol
Kurt Roeckx [Tue, 21 Oct 2014 18:45:15 +0000 (20:45 +0200)]
Keep old method in case of an unsupported protocol

When we're configured with no-ssl3 and we receive an SSL v3 Client Hello, we set
the method to NULL.  We didn't used to do that, and it breaks things.  This is a
regression introduced in 62f45cc27d07187b59551e4fad3db4e52ea73f2c.  Keep the old
method since the code is not able to deal with a NULL method at this time.

CVE-2014-3569, PR#3571

Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit 392fa7a952e97d82eac6958c81ed1e256e6b8ca5)

10 years agono-ssl2 with no-ssl3 does not mean drop the ssl lib
Tim Hudson [Mon, 20 Oct 2014 05:23:54 +0000 (15:23 +1000)]
no-ssl2 with no-ssl3 does not mean drop the ssl lib

Reviewed-by: Geoff Thorpe <geoff@openssl.org>
10 years agoAdd constant_time_locl.h to HEADERS,
Tim Hudson [Thu, 25 Sep 2014 06:04:35 +0000 (08:04 +0200)]
Add constant_time_locl.h to HEADERS,
so the Win32 compile picks it up correctly.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit e2e5326e5b068411999f62b4ba67835d64764ca5)

10 years agoInclude "constant_time_locl.h" rather than "../constant_time_locl.h".
Richard Levitte [Wed, 24 Sep 2014 20:59:37 +0000 (22:59 +0200)]
Include "constant_time_locl.h" rather than "../constant_time_locl.h".
The different -I compiler parameters will take care of the rest...

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

Conflicts:
crypto/evp/evp_enc.c

10 years agoe_os.h: refine inline override logic (to address warnings in debug build).
Andy Polyakov [Tue, 30 Sep 2014 19:05:33 +0000 (21:05 +0200)]
e_os.h: refine inline override logic (to address warnings in debug build).

Reviewed-by: Dr Stephen Henson <steve@openssl.org>
(cherry picked from commit 55c7a4cf112bf154ed405ee05a6b7924b6b1ba92)

10 years agoe_os.h: allow inline functions to be compiled by legacy compilers.
Andy Polyakov [Wed, 24 Sep 2014 22:32:56 +0000 (00:32 +0200)]
e_os.h: allow inline functions to be compiled by legacy compilers.

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 40155f408985aff2e9f1b61b7cb04a3e518633a1)

Conflicts:
e_os.h

10 years agoRT3547: Add missing static qualifier
Kurt Cancemi [Sun, 28 Sep 2014 19:28:49 +0000 (15:28 -0400)]
RT3547: Add missing static qualifier

Reviewed-by: Ben Laurie <ben@openssl.org>
(cherry picked from commit 87d388c955c14a7c1371f9c7555fb429a406a3d3)

10 years agoDon't try 1**0 test with FIPS.
Dr. Stephen Henson [Thu, 16 Oct 2014 03:18:50 +0000 (04:18 +0100)]
Don't try 1**0 test with FIPS.

The 1**0 test will fail for FIPS capable builds because it uses the
old BIGNUM code in the 1.2 FIPS module which can't be fixed.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
10 years agoPrepare for 0.9.8zd-dev
Matt Caswell [Wed, 15 Oct 2014 12:49:42 +0000 (13:49 +0100)]
Prepare for 0.9.8zd-dev

Reviewed-by: Stephen Henson <steve@openssl.org>
10 years agoPrepare for 0.9.8zc release OpenSSL_0_9_8zc
Matt Caswell [Wed, 15 Oct 2014 12:48:52 +0000 (13:48 +0100)]
Prepare for 0.9.8zc release

Reviewed-by: Stephen Henson <steve@openssl.org>
10 years agomake update
Matt Caswell [Wed, 15 Oct 2014 12:48:52 +0000 (13:48 +0100)]
make update

Reviewed-by: Stephen Henson <steve@openssl.org>
10 years agoUpdates to NEWS
Matt Caswell [Wed, 15 Oct 2014 11:31:21 +0000 (12:31 +0100)]
Updates to NEWS

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