Rich Salz [Wed, 3 Sep 2014 16:02:13 +0000 (12:02 -0400)]
RT468: SSL_CTX_sess_set_cache_size wrong
The documentation is wrong about what happens when the
session cache fills up.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
e9edfc419674f20b482a9beff9c246519f9c503e)
Erik Auerswald [Wed, 27 Aug 2014 02:50:34 +0000 (22:50 -0400)]
RT3301: Discard too-long heartbeat requests
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
af4c6e348e4bad6303e7d214cdcf2536487aabe4)
Scott Schaefer [Wed, 13 Aug 2014 18:42:23 +0000 (14:42 -0400)]
RT2518: fix pod2man errors
pod2man now complains when item tags are not sequential.
Also complains about missing =back and other tags.
Silence the warnings; most were already done.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
fe7573042fa7f406fedb78d959659b39a7a1dcfb)
Rich Salz [Thu, 4 Sep 2014 21:15:42 +0000 (17:15 -0400)]
RT3108: OPENSSL_NO_SOCK should imply OPENSSL_NO_DGRAM
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
be0bd11d698677bb7dde14cde73af098da94da18)
Robin Lee [Thu, 4 Sep 2014 16:36:41 +0000 (12:36 -0400)]
RT3031: Need to #undef some names for win32
Copy the ifdef/undef stanza from x509.h to x509v3.h
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
83e4e03eeb22d2fbaec516a466330f2ccab22864)
Martin Olsson [Thu, 4 Sep 2014 16:45:05 +0000 (12:45 -0400)]
RT2843: Remove another spurious close-comment token
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
683cd7c9485009efcd5b522357519f0c7e1d4c47)
Martin Olsson [Thu, 4 Sep 2014 16:42:34 +0000 (12:42 -0400)]
RT2842: Remove spurious close-comment marker.
Also, I (rsalz) changed "#ifdef undef" to "#if 0"
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
6b0dc6eff1a59274730802db923d55802378d011)
Rich Salz [Mon, 8 Sep 2014 14:46:38 +0000 (10:46 -0400)]
Merge branch 'OpenSSL_1_0_2-stable' of git.openssl.org:openssl into OpenSSL_1_0_2-stable
another empty merge???
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Rich Salz [Mon, 8 Sep 2014 14:44:04 +0000 (10:44 -0400)]
Empty merge
Merge branch 'OpenSSL_1_0_2-stable' of git.openssl.org:openssl into OpenSSL_1_0_2-stable
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Rich Salz [Mon, 8 Sep 2014 14:44:04 +0000 (10:44 -0400)]
Empty merge
Merge branch 'OpenSSL_1_0_2-stable' of git.openssl.org:openssl into OpenSSL_1_0_2-stable
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Rich Salz [Fri, 5 Sep 2014 22:01:31 +0000 (18:01 -0400)]
RT1834: Fix PKCS7_verify return value
The function returns 0 or 1, only.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
b0e659cfaca9ff4a481cc63b7f6b6e97303ad8fe)
Rich Salz [Fri, 5 Sep 2014 22:01:31 +0000 (18:01 -0400)]
RT1832: Fix PKCS7_verify return value
The function returns 0 or 1, only.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
b0e659cfaca9ff4a481cc63b7f6b6e97303ad8fe)
Alon Bar-Lev [Fri, 5 Sep 2014 14:53:51 +0000 (10:53 -0400)]
RT1771: Add string.h include.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
8842987e5a76535597b9795b0408565baabf18d1)
Viktor Dkhovni [Sun, 7 Sep 2014 22:22:33 +0000 (18:22 -0400)]
RT1325,2973: Add more extensions to c_rehash
Regexp was bracketed wrong.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
5a8addc432503d99dba39474892b07345a619641)
Dr. Stephen Henson [Fri, 5 Sep 2014 12:39:39 +0000 (13:39 +0100)]
Add CHANGES entry for SCT viewer code.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
b2774f6e17d4204f19a4c009cef9db58821c4456)
Adam Langley [Fri, 20 Jun 2014 19:00:00 +0000 (12:00 -0700)]
psk_client_callback, 128-byte id bug.
Fix a bug in handling of 128 byte long PSK identity in
psk_client_callback.
OpenSSL supports PSK identities of up to (and including) 128 bytes in
length. PSK identity is obtained via the psk_client_callback,
implementors of which are expected to provide a NULL-terminated
identity. However, the callback is invoked with only 128 bytes of
storage thus making it impossible to return a 128 byte long identity and
the required additional NULL byte.
This CL fixes the issue by passing in a 129 byte long buffer into the
psk_client_callback. As a safety precaution, this CL also zeroes out the
buffer before passing it into the callback, uses strnlen for obtaining
the length of the identity returned by the callback, and aborts the
handshake if the identity (without the NULL terminator) is longer than
128 bytes.
(Original patch amended to achieve strnlen in a different way.)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit
be0d851732bad7370640702bc9c4a33189ede287)
Adam Langley [Tue, 23 Apr 2013 16:13:51 +0000 (12:13 -0400)]
Ensure that x**0 mod 1 = 0.
(cherry picked from commit
2b0180c37fa6ffc48ee40caa831ca398b828e680)
Reviewed-by: Ben Laurie <ben@openssl.org>
Richard Levitte [Thu, 14 Aug 2014 23:24:34 +0000 (01:24 +0200)]
Followup on RT3334 fix: make sure that a directory that's the empty
string returns 0 with errno = ENOENT.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit
360928b7d0f16dde70e26841bbf9e1af727e8b8f)
Phil Mesnier [Thu, 14 Aug 2014 17:35:07 +0000 (19:35 +0200)]
RT3334: Fix crypto/LPdir_win.c
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit
6a14fe7576e7a14a46ba14df8be8fe478536b4fb)
Clang via Jeffrey Walton [Tue, 2 Sep 2014 21:04:53 +0000 (17:04 -0400)]
RT3140: Possibly-unit variable in pem_lib.c
Can't really happen, but the flow of control isn't obvious.
Add an initializer.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit
0ff3687eab8b0915198ad84d83da5998860b11b3)
Emilia Kasper [Thu, 28 Aug 2014 17:45:55 +0000 (19:45 +0200)]
Make the inline const-time functions static.
"inline" without static is not correct as the compiler may choose to ignore it
and will then either emit an external definition, or expect one.
Reviewed-by: Geoff Thorpe <geoff@openssl.org>
(cherry picked from commit
86f50b36e63275a916b147f9d8764e3c0c060fdb)
Adam Williamson [Sun, 31 Aug 2014 22:22:09 +0000 (18:22 -0400)]
RT3511: doc fix; req default serial is random
RT842, closed back in 2004, changed the default serial number
to be a random number rather than zero. Finally time to update
the doc
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
3aba132d61baeecffb9a6f8da7d0809352cbfb2d)
Richard Levitte [Sun, 31 Aug 2014 15:02:25 +0000 (17:02 +0200)]
Add t1_ext and ssl_utst to the VMS build as well.
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
TANABE Hiroyasu [Sat, 30 Aug 2014 21:56:31 +0000 (17:56 -0400)]
RT1325,2973: Add more extensions to c_rehash
Add .crt/.cer/.crl to the filenames parsed.
I also updated the podpage (since it didn't exist when
this ticket was first created, nor when it was re-created
seven years later).
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
80ec8d4e3ee212786dc3092b1c97305b871827f0)
Andy Polyakov [Sat, 30 Aug 2014 17:17:09 +0000 (19:17 +0200)]
md5-x86_64.pl: work around warning.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit
4d86e8df6be69ed13abb73fd564f1f894eea0a98)
Andy Polyakov [Sat, 30 Aug 2014 17:13:49 +0000 (19:13 +0200)]
x86[_64] assembly pack: add Silvermont performance data.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit
b59f92e75d334c9281082a02faa6c68afb614fd2)
Rich Salz [Sat, 30 Aug 2014 14:18:51 +0000 (10:18 -0400)]
RT2820: case-insensitive filenames on Darwin
Andy pointed out there is also darwin64, so tweak the pattern.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit
457f7b14ecce885dce0b1a16bcd0723f1d7a2792)
Rich Salz [Mon, 14 Jul 2014 15:27:16 +0000 (11:27 -0400)]
Add tags/TAGS
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
9d6253cfd3395dfe7147dae134579c6b16544c53)
Rich Salz [Thu, 28 Aug 2014 23:11:42 +0000 (19:11 -0400)]
RT2119,3407: Updated to dgst.pod
Re-order algorithm list.
Be consistent in command synopsis.
Add content about signing.
Add EXAMPLE section
Add some missing options: -r, -fips-fingerprint -non-fips-allow
Various other fixes.
Reviewed-by: Andy Polyakov <appro@openssl.org>
James Westby [Thu, 14 Aug 2014 14:14:35 +0000 (10:14 -0400)]
RT1941: c_rehash.pod is missing
Add the file written by James Westby, graciously contributed
under the terms of the OpenSSL license.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit
cf2239b3b397174a8a6b1cc84ff68aba34ed5941)
Rich Salz [Mon, 18 Aug 2014 17:00:51 +0000 (13:00 -0400)]
RT2379: Bug in BIO_set_accept_port.pod
The doc says that port can be "*" to mean any port.
That's wrong.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
07e3b31fae98b985d3d2aad7066144b11833f688)
Jim Reid [Fri, 29 Aug 2014 16:07:42 +0000 (12:07 -0400)]
RT2880: HFS is case-insensitive filenames
Add Darwin to list of case-insensitive filenames when
installing manapges. When doing this, I noticed that
we weren't setting "filecase" for the HTML doc install.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
82d9185ae53f6ba93953ae0e484179be89c8508a)
Dr. Stephen Henson [Thu, 28 Aug 2014 17:24:14 +0000 (18:24 +0100)]
update ordinals
Reviewed-by: Tim Hudson <tjh@openssl.org>
Dr. Stephen Henson [Tue, 26 Aug 2014 00:20:26 +0000 (01:20 +0100)]
Fix comments, add new test.
Fix comments in ssltest.c: return value of 0 now means extension is
omitted and add_cb is not called for servers if the corresponding
extension is absent in ClientHello.
Test add_cb is not called if extension is not received.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
f47e203975133ddbae3cde20c8c3c0516f62066c)
Dr. Stephen Henson [Mon, 18 Aug 2014 01:56:13 +0000 (02:56 +0100)]
Custom extension documentation.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
f3f56c2a87951e115a7f82d06826e72c9e13987f)
Dr. Stephen Henson [Tue, 19 Aug 2014 13:02:50 +0000 (14:02 +0100)]
Rename some callbacks, fix alignment.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
0cfefe4b6dcc6947c236b0f10a7f9e2f02273075)
Dr. Stephen Henson [Tue, 19 Aug 2014 12:54:38 +0000 (13:54 +0100)]
Use consistent function naming.
Instead of SSL_CTX_set_custom_cli_ext and SSL_CTX_set_custom_srv_ext
use SSL_CTX_add_client_custom_ext and SSL_CTX_add_server_custom_ext.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
8cafe9e8bfcc99d12adf083c61411955995668c4)
Dr. Stephen Henson [Tue, 19 Aug 2014 12:33:51 +0000 (13:33 +0100)]
New function SSL_extension_supported().
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
c846a5f5678a7149bc6cbd37dbdae886a5108364)
Dr. Stephen Henson [Sat, 16 Aug 2014 17:16:26 +0000 (18:16 +0100)]
New extension callback features.
Support separate parse and add callback arguments.
Add new callback so an application can free extension data.
Change return value for send functions so < 0 is an error 0
omits extension and > 0 includes it. This is more consistent
with the behaviour of other functions in OpenSSL.
Modify parse_cb handling so <= 0 is an error.
Make SSL_CTX_set_custom_cli_ext and SSL_CTX_set_custom_cli_ext argument
order consistent.
NOTE: these changes WILL break existing code.
Remove (now inaccurate) in line documentation.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
33f653adf3bff5b0795e22de1f54b7c5472252d0)
Dr. Stephen Henson [Thu, 14 Aug 2014 12:25:50 +0000 (13:25 +0100)]
Callback revision.
Use "parse" and "add" for function and callback names instead of
"first" and "second".
Change arguments to callback so the extension type is unsigned int
and the buffer length is size_t. Note: this *will* break existing code.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
de2a9e38f39eacc2e052d694f5b5fa5b7e734abc)
Dr. Stephen Henson [Tue, 12 Aug 2014 15:18:55 +0000 (16:18 +0100)]
Remove serverinfo checks.
Since sanity checks are performed for all custom extensions the
serverinfo checks are no longer needed.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
707b026d7871eb12c23671c975e6a15a8c331785)
Conflicts:
ssl/ssl3.h
ssl/t1_lib.c
Dr. Stephen Henson [Tue, 12 Aug 2014 13:25:49 +0000 (14:25 +0100)]
Add custom extension sanity checks.
Reject attempts to use extensions handled internally.
Add flags to each extension structure to indicate if an extension
has been sent or received. Enforce RFC5246 compliance by rejecting
duplicate extensions and unsolicited extensions and only send a
server extension if we have sent the corresponding client extension.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
28ea0a0c6a5e4e217c405340fa22a8503c7a17db)
Dr. Stephen Henson [Sun, 10 Aug 2014 11:08:08 +0000 (12:08 +0100)]
Custom extension revision.
Use the same structure for client and server custom extensions.
Add utility functions in new file t1_ext.c.
Use new utility functions to handle custom server and client extensions
and remove a lot of code duplication.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
ecf4d660902dcef6e0afc51d52926f00d409ee6b)
Conflicts:
ssl/ssl_lib.c
ssl/ssl_locl.h
ssl/t1_lib.c
Dr. Stephen Henson [Tue, 5 Aug 2014 14:21:36 +0000 (15:21 +0100)]
Revision of custom extension code.
Move custom extension structures from SSL_CTX to CERT structure.
This change means the form can be revised in future without binary
compatibility issues. Also since CERT is part of SSL structures
so per-SSL custom extensions could be supported in future as well as
per SSL_CTX.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
b83294fe3022b9d5d525ccdcfeb53d39c25b05bd)
Conflicts:
ssl/ssl.h
ssl/ssl_cert.c
ssl/ssl_locl.h
Emilia Kasper [Thu, 28 Aug 2014 13:33:34 +0000 (15:33 +0200)]
Constant-time utilities
Pull constant-time methods out to a separate header, add tests.
Reviewed-by: Bodo Moeller <bodo@openssl.org>
(cherry picked from commit
5a3d21c0585064292bde5cd34089e120487ab687)
Conflicts:
ssl/s3_cbc.c
test/Makefile
Raphael Spreitzer [Thu, 28 Aug 2014 02:53:10 +0000 (22:53 -0400)]
RT2400: ASN1_STRING_to_UTF8 missing initializer
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
f9fb43e176ad2a914108cd2b403425dc1ebc7262)
Rich Salz [Thu, 28 Aug 2014 01:43:25 +0000 (21:43 -0400)]
RT2308: Add extern "C" { ... } wrapper
Add the wrapper to all public header files (Configure
generates one). Don't bother for those that are just
lists of #define's that do renaming.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Cherry-pick of commit
17e80c6bd05de7406a65116f34ed59665607d8d5
Emilia Kasper [Mon, 25 Aug 2014 10:38:16 +0000 (12:38 +0200)]
Explicitly check for empty ASN.1 strings in d2i_ECPrivateKey
The old code implicitly relies on the ASN.1 code returning a \0-prefixed buffer
when the buffer length is 0. Change this to verify explicitly that the ASN.1 string
has positive length.
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
(cherry picked from commit
82dc08de54ce443c2a9ac478faffe79e76157795)
Matt Caswell [Fri, 22 Aug 2014 16:04:19 +0000 (18:04 +0200)]
RT3065: automatically generate a missing EC public key
When d2i_ECPrivateKey reads a private key with a missing (optional) public key,
generate one automatically from the group and private key.
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
(cherry picked from commit
ed383f847156940e93f256fed78599873a4a9b28)
Adam Langley [Tue, 23 Apr 2013 19:12:36 +0000 (15:12 -0400)]
RT3065: ec_private_key_dont_crash
This change saves several EC routines from crashing when an EC_KEY is
missing a public key. The public key is optional in the EC private key
format and, without this patch, running the following through `openssl
ec` causes a crash:
-----BEGIN EC PRIVATE KEY-----
MBkCAQEECAECAwQFBgcIoAoGCCqGSM49AwEH
-----END EC PRIVATE KEY-----
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
(cherry picked from commit
b391570bdeb386d4fd325917c248d593d3c43930)
Mihai Militaru [Tue, 26 Aug 2014 16:35:54 +0000 (12:35 -0400)]
RT2210: Add missing EVP_cleanup to example
I also removed some trailing whitespace and cleaned
up the "see also" list.
Reviewed-by: Emilia Kasper <emilia@openssl.org>
(cherry picked from commit
7b3e11c54466f1da8b707c932e308d345fd61101)
John Fitzgibbon [Mon, 18 Aug 2014 21:55:19 +0000 (17:55 -0400)]
RT2724: Remove extra declaration
Extra SSL_get_selected_srtp_profile() declaration in ssl/srtp.h
causes -Werror builds to fail.
Cherry-picked from
3609b02305c3678525930ff9bacb566c0122ea2a
Reviewed-by: Tim Hudson <tjh@openssl.org>
David Gatwood [Tue, 26 Aug 2014 17:02:03 +0000 (13:02 -0400)]
RT1744: SSL_CTX_set_dump_dh() doc feedback
The description of when the server creates a DH key is
confusing. This cleans it up.
(rsalz: also removed trailing whitespace.)
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Jan Schaumann [Fri, 15 Aug 2014 03:00:44 +0000 (23:00 -0400)]
RT1804: fix EXAMPLE in EVP_EncryptInit.pod
The EXAMPLE that used FILE and RC2 doesn't compile due to a
few minor errors. Tweak to use IDEA and AES-128. Remove
examples about RC2 and RC5.
Reviewed-by: Emilia Kasper <emilia@openssl.org>
Matt Caswell [Thu, 24 Jul 2014 05:00:11 +0000 (01:00 -0400)]
Typo fixes to evp documentation.
This patch was submitted by user "Kox" via the wiki
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
2dd8cb3b9593f528d9537aa6a003d5c93df1e3c5)
Adam Langley [Tue, 19 Aug 2014 15:57:53 +0000 (17:57 +0200)]
RT3060: Limit the number of empty records.
Limit the number of empty records that will be processed consecutively
in order to prevent ssl3_get_record from never returning.
Reported by "oftc_must_be_destroyed" and George Kadianakis.
Reviewed-by: Bodo Moeller <bodo@openssl.org>
Adam Langley [Thu, 21 Feb 2013 22:11:55 +0000 (17:11 -0500)]
RT3061: Don't SEGFAULT when trying to export a public DSA key as a private key.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Emilia Kasper [Fri, 22 Aug 2014 11:16:55 +0000 (13:16 +0200)]
Improve EVP_PKEY_sign documentation
Clarify the intended use of EVP_PKEY_sign. Make the code example compile.
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
(cherry picked from commit
d64c533a207f7b6d86c3bc8ffb053e5f4d0c1ca0)
Emilia Kasper [Tue, 19 Aug 2014 11:18:07 +0000 (13:18 +0200)]
define inline for Visual Studio
In Visual Studio, inline is available in C++ only, however __inline is available for C, see
http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
(cherry picked from commit
f511b25a7370c775dc9fd6198dbacd1706cf242b)
Emilia Kasper [Tue, 19 Aug 2014 14:28:07 +0000 (16:28 +0200)]
Fix build when BSAES_ASM is defined but VPAES_ASM is not
Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit
da92be4d68bec81030838e3228ef0238c565af85)
Andy Polyakov [Wed, 20 Aug 2014 22:17:45 +0000 (00:17 +0200)]
bn/asm/rsaz-*.pl: allow spaces in Perl path name.
RT: 2835
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
15735e4f0e81d535cda0ad7ab52a0ed64b644cd0)
Andy Polyakov [Wed, 20 Aug 2014 22:13:55 +0000 (00:13 +0200)]
sha1-mb-x86_64.pl: add commentary.
Reviewed-by: Emilia Kasper <emilia@openssl.org>
(cherry picked from commit
e608273a8094a95a5703c26a428a007497e74392)
Andy Polyakov [Wed, 20 Aug 2014 20:18:14 +0000 (22:18 +0200)]
crypto/evp/e_aes_cbc_hmac_sha[1|256].c: fix compiler warnings.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
2893a302a9b6a70161d1859d985a52af11b2195d)
Andy Polyakov [Wed, 20 Aug 2014 20:10:20 +0000 (22:10 +0200)]
sha1-mb-x86_64.pl: fix typo.
Reviewed-by: Emilia Kasper <emilia@openssl.org>
(cherry picked from commit
55eb14da201cc35fe744a08718f5c2efb97f6155)
Matt Caswell [Sat, 26 Jul 2014 22:47:40 +0000 (23:47 +0100)]
Fixed out-of-bounds read errors in ssl3_get_key_exchange.
PR#3450
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Istvan Noszticzius [Fri, 15 Aug 2014 15:43:28 +0000 (16:43 +0100)]
Fix use after free bug.
Reviewed-by: Stephen Henson <steve@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
5afa57fb7b17aa51cfba1ffa94e900fc7a5f0e04)
Bodo Moeller [Wed, 13 Aug 2014 15:37:19 +0000 (17:37 +0200)]
Further improve/fix ec_GFp_simple_points_make_affine (ecp_smpl.c) and
group_order_tests (ectest.c). Also fix the EC_POINTs_mul documentation (ec.h).
Reviewed-by: emilia@openssl.org
Dr. Stephen Henson [Fri, 8 Aug 2014 10:24:25 +0000 (11:24 +0100)]
Fix SRP authentication ciphersuites.
The addition of SRP authentication needs to be checked in various places
to work properly. Specifically:
A certificate is not sent.
A certificate request must not be sent.
Server key exchange message must not contain a signature.
If appropriate SRP authentication ciphersuites should be chosen.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit
8f5a8805b82d1ae81168b11b7f1506db9e047dec)
Dr. Stephen Henson [Fri, 8 Aug 2014 10:19:39 +0000 (11:19 +0100)]
Test SRP authentication ciphersuites.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit
193c1c07165b0042abd217274a084b49459d4443)
Dr. Stephen Henson [Thu, 7 Aug 2014 00:08:14 +0000 (01:08 +0100)]
Only use FIPS EC methods in FIPS mode.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit
1433cac53c93f9f109290389f60b17078a572d3d)
Dr. Stephen Henson [Fri, 1 Aug 2014 13:56:56 +0000 (14:56 +0100)]
Check SRP parameters early.
Check SRP parameters when they are received so we can send back an
appropriate alert.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Dr. Stephen Henson [Thu, 31 Jul 2014 19:56:22 +0000 (20:56 +0100)]
Fix SRP buffer overrun vulnerability.
Invalid parameters passed to the SRP code can be overrun an internal
buffer. Add sanity check that g, A, B < N to SRP code.
Thanks to Sean Devlin and Watson Ladd of Cryptography Services, NCC
Group for reporting this issue.
Dr. Stephen Henson [Thu, 24 Jul 2014 23:50:06 +0000 (00:50 +0100)]
Fix SRP ciphersuite DoS vulnerability.
If a client attempted to use an SRP ciphersuite and it had not been
set up correctly it would crash with a null pointer read. A malicious
server could exploit this in a DoS attack.
Thanks to Joonas Kuorilehto and Riku Hietamäki from Codenomicon
for reporting this issue.
CVE-2014-2970
Reviewed-by: Tim Hudson <tjh@openssl.org>
Gabor Tyukasz [Wed, 23 Jul 2014 21:42:06 +0000 (23:42 +0200)]
Fix race condition in ssl_parse_serverhello_tlsext
CVE-2014-3509
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Emilia Kasper [Wed, 2 Jul 2014 17:02:33 +0000 (19:02 +0200)]
Fix OID handling:
- Upon parsing, reject OIDs with invalid base-128 encoding.
- Always NUL-terminate the destination buffer in OBJ_obj2txt printing function.
CVE-2014-3508
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Emilia Käsper [Thu, 24 Jul 2014 20:15:29 +0000 (22:15 +0200)]
Fix DTLS anonymous EC(DH) denial of service
CVE-2014-3510
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
David Benjamin [Wed, 23 Jul 2014 20:32:21 +0000 (22:32 +0200)]
Fix protocol downgrade bug in case of fragmented packets
CVE-2014-3511
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Bodo Möller <bodo@openssl.org>
Adam Langley [Fri, 6 Jun 2014 21:47:07 +0000 (14:47 -0700)]
Remove some duplicate DTLS code.
In a couple of functions, a sequence number would be calculated twice.
Additionally, in |dtls1_process_out_of_seq_message|, we know that
|frag_len| <= |msg_hdr->msg_len| so the later tests for |frag_len <
msg_hdr->msg_len| can be more clearly written as |frag_len !=
msg_hdr->msg_len|, since that's the only remaining case.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Matt Caswell [Thu, 24 Jul 2014 22:54:28 +0000 (23:54 +0100)]
Applying same fix as in dtls1_process_out_of_seq_message. A truncated DTLS fragment would cause *ok to be clear, but the return value would still be the number of bytes read.
Problem identified by Emilia Käsper, based on previous issue/patch by Adam
Langley.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Adam Langley [Fri, 6 Jun 2014 21:44:20 +0000 (14:44 -0700)]
Fix return code for truncated DTLS fragment.
Previously, a truncated DTLS fragment in
|dtls1_process_out_of_seq_message| would cause *ok to be cleared, but
the return value would still be the number of bytes read. This would
cause |dtls1_get_message| not to consider it an error and it would
continue processing as normal until the calling function noticed that
*ok was zero.
I can't see an exploit here because |dtls1_get_message| uses
|s->init_num| as the length, which will always be zero from what I can
see.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Adam Langley [Fri, 6 Jun 2014 21:30:33 +0000 (14:30 -0700)]
Fix memory leak from zero-length DTLS fragments.
The |pqueue_insert| function can fail if one attempts to insert a
duplicate sequence number. When handling a fragment of an out of
sequence message, |dtls1_process_out_of_seq_message| would not call
|dtls1_reassemble_fragment| if the fragment's length was zero. It would
then allocate a fresh fragment and attempt to insert it, but ignore the
return value, leaking the fragment.
This allows an attacker to exhaust the memory of a DTLS peer.
Fixes CVE-2014-3507
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Matt Caswell [Fri, 6 Jun 2014 21:25:52 +0000 (14:25 -0700)]
Fix DTLS handshake message size checks.
In |dtls1_reassemble_fragment|, the value of
|msg_hdr->frag_off+frag_len| was being checked against the maximum
handshake message size, but then |msg_len| bytes were allocated for the
fragment buffer. This means that so long as the fragment was within the
allowed size, the pending handshake message could consume 16MB + 2MB
(for the reassembly bitmap). Approx 10 outstanding handshake messages
are allowed, meaning that an attacker could consume ~180MB per DTLS
connection.
In the non-fragmented path (in |dtls1_process_out_of_seq_message|), no
check was applied.
Fixes CVE-2014-3506
Wholly based on patch by Adam Langley with one minor amendment.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Matt Caswell [Thu, 24 Jul 2014 22:33:34 +0000 (23:33 +0100)]
Added comment for the frag->reassembly == NULL case as per feedback from Emilia
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Adam Langley [Fri, 6 Jun 2014 21:19:21 +0000 (14:19 -0700)]
Avoid double free when processing DTLS packets.
The |item| variable, in both of these cases, may contain a pointer to a
|pitem| structure within |s->d1->buffered_messages|. It was being freed
in the error case while still being in |buffered_messages|. When the
error later caused the |SSL*| to be destroyed, the item would be double
freed.
Thanks to Wah-Teh Chang for spotting that the fix in
1632ef74 was
inconsistent with the other error paths (but correct).
Fixes CVE-2014-3505
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Dr. Stephen Henson [Fri, 1 Aug 2014 19:15:48 +0000 (20:15 +0100)]
make update
Reviewed-by: Tim Hudson <tjh@openssl.org>
Dr. Stephen Henson [Thu, 31 Jul 2014 20:22:23 +0000 (21:22 +0100)]
Fix error discrepancy.
We can't rename ssleay_rand_bytes to md_rand_bytes_lock as this will cause
an error code discrepancy. Instead keep ssleay_rand_bytes and add an
extra parameter: since ssleay_rand_bytes is not part of the public API
this wont cause any binary compatibility issues.
Reviewed-by: Kurt Roeckx <kurt@openssl.org >
Bodo Moeller [Fri, 1 Aug 2014 17:03:03 +0000 (19:03 +0200)]
Update $default_depflags to match current defaults.
Bodo Moeller [Fri, 1 Aug 2014 16:38:56 +0000 (18:38 +0200)]
Clean up CHANGES files: If a change is already present in 1.0.1f or 1.0.1h,
don't list it again under changes between 1.0.1h and 1.0.2.
Bodo Moeller [Fri, 1 Aug 2014 15:18:14 +0000 (17:18 +0200)]
Simplify and fix ec_GFp_simple_points_make_affine
(which didn't always handle value 0 correctly).
Reviewed-by: emilia@openssl.org
Dr. Stephen Henson [Wed, 30 Jul 2014 14:13:08 +0000 (15:13 +0100)]
Avoid multiple lock using FIPS DRBG.
Don't use multiple locks when SP800-90 DRBG is used outside FIPS mode.
PR#3176
Reviewed-by: Rich Salz <rsalz@openssl.org>
Dr. Stephen Henson [Wed, 23 Jul 2014 12:18:06 +0000 (13:18 +0100)]
Add conditional unit testing interface.
Don't call internal functions directly call them through
SSL_test_functions(). This also makes unit testing work on
Windows and platforms that don't export internal functions
from shared libraries.
By default unit testing is not enabled: it requires the compile
time option "enable-unit-test".
Reviewed-by: Geoff Thorpe <geoff@openssl.org>
(cherry picked from commit
e0fc7961c4fbd27577fb519d9aea2dc788742715)
Conflicts:
ssl/heartbeat_test.c
ssl/ssl.h
util/mkdef.pl
Matt Caswell [Tue, 22 Jul 2014 20:31:04 +0000 (21:31 +0100)]
Prepare for 1.0.2-beta3-dev
Reviewed-by: Stephen Henson <steve@openssl.org>
Matt Caswell [Tue, 22 Jul 2014 20:30:33 +0000 (21:30 +0100)]
Prepare for 1.0.2-beta2 release
Reviewed-by: Stephen Henson <steve@openssl.org>
Matt Caswell [Tue, 22 Jul 2014 20:30:33 +0000 (21:30 +0100)]
make update
Reviewed-by: Stephen Henson <steve@openssl.org>
Dr. Stephen Henson [Tue, 22 Jul 2014 19:55:29 +0000 (20:55 +0100)]
update $default_depflags
Reviewed-by: Matt Caswell <matt@openssl.org>
Andy Polyakov [Tue, 22 Jul 2014 18:16:16 +0000 (20:16 +0200)]
CHANGES: mention new platforms.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Billy Brumley [Mon, 21 Jul 2014 21:08:23 +0000 (22:08 +0100)]
"EC_POINT_invert" was checking "dbl" function pointer instead of "invert".
PR#2569
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit
cba11f57ce161fd301a72194827327128191de7e)
Tim Hudson [Mon, 21 Jul 2014 19:26:17 +0000 (05:26 +1000)]
Remove old unused and unmaintained demonstration code.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit
62352b8138018775a4c085a105fccd9cdcb6323f)
Andy Polyakov [Mon, 21 Jul 2014 13:29:09 +0000 (15:29 +0200)]
sha1-ppc.pl: shave off one cycle from BODY_20_39
and improve performance by 10% on POWER[78].
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(cherry picked from commit
5c3598307ebbf5a88d1c39fbb2629536e443a5dd)
Tim Hudson [Mon, 21 Jul 2014 10:03:50 +0000 (20:03 +1000)]
Minor documentation update removing "really" and a
statement of opinion rather than a fact.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit
c8d133e4b6f1ed1b7ad3c1a6d2c62f460e26c050)