Matt Caswell [Tue, 3 Apr 2018 14:31:38 +0000 (15:31 +0100)]
Fix configuration of TLSv1.3 ciphersuites
Configuration of TLSv1.3 ciphersuites wasn't working in some cases.
Fixes #5740
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5855)
Matt Caswell [Tue, 3 Apr 2018 11:31:53 +0000 (12:31 +0100)]
Add some tests for configuring the TLSv1.3 ciphersuites
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5855)
Richard Levitte [Wed, 4 Apr 2018 13:23:30 +0000 (15:23 +0200)]
Don't use CPP in Configurations/unix-Makefile.tmpl
We started using $(CPP) instead of $(CC) -E, with the assumption that
CPP would be predefined. This is, however, not always true, and
rather depends on the 'make' implementation. Furthermore, on
platforms where CPP=cpp or something else other than '$(CC) -E',
there's a risk that it won't understand machine specific flags that we
pass to it. So it turns out that trying to use $(CPP) was a mistake,
and we therefore revert that use back to using $(CC) -E directly.
Fixes #5867
Note: this affects config targets that use Alpha, ARM, IA64, MIPS,
s390x or SPARC assembler modules.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5872)
cedral [Wed, 4 Apr 2018 12:54:47 +0000 (14:54 +0200)]
Visual Studio 2017 debug build warning error on 32 bit build
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5799)
Bernd Edlinger [Tue, 3 Apr 2018 21:47:10 +0000 (23:47 +0200)]
Prevent a possible recursion in ERR_get_state and fix the problem that
was pointed out in commit
aef84bb4efbddfd95d042f3f5f1d362ed7d4faeb
differently.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5863)
Bernd Edlinger [Wed, 4 Apr 2018 12:45:49 +0000 (14:45 +0200)]
Don't use getenv for critical functions when run as setuid/setgid
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5856)
David Benjamin [Wed, 28 Mar 2018 16:21:45 +0000 (12:21 -0400)]
Fix a bug in ecp_nistp224.c.
felem_neg does not produce an output within the tight bounds suitable
for felem_contract. This affects build configurations which set
enable-ec_nistp_64_gcc_128.
point_double and point_add, in the non-z*_is_zero cases, tolerate and
fix up the wider bounds, so this only affects point_add calls where the
other point is infinity. Thus it only affects the final addition in
arbitrary-point multiplication, giving the wrong y-coordinate. This is a
no-op for ECDH and ECDSA, which only use the x-coordinate of
arbitrary-point operations.
Note: ecp_nistp521.c has the same issue in that the documented
preconditions are violated by the test case. I have not addressed this
in this PR. ecp_nistp521.c does not immediately produce the wrong
answer; felem_contract there appears to be a bit more tolerant than its
documented preconditions. However, I haven't checked the point_add
property above holds. ecp_nistp521.c should either get this same fix, to
be conservative, or have the bounds analysis and comments reworked for
the wider bounds.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5779)
Pecio [Mon, 19 Mar 2018 08:34:35 +0000 (09:34 +0100)]
Enabled OneCore Conf for Console Apps (removed nonUniversal API)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5625)
Richard Levitte [Tue, 3 Apr 2018 14:33:55 +0000 (16:33 +0200)]
VMS: stricter acquisition of entropy for the pool
Fail harshly (in debug builds) when rand_pool_acquire_entropy isn't
delivering the required amount of entropy. In release builds, this
produces an error with details.
We also take the opportunity to modernise the types used.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5857)
Rich Salz [Tue, 3 Apr 2018 15:31:16 +0000 (11:31 -0400)]
Set error code on alloc failures
Almost all *alloc failures now set an error code.
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/5842)
Matt Caswell [Thu, 29 Mar 2018 09:45:42 +0000 (10:45 +0100)]
Fix some errors in the mem leaks docs
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5794)
Matt Caswell [Thu, 29 Mar 2018 08:17:11 +0000 (09:17 +0100)]
Fix a text canonicalisation bug in CMS
Where a CMS detached signature is used with text content the text goes
through a canonicalisation process first prior to signing or verifying a
signature. This process strips trailing space at the end of lines, converts
line terminators to CRLF and removes additional trailing line terminators
at the end of a file. A bug in the canonicalisation process meant that
some characters, such as form-feed, were incorrectly treated as whitespace
and removed. This is contrary to the specification (RFC5485). This fix
could mean that detached text data signed with an earlier version of
OpenSSL 1.1.0 may fail to verify using the fixed version, or text data
signed with a fixed OpenSSL may fail to verify with an earlier version of
OpenSSL 1.1.0. A workaround is to only verify the canonicalised text data
and use the "-binary" flag (for the "cms" command line application) or set
the SMIME_BINARY/PKCS7_BINARY/CMS_BINARY flags (if using CMS_verify()).
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5790)
Bernd Edlinger [Mon, 2 Apr 2018 08:54:52 +0000 (10:54 +0200)]
Change the "offset too large" message to more generic wording
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/5826)
Bernd Edlinger [Mon, 2 Apr 2018 08:35:29 +0000 (10:35 +0200)]
Remove an unnecessary cast in the param to BUF_MEM_grow
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/5826)
Bernd Edlinger [Mon, 2 Apr 2018 07:13:49 +0000 (09:13 +0200)]
Fix range checks with -offset and -length in asn1parse
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/5826)
Bernd Edlinger [Sun, 1 Apr 2018 09:02:39 +0000 (11:02 +0200)]
Use strtol instead of atoi in asn1parse
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/5826)
Bernd Edlinger [Sat, 31 Mar 2018 22:46:49 +0000 (00:46 +0200)]
Improve diagnostics for invalid arguments in asn1parse -strparse
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/5826)
Bernd Edlinger [Sat, 31 Mar 2018 19:09:32 +0000 (21:09 +0200)]
Fix a crash in the asn1parse command
Thanks to Sem Voigtländer for reporting this issue.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/5826)
Bernd Edlinger [Mon, 2 Apr 2018 15:20:04 +0000 (17:20 +0200)]
Use gnu_printf format attribute to minimise MinGW warnings
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5839)
Matt Caswell [Tue, 3 Apr 2018 13:26:16 +0000 (14:26 +0100)]
Prepare for 1.1.1-pre5-dev
Reviewed-by: Richard Levitte <levitte@openssl.org>
Matt Caswell [Tue, 3 Apr 2018 13:24:18 +0000 (14:24 +0100)]
Prepare for 1.1.1-pre4 release
Reviewed-by: Richard Levitte <levitte@openssl.org>
Matt Caswell [Tue, 3 Apr 2018 13:07:02 +0000 (14:07 +0100)]
Fix CHANGES
Fix the last release version number in CHANGES
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5852)
Matt Caswell [Tue, 3 Apr 2018 12:57:12 +0000 (13:57 +0100)]
Update copyright year
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5851)
Kurt Roeckx [Fri, 3 Nov 2017 19:59:16 +0000 (20:59 +0100)]
Use the private RNG for data that is not public
Reviewed-by: Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Fixes: #4641
GH: #4665
Alexandre Perrin [Mon, 2 Apr 2018 11:15:31 +0000 (07:15 -0400)]
Documentation typo fix in EVP_EncryptInit.pod
Remove duplicate declaration of `EVP_CIPHER_key_length` in the synopsis.
CLA: trivial
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5792)
Illya Gerasymchuk [Mon, 2 Apr 2018 11:13:19 +0000 (07:13 -0400)]
fix typo in x509 documentation
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5829)
Daniel Bevenius [Sun, 1 Apr 2018 14:17:52 +0000 (16:17 +0200)]
Remove import/use of File::Spec::Function
It looks like the usage of these functions were removed in
in commit
0a4edb931b883b9973721ae012e60c028387dd50 ("Unified - adapt
the generation of cpuid, uplink and buildinf to use GENERATE").
This commit removes the import/use of File::Spec::Functions module as it
is no longer needed by crypto/build.info.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5832)
Richard Levitte [Sun, 1 Apr 2018 15:41:16 +0000 (17:41 +0200)]
Windows builds: remove over-quotation of LIBZ macro
The LIBZ macro definition was already quoted in BASE_windows, then got
quotified once more in windows-makefile.tmpl. That's a bit too much
quotations, ending up with the compiler being asked to define the
macro |"LIBZ=\"ZLIB1\""| (no, not the macro LIBZ with the value
"ZLIB1"). This is solved by removing the extra quoting in
BASE_windows.
Along with this, change the quotation of macro definitions and include
file specification, so we end up with things like -I"QuotedPath" and
-D"Macro=\"some weird value\"" rather than "-IQuotedPath" and
"-DMacro=\"some weird value\"".
Fixes #5827
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5833)
Kurt Roeckx [Sat, 3 Mar 2018 22:19:03 +0000 (23:19 +0100)]
Make sure we use a nonce when a nonce is required
If a nonce is required and the get_nonce callback is NULL, request 50%
more entropy following NIST SP800-90Ar1 section 9.1.
Reviewed-by: Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
GH: #5503
Kurt Roeckx [Sat, 31 Mar 2018 12:43:01 +0000 (14:43 +0200)]
Update documentation on how to close a connection
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
GH: #5823
Daniel Bevenius [Sat, 31 Mar 2018 22:29:12 +0000 (18:29 -0400)]
Fix minor typo in comment in Configure
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5825)
Bernd Edlinger [Fri, 30 Mar 2018 18:03:37 +0000 (20:03 +0200)]
Remove -Wmisleading-indentation from gcc devteam warning options
because this one is enabled by default anyways
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5817)
Bernd Edlinger [Fri, 30 Mar 2018 17:17:39 +0000 (19:17 +0200)]
Fix a gcc-8 warning -Wcast-function-type
Casting to the generic function type "void (*)(void)"
prevents the warning.
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/5816)
Richard Levitte [Mon, 26 Mar 2018 09:00:05 +0000 (11:00 +0200)]
Refuse to run test_cipherlist unless shared library matches build
test/cipherlist_test.c is an internal consistency check, and therefore
requires that the shared library it runs against matches what it was
built for. test/recipes/test_cipherlist.t is made to refuse running
unless library version and build version match.
This adds a helper program test/versions.c, that simply displays the
library and the build version.
Partially fixes #5751
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5753)
(cherry picked from commit
cde87deafa7486f26bdf954867a6d72ca4ea06e7)
Bernd Edlinger [Thu, 29 Mar 2018 09:27:29 +0000 (11:27 +0200)]
Fix a possible crash in BN_from_montgomery_word
Thanks to Darovskikh Andrei for for reporting this issue.
Fixes: #5785
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5793)
Matt Caswell [Fri, 30 Mar 2018 13:35:52 +0000 (14:35 +0100)]
Revert commit
4a56d9a2
We have been unable to trace the contributor of that code to gain their
agreement for the licence change so the code has to be removed.
This commit reverts that contribution. The contribution had no functional
impact so the original way of doing things is still valid. However the
surrounding code has changed significantly so that the exact code as it
was orignally cannot be used. This commit uses the original code as a basis,
but rewrites it to use the PACKET API.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5808)
Matt Caswell [Fri, 30 Mar 2018 13:33:55 +0000 (14:33 +0100)]
GOST MAC algorithms don't support EVP_PKEY_new_raw_private_key()
We should use the old EVP_PKEY_new_mac_key() instead.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5808)
Matt Caswell [Fri, 30 Mar 2018 13:33:21 +0000 (14:33 +0100)]
Update trace code to know about GOST ciphersuites
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5808)
Rich Salz [Fri, 30 Mar 2018 16:40:08 +0000 (12:40 -0400)]
Remove some code
This commit removes the contribution of a user that we cannot
trace to gain their consent for the licence change.
I also cleaned up the return/error-return flow a bit.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5811)
Dr. Matthias St. Pierre [Tue, 27 Feb 2018 18:02:24 +0000 (19:02 +0100)]
Add documentation for the RAND_DRBG API
The RAND_DRBG API was added in PR #5462 and modified by PR #5547.
This commit adds the corresponding documention.
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5461)
FdaSilvaYY [Thu, 29 Mar 2018 18:59:58 +0000 (20:59 +0200)]
EVP,KDF: Add more error code along some return 0 in ...
methods :
- EVP_PBE_scrypt
- EVP_PKEY_meth_add0
- EVP_PKEY_meth_new
- EVP_PKEY_CTX_dup
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/5783)
Vitezslav Cizek [Tue, 9 Jan 2018 19:18:24 +0000 (20:18 +0100)]
BIO_s_accept.pod: add documentation for the new macros
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/5007)
Vitezslav Cizek [Tue, 9 Jan 2018 16:56:57 +0000 (17:56 +0100)]
Document BIO_{get,set}_conn_ip_family macros.
Add BIO_get_conn_ip_family and BIO_set_conn_ip_family macros to
util/private.num and document them in BIO_s_connect.pod.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/5007)
Vitezslav Cizek [Tue, 2 Jan 2018 13:43:18 +0000 (14:43 +0100)]
Update the BIO_s_connect documentation after the BIO refactoring.
The BIO was refactored in
417be660e1cd21a2ee085569ff98b0c4249b5416,
but the manual wasn't fully updated to reflect some of the changes.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/5007)
Benjamin Kaduk [Mon, 7 Aug 2017 14:55:48 +0000 (09:55 -0500)]
Document RAND_DRBG fork-safety locking model
Add some more exposition on why unlocked access to the global rand_fork_count
is safe, and provide a comment for the struct rand_drbg_st fork_count field.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/4110)
Andy Polyakov [Wed, 28 Mar 2018 08:07:32 +0000 (10:07 +0200)]
Configurations/10-main.conf: fix VC-noCE-common template.
picker() is type agnostic, but its output consumer is not. Or rather
it doesn't work if picker() picks nothing when consumer expects
array. So ensure array is returned when array is expected.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5770)
Andy Polyakov [Wed, 28 Mar 2018 08:06:32 +0000 (10:06 +0200)]
Configure: harmonize syntax.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5770)
Richard Levitte [Thu, 29 Mar 2018 08:34:11 +0000 (10:34 +0200)]
Fix setbuf use for VMS C
The VMS C RTL has setbuf() working for short pointers only, probably
the FILE pointer will always be in P0 (the lower 4GB). Fortunately,
this only generates a warning about possible data loss (doesn't apply
in this case) that we can simply turn off.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5789)
Richard Levitte [Wed, 28 Mar 2018 08:38:56 +0000 (10:38 +0200)]
.travis.yml: with fast fuzz testing, there is no point avoiding it
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5776)
Richard Levitte [Wed, 28 Mar 2018 13:46:28 +0000 (15:46 +0200)]
Faster fuzz test: teach the fuzz test programs to handle directories
Instead of invoking the fuzz test programs once for every corpora
file, we invoke them once for each directory of corpora files. This
dramatically reduces the number of program invikations, as well as the
time 99-test_fuzz.t takes to complete.
fuzz/test-corpus.c was enhanced to handle directories as well as
regular files.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5776)
Richard Levitte [Wed, 28 Mar 2018 12:46:27 +0000 (14:46 +0200)]
Revert "util/dofile.pl: only quote stuff that actually needs quoting"
This wasn't a good solution, too many things depend on the quotes being
there consistently.
This reverts commit
49cd47eaababc8c57871b929080fc1357e2ad7b8.
Fixes #5772
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5773)
Patrick Steuer [Wed, 28 Mar 2018 12:23:56 +0000 (13:23 +0100)]
crypto/e_aes.c: use S390X_AES_FC macro
... to compute s390x aes function code from keylength.
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5250)
Patrick Steuer [Wed, 28 Mar 2018 12:21:29 +0000 (13:21 +0100)]
crypto/evp/e_aes.c: add size_t casts to increase readability
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5250)
Patrick Steuer [Wed, 28 Mar 2018 12:09:24 +0000 (13:09 +0100)]
s390x assembly pack: add KMF code path for aes-cfb/cfb8
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5250)
Patrick Steuer [Wed, 28 Mar 2018 11:54:50 +0000 (12:54 +0100)]
s390x assembly pack: add KMO code path for aes-ofb
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5250)
Patrick Steuer [Wed, 28 Mar 2018 11:43:15 +0000 (12:43 +0100)]
s390x assembly pack: add KM code path for aes-ecb
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5250)
Rich Salz [Wed, 28 Mar 2018 19:34:16 +0000 (15:34 -0400)]
Rewrite the X509->alert mapping code
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5780)
Matt Caswell [Tue, 27 Mar 2018 16:31:56 +0000 (17:31 +0100)]
Remove some code
This commit removes the contribution of a user that we cannot trace to
gain their consent for the licence change.
After this commit the various IS_*() macros in the auto-generated file
conf_def.h may incorrectly return true if the supplied character has its
most significant bit set. The IS_*() macros should be able to correctly
handle 8-bit characters. Note that UTF-8 support is not a requirement.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5767)
Matt Caswell [Mon, 12 Mar 2018 17:15:25 +0000 (17:15 +0000)]
Tolerate a Certificate using a non-supported group on server side
If a server has been configured to use an ECDSA certificate, we should
allow it regardless of whether the server's own supported groups list
includes the certificate's group.
Fixes #2033
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5601)
Matt Caswell [Tue, 27 Mar 2018 21:37:19 +0000 (22:37 +0100)]
Revert "Temporarily disable some tests that hang"
This reverts commit
37a385956461ab526ecea2739a8a40364a8db259.
These tests should now be fixed by commit
e6e9170d6.
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/5765)
Rich Salz [Tue, 27 Mar 2018 20:25:08 +0000 (16:25 -0400)]
Allow NULL for some _free routines.
Based on the description in https://github.com/openssl/openssl/pull/5757,
this re-implements the "allow NULL to be passed" behavior of a number of
xxx_free routines. I also fixed up some egregious formatting errors
that were nearby.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5761)
Miroslav Suk [Thu, 22 Mar 2018 08:20:43 +0000 (09:20 +0100)]
o_time.c: use gmtime_s with MSVC
ts/ts_rsp_sign.c: change to OPENSSL_gmtime.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5720)
Konstantin Shemyak [Thu, 22 Mar 2018 17:53:59 +0000 (19:53 +0200)]
doc/man1/x509.pod: corrected "S/MIME signing" requirements
When the "certificate purpose" is checked and KeyUsage extension is present,
either 'digitalSignature' or 'nonRepudiation' is accepted.
Manual page corrected to reflect the above.
Signed-off-by: Konstantin Shemyak <konstantin@shemyak.com>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5727)
Philippe Antoine [Mon, 26 Mar 2018 08:29:56 +0000 (10:29 +0200)]
statem/statem_clnt.c: omit redundant check in tls_construct_client_hello.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5729)
Andy Polyakov [Fri, 23 Mar 2018 14:12:20 +0000 (15:12 +0100)]
rand/randfile.c: permit non-regular files in RAND_load_file.
Apparently applications rely on RAND_load_file's ability to work with
non-regular files, customarily with /dev/urandom, so that the ban was
not exactly appropriate.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5737)
Andy Polyakov [Mon, 26 Mar 2018 10:35:57 +0000 (12:35 +0200)]
Configure: make LIST command work with dynamic 15-android.conf.
This is quick-n-dirty ad-hoc solution, the problem asks for more
elegant one...
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5755)
Matt Caswell [Mon, 26 Mar 2018 22:36:37 +0000 (23:36 +0100)]
Temporarily disable some tests that hang
The previous commit causes some tests to hang so we temporarily disable them.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5757)
Matt Caswell [Mon, 26 Mar 2018 18:12:25 +0000 (19:12 +0100)]
Remove some code for a contributor that we cannot find
This removes some code because we cannot trace the original contributor
to get their agreement for the licence change (original commit
e03ddfae).
After this change there will be numerous failures in the test cases until
someone rewrites the missing code.
All *_free functions should accept a NULL parameter. After this change
the following *_free functions will fail if a NULL parameter is passed:
BIO_ACCEPT_free()
BIO_CONNECT_free()
BN_BLINDING_free()
BN_CTX_free()
BN_MONT_CTX_free()
BN_RECP_CTX_free()
BUF_MEM_free()
COMP_CTX_free()
ERR_STATE_free()
TXT_DB_free()
X509_STORE_free()
ssl3_free()
ssl_cert_free()
SSL_SESSION_free()
SSL_free()
[skip ci]
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5757)
Matt Caswell [Wed, 21 Mar 2018 20:19:37 +0000 (20:19 +0000)]
Assert that alpn_selected is NULL before we assign it
The alpn_selected value in the session should be NULL before we first
populate it if this is a new session. We assert to make sure it is.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5715)
Matt Caswell [Thu, 22 Mar 2018 14:33:05 +0000 (14:33 +0000)]
Don't write out a bad OID
If we don't have OID data for an object then we should fail if we
are asked to encode the ASN.1 for that OID.
Fixes #5723
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5725)
Matt Caswell [Tue, 27 Mar 2018 09:58:34 +0000 (10:58 +0100)]
Update CHANGES and NEWS for the new release
Reviewed-by: Richard Levitte <levitte@openssl.org>
Andy Polyakov [Mon, 26 Mar 2018 08:55:35 +0000 (10:55 +0200)]
test/test_test.c: add CRYPTO_memcmp regression test.
Reviewed-by: Matt Caswell <matt@openssl.org>
Andy Polyakov [Wed, 21 Mar 2018 22:48:10 +0000 (23:48 +0100)]
pariscid.pl: fix nasty typo in CRYPTO_memcmp.
Comparison was effectively reduced to least significant bits.
CVE-2018-0733
Reviewed-by: Matt Caswell <matt@openssl.org>
Matt Caswell [Fri, 26 Jan 2018 16:23:03 +0000 (16:23 +0000)]
Add fuzz corpora file that found the ASN.1 stack depth issue
Reviewed-by: Rich Salz <rsalz@openssl.org>
Matt Caswell [Thu, 22 Mar 2018 09:39:53 +0000 (09:39 +0000)]
Limit ASN.1 constructed types recursive definition depth
Constructed types with a recursive definition (such as can be found in
PKCS7) could eventually exceed the stack given malicious input with
excessive recursion. Therefore we limit the stack depth.
CVE-2018-0739
Credit to OSSFuzz for finding this issue.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Rich Salz [Mon, 26 Mar 2018 18:10:57 +0000 (14:10 -0400)]
Remove QNX support
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5756)
Andy Polyakov [Sun, 25 Mar 2018 14:51:55 +0000 (16:51 +0200)]
Configurations/README: mention Libs.private in ex_libs description.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Bernd Edlinger [Sun, 25 Mar 2018 12:00:33 +0000 (14:00 +0200)]
Previously this x509 command line was working, restore that
openssl x509 -in server.pem -signkey privkey.pem -out server.pem
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5746)
Bernd Edlinger [Sun, 25 Mar 2018 10:50:17 +0000 (12:50 +0200)]
Fix dsaparam -genkey with DER outform
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5744)
Bernd Edlinger [Sat, 24 Mar 2018 14:17:11 +0000 (15:17 +0100)]
Fix ecparam -genkey with point compression or DER outform
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5741)
Philippe Antoine [Fri, 23 Mar 2018 19:51:38 +0000 (20:51 +0100)]
Adds multiple checks to avoid buffer over reads
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5675)
Andy Polyakov [Thu, 22 Mar 2018 21:55:35 +0000 (22:55 +0100)]
Configurations/windows-makefile.tmpl: refine clean targets.
'nmake clean' was leaving some artefacts behind.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Richard Levitte [Fri, 23 Mar 2018 13:18:16 +0000 (14:18 +0100)]
test/shlibloadtest.c: make some variables block local
myDSO_dsobyaddr and myDSO_free are only used in a narrow block of
code, and can therefore be made local to that block. Otherwise, some
compilers may warn that they are unused.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5733)
Richard Levitte [Fri, 23 Mar 2018 00:05:41 +0000 (01:05 +0100)]
test/shlibloadtest.c: fix various errors
These errors were hidden because compiling this file didn't get the
macros derived from the dso_scheme attribute, and therefore, some code
never got compiled.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5733)
Richard Levitte [Fri, 23 Mar 2018 00:05:23 +0000 (01:05 +0100)]
Include "internal/dso_conf.h" where needed and appropriate
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5733)
Richard Levitte [Fri, 23 Mar 2018 00:02:08 +0000 (01:02 +0100)]
Move the handling of dso_scheme to dso_conf.h
The macros resulting from the dso_scheme attribute were defined for
libraries only, but there's a test program that uses the macros as
well. The easier way is to move the handling of this macro to
crypto/include/internal/dso_conf.h and having the modules that need it
include it.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5733)
Richard Levitte [Thu, 22 Mar 2018 21:15:04 +0000 (22:15 +0100)]
Configurations/unix-Makefile.tmpl: fix inconsistencies with resource files
.res files weren't treated consistently. They weren't included at all
in the build of a shared library, and were named inconsistently; .res
sometimes, and .res.o otherwise. Now we standardise it to .res.o,
which is the recommended way with GNU tools.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5730)
Andy Polyakov [Wed, 21 Mar 2018 19:04:49 +0000 (20:04 +0100)]
Configurations/10-main.conf: correct AIX targets.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5713)
Bernd Edlinger [Thu, 22 Mar 2018 16:28:39 +0000 (17:28 +0100)]
Handle partial messages in TLSProxy
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5412)
Rich Salz [Thu, 22 Mar 2018 14:21:33 +0000 (10:21 -0400)]
Fix resource files
Add it to apps as well as libraries.
Fix the copyright year generation.
Thanks to user RTT for pointing this out.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5704)
Andy Polyakov [Wed, 21 Mar 2018 12:12:15 +0000 (13:12 +0100)]
include/openssl/rand.h: omit intermediate typedef.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4159)
Andy Polyakov [Mon, 14 Aug 2017 19:38:23 +0000 (21:38 +0200)]
openssl/rand.h: fix formatting.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4159)
Andy Polyakov [Wed, 21 Mar 2018 15:34:11 +0000 (16:34 +0100)]
Remove presumably temporary left-over file.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Andy Polyakov [Wed, 21 Mar 2018 15:20:59 +0000 (16:20 +0100)]
man3/OPENSSL_ia32cap.pod: update assembler version requirements.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Andy Polyakov [Wed, 21 Mar 2018 10:19:58 +0000 (11:19 +0100)]
curve448/field.h: relax alignment, as it doesn't work universally.
Some platforms, cough-DJGPP, fail to compile claiming that requested
alignment is greater than maximum possible. Supposedly original
alignment was result of an attempt to utilize AVX2...
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5708)
Andy Polyakov [Wed, 21 Mar 2018 10:19:49 +0000 (11:19 +0100)]
bio/bss_log.c: on DJGPP syslog facility is part of sockets library.
In other words no-sock DJGPP build should suppress syslogging.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5708)
Andy Polyakov [Wed, 21 Mar 2018 10:16:50 +0000 (11:16 +0100)]
o_fopen.c: compensate for e_os.h omission.
At earlier point e_os.h was omitted from a number of headers (in order
to emphasize OS neutrality), but this affected o_fopen.c, which is not
OS-neutral, and contains some DJGPP-specific code.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5708)
Pauli [Mon, 19 Mar 2018 21:17:32 +0000 (07:17 +1000)]
Don't call strsignal, just print the signal number.
The strsignal call is not supported by some machines, so avoid its use.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5658)
Patrick Steuer [Sat, 10 Mar 2018 18:06:43 +0000 (19:06 +0100)]
aes ctr_drbg: add cavs tests
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #5580
Kurt Roeckx [Sat, 10 Mar 2018 11:23:21 +0000 (12:23 +0100)]
DRBG: Use the EVP layer to do AES encryption
Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #5580