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>
Matt Caswell [Wed, 21 Jan 2015 21:22:49 +0000 (21:22 +0000)]
Tweaks for comments due to indent's inability to handle them
Reviewed-by: Tim Hudson <tjh@openssl.org>
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
Reviewed-by: Tim Hudson <tjh@openssl.org>
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>
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>
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>
Andy Polyakov [Wed, 21 Jan 2015 16:28:45 +0000 (17:28 +0100)]
ec/ecp_nistz256.c: further harmonization with latest rules.
Conflicts:
crypto/ec/ecp_nistz256.c
Reviewed-by: Tim Hudson <tjh@openssl.org>
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>
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
Reviewed-by: Tim Hudson <tjh@openssl.org>
Andy Polyakov [Wed, 21 Jan 2015 15:51:06 +0000 (16:51 +0100)]
crypto/ofb128.c: make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Andy Polyakov [Wed, 21 Jan 2015 15:49:27 +0000 (16:49 +0100)]
modes/ctr128.c: make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Andy Polyakov [Wed, 21 Jan 2015 15:47:51 +0000 (16:47 +0100)]
modes/cfb128.c: make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Andy Polyakov [Wed, 21 Jan 2015 15:02:33 +0000 (16:02 +0100)]
ec/ecp_nistz256.c: harmonize with latest indent script.
Conflicts:
crypto/ec/ecp_nistz256.c
Reviewed-by: Tim Hudson <tjh@openssl.org>
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>
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>
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>
Andy Polyakov [Wed, 21 Jan 2015 10:54:03 +0000 (11:54 +0100)]
bn/asm/x86_64-gcc.cL make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Andy Polyakov [Wed, 21 Jan 2015 10:50:56 +0000 (11:50 +0100)]
bn/bn_asm.c: make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Andy Polyakov [Wed, 21 Jan 2015 10:45:23 +0000 (11:45 +0100)]
bn/bn_exp.c: make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
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
Reviewed-by: Tim Hudson <tjh@openssl.org>
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>
Matt Caswell [Wed, 21 Jan 2015 12:19:08 +0000 (12:19 +0000)]
Fix strange formatting by indent
Conflicts:
crypto/hmac/hmac.h
Reviewed-by: Tim Hudson <tjh@openssl.org>
Andy Polyakov [Wed, 21 Jan 2015 10:11:32 +0000 (11:11 +0100)]
modes/modes_lcl.h: make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
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
Reviewed-by: Tim Hudson <tjh@openssl.org>
Andy Polyakov [Wed, 21 Jan 2015 09:25:54 +0000 (10:25 +0100)]
modes/gcm128.c: make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Andy Polyakov [Wed, 21 Jan 2015 08:11:28 +0000 (09:11 +0100)]
modes/cts128.c: make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Andy Polyakov [Tue, 20 Jan 2015 22:45:19 +0000 (23:45 +0100)]
crypto/mem_dbg.c: make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Matt Caswell [Wed, 21 Jan 2015 09:33:22 +0000 (09:33 +0000)]
More indent fixes for STACK_OF
Conflicts:
ssl/s3_lib.c
Reviewed-by: Tim Hudson <tjh@openssl.org>
Matt Caswell [Tue, 20 Jan 2015 22:54:52 +0000 (22:54 +0000)]
Fix indent issue with functions using STACK_OF
Reviewed-by: Tim Hudson <tjh@openssl.org>
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>
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>
Andy Polyakov [Tue, 20 Jan 2015 14:49:55 +0000 (15:49 +0100)]
crypto/cryptlib.c: make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
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>
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>
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>
Andy Polyakov [Tue, 20 Jan 2015 13:15:44 +0000 (14:15 +0100)]
apps/speed.c: make it indent-friendly.
Conflicts:
apps/speed.c
Reviewed-by: Tim Hudson <tjh@openssl.org>
Andy Polyakov [Tue, 20 Jan 2015 11:55:04 +0000 (12:55 +0100)]
bn/rsaz_exp.c: make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Matt Caswell [Wed, 14 Jan 2015 21:26:14 +0000 (21:26 +0000)]
Fix make errors
Reviewed-by: Tim Hudson <tjh@openssl.org>
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>
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>
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>
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>
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>
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>
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
Reviewed-by: Tim Hudson <tjh@openssl.org>
Matt Caswell [Fri, 16 Jan 2015 09:21:50 +0000 (09:21 +0000)]
Additional comment changes for reformat of 1.0.2
Reviewed-by: Tim Hudson <tjh@openssl.org>
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
Reviewed-by: Tim Hudson <tjh@openssl.org>
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
Reviewed-by: Tim Hudson <tjh@openssl.org>
Richard Levitte [Tue, 13 Jan 2015 21:04:58 +0000 (22:04 +0100)]
Define CFLAGS as cflags on VMS as well
Reviewed-by: Matt Caswell <matt@openssl.org>
Andy Polyakov [Mon, 5 Jan 2015 22:40:10 +0000 (23:40 +0100)]
Add Broadwell performance results.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
b3d7294976c58e0e05d0ee44a0e7c9c3b8515e05)
Matt Caswell [Tue, 13 Jan 2015 10:20:12 +0000 (10:20 +0000)]
Make output from openssl version -f consistent with previous versions
Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit
2d2671790ee12dedd92c97f35b6feb755b8d4374)
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)
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)
Rich Salz [Mon, 12 Jan 2015 17:39:00 +0000 (12:39 -0500)]
Allow multiple IDN xn-- indicators
Update the X509v3 name parsing to allow multiple xn-- international
domain name indicators in a name. Previously, only allowed one at
the beginning of a name, which was wrong.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(cherry picked from commit
31d1d3741f16bd80ec25f72dcdbf6bbdc5664374)
Kurt Roeckx [Fri, 2 Jan 2015 11:27:57 +0000 (12:27 +0100)]
Make build reproducible
It contained a date on when it was build.
Reviewed-by: Rich Salz <rsalz@openssl.org>
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)
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
Matt Caswell [Thu, 8 Jan 2015 19:05:43 +0000 (19:05 +0000)]
Fix build failure on Windows due to undefined cflags identifier
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
5c5e7e1a7eb114cf136e1ae4b6a413bc48ba41eb)
Matt Caswell [Wed, 7 Jan 2015 14:18:13 +0000 (14:18 +0000)]
A memory leak can occur in dtls1_buffer_record if either of the calls to
ssl3_setup_buffers or pqueue_insert fail. The former will fail if there is a
malloc failure, whilst the latter will fail if attempting to add a duplicate
record to the queue. This should never happen because duplicate records should
be detected and dropped before any attempt to add them to the queue.
Unfortunately records that arrive that are for the next epoch are not being
recorded correctly, and therefore replays are not being detected.
Additionally, these "should not happen" failures that can occur in
dtls1_buffer_record are not being treated as fatal and therefore an attacker
could exploit this by sending repeated replay records for the next epoch,
eventually causing a DoS through memory exhaustion.
Thanks to Chris Mueller for reporting this issue and providing initial
analysis and a patch. Further analysis and the final patch was performed by
Matt Caswell from the OpenSSL development team.
CVE-2015-0206
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
(cherry picked from commit
652ff0f4796eecd8729b4690f2076d1c7ccb2862)
Dr. Stephen Henson [Thu, 23 Oct 2014 19:36:17 +0000 (20:36 +0100)]
Unauthenticated DH client certificate fix.
Fix to prevent use of DH client certificates without sending
certificate verify message.
If we've used a client certificate to generate the premaster secret
ssl3_get_client_key_exchange returns 2 and ssl3_get_cert_verify is
never called.
We can only skip the certificate verify message in
ssl3_get_cert_verify if the client didn't send a certificate.
Thanks to Karthikeyan Bhargavan for reporting this issue.
CVE-2015-0205
Reviewed-by: Matt Caswell <matt@openssl.org>
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.
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
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>
Andy Polyakov [Mon, 5 Jan 2015 14:20:54 +0000 (15:20 +0100)]
Fix for CVE-2014-3570 (with minor bn_asm.c revamp).
Reviewed-by: Emilia Kasper <emilia@openssl.org>
(cherry picked from commit
56df92efb6893abe323307939425957ce878c8f0)
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)
Andy Polyakov [Mon, 5 Jan 2015 21:56:47 +0000 (22:56 +0100)]
Fix irix-cc build.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit
e464403d0bda2f1f74eb68582e4988e591c32433)
Richard Levitte [Wed, 7 Jan 2015 01:15:35 +0000 (02:15 +0100)]
VMS fixups for 1.0.2
Reviewed-by: Rich Salz <rsalz@openssl.org>
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)
Emilia Kasper [Tue, 6 Jan 2015 14:41:04 +0000 (15:41 +0100)]
Only inherit the session ID context in SSL_set_SSL_CTX if the existing
context was also inherited (matches that of the existing SSL_CTX).
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
ac8e9cbe14b59dacfe4ac52bc5ff06f8003e9b01)
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)
Dr. Stephen Henson [Tue, 6 Jan 2015 20:29:28 +0000 (15:29 -0500)]
RT3662: Allow leading . in nameConstraints
Change by SteveH from original by John Denker (in the RT)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit
77ff1f3b8bfaa348956c5096a2b829f2e767b4f1)
Martin Brejcha [Sun, 16 Nov 2014 17:04:40 +0000 (17:04 +0000)]
Fix memory leak.
Fix memory leak by freeing up saved_message.data if it is not NULL.
PR#3489
Reviewed-by: Stephen Henson <steve@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
41cd41c4416f545a18ead37e09e437c75fa07c95)
Matt Caswell [Tue, 6 Jan 2015 15:32:01 +0000 (15:32 +0000)]
Remove blank line from start of cflags character array in buildinf.h
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit
b691154e18c0367643696db3cf73debe9ddfa9ae)
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>
Andy Polyakov [Tue, 6 Jan 2015 11:13:36 +0000 (12:13 +0100)]
CHANGES: mention "universal" ARM support.
This is re-commit without unrelated modification.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit
0548505f4cbd49b9724fab28881e096f9d951e6f)
Andy Polyakov [Tue, 6 Jan 2015 11:12:15 +0000 (12:12 +0100)]
Revert "CHANGES: mention "universal" ARM support."
This reverts commit
caeed719fe3fd619415755f245ab8a904978d99d.
Reviewed-by: Matt Caswell <matt@openssl.org>
Andy Polyakov [Tue, 6 Jan 2015 10:10:01 +0000 (11:10 +0100)]
CHANGES: mention "universal" ARM support.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit
4fec91506975f62a2f93be71a46acc7fae7eef45)
Andy Polyakov [Fri, 7 Nov 2014 21:48:22 +0000 (22:48 +0100)]
Remove inconsistency in ARM support.
This facilitates "universal" builds, ones that target multiple
architectures, e.g. ARMv5 through ARMv7. See commentary in
Configure for details.
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit
c1669e1c205dc8e695fb0c10a655f434e758b9f7)
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)
Dr. Stephen Henson [Mon, 5 Jan 2015 16:50:31 +0000 (16:50 +0000)]
update ordinals
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
31c65a7bc0de7ff1446645d41af388893362f579)
Adam Langley [Mon, 5 Jan 2015 16:28:33 +0000 (17:28 +0100)]
Ensure that the session ID context of an SSL* is updated
when its SSL_CTX is updated.
From BoringSSL commit
https://boringssl.googlesource.com/boringssl/+/
a5dc545bbcffd9c24cebe65e9ab5ce72d4535e3a
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit
61aa44ca99473f9cabdfb2d3b35abd0b473437d1)
Dr. Stephen Henson [Sun, 14 Dec 2014 23:14:15 +0000 (23:14 +0000)]
Constify ASN1_TYPE_cmp add X509_ALGOR_cmp.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
4c52816d35681c0533c25fdd3abb4b7c6962302d)
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
684400ce192dac51df3d3e92b61830a6ef90be3e)
Matt Caswell [Mon, 22 Dec 2014 11:34:24 +0000 (11:34 +0000)]
Additional fix required for no-srtp to work
RT3638
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Piotr Sikora [Mon, 22 Dec 2014 11:15:51 +0000 (11:15 +0000)]
Fix building with no-srtp
RT3638
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Conflicts:
ssl/t1_lib.c
Emilia Kasper [Mon, 5 Jan 2015 12:46:26 +0000 (13:46 +0100)]
Add a clang build target for linux-x86_64
This change documents the world as-is, by turning all warnings on,
and then turning warnings that trigger off again.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Andy Polyakov [Sun, 4 Jan 2015 20:29:50 +0000 (21:29 +0100)]
ecp_nistz256-x86_64.pl: fix occasional failures.
RT: 3607
Reviewed-by: Adam Langley <agl@google.com>
Reviewed-by: Emilia Kasper <emilia@openssl.org>
(cherry picked from commit
9e557ab2624d5c5e8d799c123f5e8211664d8845)
Rich Salz [Sun, 4 Jan 2015 19:51:04 +0000 (14:51 -0500)]
RT2914: NULL check missing in X509_name_canon
Check for NULL return from X509_NAME_ENTRY_new()
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
2c60925d1ccc0b96287bdc9acb90198e7180d642)
Dr. Stephen Henson [Fri, 2 Jan 2015 23:09:39 +0000 (23:09 +0000)]
Update SGC flag comment.
Since SGC has been removed from OpenSSL 1.0.2 the
SSL3_FLAGS_SGC_RESTART_DONE is no longer used. However the #define is
retained for compatibility.
Reviewed-by: Matt Caswell <matt@openssl.org>
Dr. Stephen Henson [Fri, 24 Oct 2014 01:36:13 +0000 (02:36 +0100)]
Remove MS SGC
MS Server gated cryptography is obsolete and dates from the time of export
restrictions on strong encryption and is only used by ancient versions of
MSIE.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit
63eab8a620944a990ab3985620966ccd9f48d681)
Dr. Stephen Henson [Fri, 5 Dec 2014 13:39:14 +0000 (13:39 +0000)]
Clear existing extension state.
When parsing ClientHello clear any existing extension state from
SRP login and SRTP profile.
Thanks to Karthikeyan Bhargavan for reporting this issue.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit
4f605ccb779e32a770093d687e0554e0bbb137d3)
Conflicts:
ssl/t1_lib.c
Dominik Neubauer [Tue, 4 Mar 2014 21:22:29 +0000 (22:22 +0100)]
typo in s_client
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Geoff Thorpe <geoff@openssl.org>
Kurt Roeckx [Tue, 16 Dec 2014 11:35:21 +0000 (12:35 +0100)]
Make "run" volatile
RT#3629
Reviewed-by: Richard Levitte <levitte@openssl.org>
Thorsten Glaser [Fri, 22 May 2009 16:28:05 +0000 (16:28 +0000)]
Document openssl dgst -hmac option
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Kurt Roeckx [Mon, 23 Dec 2013 18:06:34 +0000 (19:06 +0100)]
dlfcn: always define _GNU_SOURCE
We need this for the freebsd kernel with glibc as used in the Debian kfreebsd
ports. There shouldn't be a problem defining this on systems not using glibc.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Kurt Roeckx [Sun, 7 Dec 2014 21:25:39 +0000 (22:25 +0100)]
Fix memory leak in the apps
The BIO_free() allocated ex_data again that we already freed.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Alok Menghrajani [Mon, 1 Dec 2014 03:21:31 +0000 (19:21 -0800)]
Improves certificates HOWTO
* adds links to various related documents.
* fixes a few typos.
* rewords a few sentences.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit
67472bd82bed9d5e481b0d75926aab93618902be)
Richard Levitte [Mon, 22 Dec 2014 13:30:23 +0000 (14:30 +0100)]
Small typo
Reviewed-by: Stephen Henson <steve@openssl.org>
(cherry picked from commit
7cfab40f43afac2f46652886e260d1c4de058806)
Michael Tuexen [Sun, 16 Nov 2014 17:29:08 +0000 (17:29 +0000)]
Fix incorrect OPENSSL_assert() usage.
Return an error code for I/O errors instead of an assertion failure.
PR#3470
Reviewed-by: Stephen Henson <steve@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
2521fcd8527008ceb3e4748f95b0ed4e2d70cfef)
Matt Caswell [Fri, 19 Dec 2014 10:55:54 +0000 (10:55 +0000)]
Fix a problem if CFLAGS is too long cversion.c fails to compile when config
is run with --strict-warnings.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit
488f16e31b8f5ec2513410929325d0830d76762d)
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>