Matt Caswell [Thu, 28 Sep 2017 12:24:58 +0000 (13:24 +0100)]
Fix the SSL_stateless() return code
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4435)
Matt Caswell [Thu, 28 Sep 2017 12:23:49 +0000 (13:23 +0100)]
Fix interaction between SSL_stateless() and SSL_clear()
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4435)
Matt Caswell [Wed, 27 Sep 2017 08:46:38 +0000 (09:46 +0100)]
Add some tests for the SSL_stateless() capability
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4435)
Matt Caswell [Wed, 13 Sep 2017 13:50:49 +0000 (14:50 +0100)]
Fix logic around when to send an HRR based on cookies
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4435)
Matt Caswell [Wed, 13 Sep 2017 12:48:48 +0000 (13:48 +0100)]
Add the SSL_stateless() function
This enables sending and receiving of the TLSv1.3 cookie on the server side
as appropriate.
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4435)
Matt Caswell [Tue, 12 Sep 2017 15:19:09 +0000 (16:19 +0100)]
Enable the cookie callbacks to work even in TLS in the apps
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4435)
Matt Caswell [Mon, 11 Sep 2017 14:43:56 +0000 (15:43 +0100)]
Add support for sending TLSv1.3 cookies
This just adds the various extension functions. More changes will be
required to actually use them.
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4435)
Richard Levitte [Tue, 23 Jan 2018 18:16:29 +0000 (19:16 +0100)]
Small cleanup of some build.info files
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5153)
Richard Levitte [Tue, 23 Jan 2018 18:13:48 +0000 (19:13 +0100)]
Configure: ensure that a DEPEND generates the correct inclusion directory
We incorrectly assumed that explicit dependencies meant that the
source directory would be added for inclusion. However, if the
dependent file is generated, it's stored in the build directory, and
that should be used for inclusion rather than the source directory.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5153)
Richard Levitte [Tue, 23 Jan 2018 18:07:14 +0000 (19:07 +0100)]
Configure: let INCLUDEs set on binaries "trickle down" to the objects
This ensures that only one set of includes is associated with each
object file, reagardless of where it's used.
For example, if apps/build.info has this:
SOURCE[openssl]=foo.c
INCLUDE[openssl]=.. ../include
and test/build.info has this:
SOURCE[footest]=../apps/foo.c
INCLUDE[footest]=../include
The inclusion directories used for apps/foo.o would differ depending
on which program's dependencies get generated first in the build file.
With this change, all those INCLUDEs get combined into one set of
inclusion directories tied to the object file.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5153)
Pauli [Wed, 17 Jan 2018 03:20:22 +0000 (13:20 +1000)]
SHA512/224 and SHA512/256
Support added for these two digests, available only via the EVP interface.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5093)
Richard Levitte [Mon, 22 Jan 2018 18:03:37 +0000 (19:03 +0100)]
Have EVP_PKEY_asn1_find_str() work more like EVP_PKEY_asn1_find()
EVP_PKEY_asn1_find_str() would search through standard asn1 methods
first, then those added by the application, which EVP_PKEY_asn1_find()
worked the other way around. Also, EVP_PKEY_asn1_find_str() didn't
handle aliases.
This change brings EVP_PKEY_asn1_find_str() closer to EVP_PKEY_asn1_find().
Fixes #5086
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5137)
Richard Levitte [Mon, 22 Jan 2018 17:24:55 +0000 (18:24 +0100)]
Revert "EVP_PKEY_asn1_add0(): Check that this method isn't already registered"
This reverts commit
d85722d31ac9ff0dc54c06cdc8d125acf56ca27a.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5137)
Benjamin Kaduk [Tue, 23 Jan 2018 13:31:36 +0000 (07:31 -0600)]
Fix no-ec --strict-warnings builds
The 'loop' variable is only used if EC is available.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5149)
Rich Salz [Mon, 22 Jan 2018 19:41:09 +0000 (14:41 -0500)]
Improve some BN documentation.
Thanks to Nicolas Schodet for pointing this out.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5141)
Richard Levitte [Mon, 22 Jan 2018 15:53:23 +0000 (16:53 +0100)]
Don't add $(EX_LIBS) to libssl.pc's Libs.private
Since libssl requires libcrypto and libcrypto.pc already has
Libs.private set exactly the same, there's no reason to repeat it in
libssl.pc.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5134)
Richard Levitte [Mon, 22 Jan 2018 15:50:54 +0000 (16:50 +0100)]
Add anything specifying a threads library to ex_libs
Even -pthread gets treated that way. The reason to do this is so it
ends up in 'Libs.private' in libcrypto.pc.
Fixes #3884
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5134)
Richard Levitte [Mon, 22 Jan 2018 21:02:36 +0000 (22:02 +0100)]
When building shared libraries, only ln -s when simple and full name differ
Fixes #5143
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5144)
Rich Salz [Mon, 22 Jan 2018 19:33:22 +0000 (14:33 -0500)]
Move fprintf after assignment to avoid crash.
Thanks to David Vernet for reporting this.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5140)
Richard Levitte [Mon, 22 Jan 2018 16:51:51 +0000 (17:51 +0100)]
test/ossl_shim/packeted_bio.h: don't include e_os.h
That inclusion turned out to be completely unnecessary
[extended tests]
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5136)
Rich Salz [Thu, 5 Oct 2017 23:52:12 +0000 (00:52 +0100)]
Add accessors for AdmissionSyntax
Based on code from Matthias Ballreich, Steve Henson, and Wolf Tobias.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4724)
Richard Levitte [Mon, 22 Jan 2018 10:00:59 +0000 (11:00 +0100)]
Reduce the use of e_os.h in test programs
This includes unnecessary use of the top as inclusion directory
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5132)
Matt Caswell [Wed, 17 Jan 2018 10:33:18 +0000 (10:33 +0000)]
Don't attempt to use X25519 for ECDSA in speed
Fixes #5090
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/5097)
Matt Caswell [Fri, 19 Jan 2018 14:48:45 +0000 (14:48 +0000)]
Don't crash on a missing Subject in index.txt
An index.txt entry which has an empty Subject name field will cause ca
to crash. Therefore check it when we load it to make sure its not empty.
Fixes #5109
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5114)
Matt Caswell [Fri, 19 Jan 2018 14:34:56 +0000 (14:34 +0000)]
Don't allow an empty Subject when creating a Certificate
Misconfiguration (e.g. an empty policy section in the config file) can
lead to an empty Subject. Since certificates should have unique Subjects
this should not be allowed.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5114)
Bernd Edlinger [Fri, 19 Jan 2018 13:00:14 +0000 (14:00 +0100)]
Add a configure option to opt-out secure memory
./config -DOPENSSL_NO_SECURE_MEMORY
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5113)
Richard Levitte [Sat, 20 Jan 2018 09:02:23 +0000 (10:02 +0100)]
Update the license end year
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5121)
Richard Levitte [Wed, 17 Jan 2018 09:39:28 +0000 (10:39 +0100)]
Enable TLSProxy tests on Windows
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5094)
Benjamin Kaduk [Tue, 9 Jan 2018 21:26:37 +0000 (15:26 -0600)]
enc(1): document that AEAD is not and will not be supported
Note the reasons, including streaming output issues and key/iv/nonce
management issues.
Recommend the use of cms(1) instead.
Fixes #471.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/5048)
Richard Levitte [Fri, 19 Jan 2018 09:49:22 +0000 (10:49 +0100)]
Copyright update of more files that have changed this year
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/5110)
Bernd Edlinger [Fri, 19 Jan 2018 07:24:29 +0000 (08:24 +0100)]
Set OPENSSL_ENGINES for Windows
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5108)
Richard Levitte [Wed, 17 Jan 2018 10:22:47 +0000 (11:22 +0100)]
Create one permanent proxy socket per TLSProxy::Proxy instance
On Windows, we sometimes see a behavior with SO_REUSEADDR where there
remains lingering listening sockets on the same address and port as a
newly created one.
To avoid this scenario, we don't create a new proxy port for each new
client run. Instead, we create one proxy socket when the proxy object
is created, and close it when destroying that object.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5095)
Richard Levitte [Thu, 18 Jan 2018 13:05:33 +0000 (14:05 +0100)]
Only implement secure malloc if _POSIX_VERSION allows
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5060)
Richard Levitte [Mon, 15 Jan 2018 18:05:01 +0000 (19:05 +0100)]
The Cygwin gcc doesn't define _WIN32, don't pretend it does
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5060)
Richard Levitte [Mon, 15 Jan 2018 18:04:17 +0000 (19:04 +0100)]
Simplify Cygwin checks, part 1
Because OPENSSL_SYS_CYGWIN will keep OPENSSL_SYS_UNIX defined, there's
no point having checks of this form:
#if (defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_CYGWIN))
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5060)
Richard Levitte [Thu, 11 Jan 2018 21:01:44 +0000 (22:01 +0100)]
Cygwin is POSIX, don't say it isn't
More to the point, Cygwin is a POSIX API. In our library, the use of
a POSIX API is marked by defining the macro OPENSSL_SYS_UNIX.
Therefore, that macro shouldn't be undefined when building for Cygwin.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5060)
Richard Levitte [Thu, 18 Jan 2018 09:54:48 +0000 (10:54 +0100)]
TLSProxy::Proxy: Don't use ReuseAddr on Windows
On Windows, we sometimes see a behavior with SO_REUSEADDR where there
remains lingering listening sockets on the same address and port as a
newly created one.
An easy solution is not to use ReuseAddr on Windows.
Thanks Bernd Edlinger for the suggestion.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5103)
Jakub Jelen [Thu, 18 Jan 2018 00:23:37 +0000 (19:23 -0500)]
doc: Bad prototypes of EVP_PKEY_CTX_new()
CLA: trivial
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4861)
Richard Levitte [Wed, 17 Jan 2018 20:27:33 +0000 (21:27 +0100)]
TLSProxy::Proxy: don't waste time redirecting STDOUT and STDERR
On Windows, it seems that doing so in a forked (pseudo-)process
sometimes affects the parent, and thereby hides all the results that
are supposed to be seen by the running test framework (the "ok" and
"not ok" lines).
It turns out that our redirection isn't necessary, as the test
framework seems to swallow it all in non-verbose mode anyway.
It's possible that we did need this at some point, but the framework
has undergone some refinement since then...
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5100)
Richard Levitte [Tue, 16 Jan 2018 18:50:10 +0000 (19:50 +0100)]
TLSProxy::Proxy: If we don't support IPv6, force IPv4
We use the first we can of the following IO::Socket modules to create
sockets:
- IO::Socket::INET6
- IO::Socket::IP
- IO::Socket::INET
The last of them doesn't support IPv6, so if that's the one available,
we must force the s_client and s_server processes to use IPv4.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5092)
Paul Yang [Mon, 15 Jan 2018 17:01:46 +0000 (01:01 +0800)]
Update all affected files' copyright year to 2018
Because the related PR/commits are merged in 2018...
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4976)
Paul Yang [Tue, 2 Jan 2018 17:07:57 +0000 (01:07 +0800)]
Enforce return values section check
To avoid check failure, make dummy RETURN VALUES sections in the docs
which have no real functions decribed inside...
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4976)
Paul Yang [Mon, 25 Dec 2017 09:50:39 +0000 (17:50 +0800)]
Add missing 'RETURN VALUES' sections in doc
All missing sections are added.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4976)
Matt Caswell [Tue, 16 Jan 2018 15:04:51 +0000 (15:04 +0000)]
Extend timeout for TLSProxy
I received this error from a TLSProxy test:
Failed to start up server (localhost,4443): Transport endpoint is not
connected
So, extend the timeout before we give up trying to connect to the server.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5088)
Matt Caswell [Mon, 15 Jan 2018 11:23:07 +0000 (11:23 +0000)]
Revert BN_copy() flag copy semantics change
Commit
9f9442918a changed the semantics of BN_copy() to additionally
copy the BN_FLG_CONSTTIME flag if it is set. This turns out to be
ill advised as it has unintended consequences. For example calling
BN_mod_inverse_no_branch() can sometimes return a result with the flag
set and sometimes not as a result. This can lead to later failures if we
go down code branches that do not support constant time, but check for
the presence of the flag.
The original commit was made due to an issue in BN_MOD_CTX_set(). The
original PR fixed the problem in that function, but it was changed in
review to fix it in BN_copy() instead. The solution seems to be to revert
the BN_copy() change and go back to the originally proposed way.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/5080)
Dr. Matthias St. Pierre [Tue, 16 Jan 2018 07:03:37 +0000 (08:03 +0100)]
Fix memory leak in do_rand_drbg_init()
Fixes #5076
Since do_rand_drbg_init() allocates three locks, it needs to ensure
that OPENSSL_init_crypto() is called, otherwise these resources are
not cleaned up properly.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/5083)
Richard Levitte [Mon, 15 Jan 2018 09:40:24 +0000 (10:40 +0100)]
Fix intermittent Windows and Cygwin failures in s_server
The same kind of failure that has already been observed on the
s_client can sometimes also be observed on s_server, so we need to add
the same kind of 50ms delay as was previously added on s_client.
Ref: git commit
cb2e10f257a464c6b475b321dd9e4769df84dbf6:
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5079)
Richard Levitte [Sun, 14 Jan 2018 21:39:20 +0000 (22:39 +0100)]
Fix Windows build file template to recognise .res files
Only when building the main shared libraries
Fixes #5075
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5077)
Richard Levitte [Sun, 14 Jan 2018 16:15:32 +0000 (17:15 +0100)]
Fix intermittent Cygwin failures in s_client
This was identified for Windows almost two years ago for VC and
msys/mingw. It seems that Cygwin suffers from the same issue, and
since Cygwin doesn't define OPENSSL_SYS_WINDOWS, we need to make a
special case to have a 50ms pause before closing the TLS connection.
Ref: git commit
cb2e10f257a464c6b475b321dd9e4769df84dbf6
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5074)
Bernd Edlinger [Sun, 14 Jan 2018 17:17:59 +0000 (18:17 +0100)]
Use constant value 1 instead of SHUT_WR in do_server
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5072)
Bernd Edlinger [Sat, 13 Jan 2018 17:41:08 +0000 (18:41 +0100)]
Explicitly shut the socket down in s_client
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5072)
Bernd Edlinger [Sat, 13 Jan 2018 09:24:45 +0000 (10:24 +0100)]
Catch SIGPIPE in TLSProxy::Proxy::clientstart
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5071)
Pauli [Fri, 12 Jan 2018 03:37:39 +0000 (13:37 +1000)]
Change the name of the SEC typedef to openssl_speed_sec_t.
This to avoid a clash with a #defined symbol on Solaris from time.h.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5064)
Patrick Schlangen [Wed, 10 Jan 2018 17:06:35 +0000 (12:06 -0500)]
Make data argument const in SSL_dane_tlsa_add
The data argument of SSL_dane_tlsa_add is used read-only, so it
should be const.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5056)
Dr. Matthias St. Pierre [Tue, 9 Jan 2018 15:09:14 +0000 (16:09 +0100)]
Enhance util/openssl-update-copyright shell script
- Avoid creating repeated year ranges <current_year>-<current_year> for
documents which were added in the current year.
- Use extended regular expressions for better readability (less quoting)
- Use a shebang line which is more portable
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5044)
Matt Caswell [Fri, 5 Jan 2018 10:12:29 +0000 (10:12 +0000)]
Tolerate DTLS alerts with an incorrect version number
In the case of a protocol version alert being sent by a peer the record
version number may not be what we are expecting. In DTLS records with an
unexpected version number are silently discarded. This probably isn't
appropriate for alerts, so we tolerate a mismatch in the minor version
number.
This resolves an issue reported on openssl-users where an OpenSSL server
chose DTLS1.0 but the client was DTLS1.2 only and sent a protocol_version
alert with a 1.2 record number. This was silently ignored by the server.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5018)
Richard Levitte [Tue, 9 Jan 2018 18:51:19 +0000 (19:51 +0100)]
Configure: try to make sure every config target name is unique
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5047)
Todd Short [Tue, 9 Jan 2018 15:46:44 +0000 (10:46 -0500)]
Fix --strict-warnings with C90
Found with gcc 4.8.4
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5045)
Richard Levitte [Tue, 9 Jan 2018 04:49:01 +0000 (05:49 +0100)]
Update copyright years on all files merged since Jan 1st 2018
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5038)
David von Oheimb [Mon, 8 Jan 2018 13:13:51 +0000 (14:13 +0100)]
Various small build improvements on mkdef.pl, progs.pl, crypto/init.c, crypto/mem.c
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4994)
Christian Heimes [Mon, 11 Dec 2017 06:00:29 +0000 (07:00 +0100)]
Document SSL_OP_NO_RENEGOTIATION as new in 1.1.1
Closes: https://github.com/openssl/openssl/issues/4897
Signed-off-by: Christian Heimes <christian@python.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4898)
Tomas Mraz [Mon, 11 Dec 2017 12:09:13 +0000 (13:09 +0100)]
Avoid only exact duplicates when creating the accepted CA names list
This avoids situations where third party client is unable to recognize
that the client certificate was issued by the same CA with name differring
only by case or insignificant characters.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4731)
Patrick Steuer [Mon, 8 Jan 2018 18:42:32 +0000 (13:42 -0500)]
Document OPENSSL_ENGINES environment variable
In man1/engine.pod and man3/ENGINE_add.pod
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/4956)
Patrick Steuer [Mon, 18 Dec 2017 21:47:01 +0000 (22:47 +0100)]
crypto/engine/eng_list.c: compare getenv rv to NULL instead of 0
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4958)
Jacob Hoffman-Andrews [Sat, 23 Dec 2017 00:18:22 +0000 (16:18 -0800)]
Clarify error for unrecognized arguments.
Many of the sub-commands under apps/ accept cipher or digest arguments like
"-sha256". These are implemented using a catchall flag that runs the result
through opt_md() or opt_cipher(). That means any unrecognized flag, including
typos, gets sent to those two functions, producing confusing error messages like
below:
$ ./apps/openssl req -x590
req: Unrecognized digest x590
req: Use -help for summary.
This change switches these two functions to say "Unrecognized flag X" instead.
The new message deliberately leaves off the "-" from the flag name, because
there are some cases where opt_md() and opt_cipher() are passed a flag value
instead (for instance, openssl ca -md). I think the new message is generic
enough that it can serve both cases with improved clarity.
CLA: trivial
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4972)
EasySec [Sat, 30 Dec 2017 17:48:23 +0000 (18:48 +0100)]
fix compile error 'intrinsic function not declared'
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/5000)
pass86 [Sun, 7 Jan 2018 13:57:25 +0000 (21:57 +0800)]
Fix spelling: adroideabi -> androideabi
CLA: trivial
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/5029)
Noah Robbin [Wed, 29 Nov 2017 21:58:25 +0000 (16:58 -0500)]
Use the index that matches the key type (either SSL_PKEY_RSA_PSS_SIGN or SSL_PKEY_RSA).
Extract the RSA key using EVP_PKEY_get0. Type is checked externally to be either EVP_PKEY_RSA_PSS or EVP_PKEY_RSA.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4389)
Noah Robbin [Tue, 19 Sep 2017 16:15:42 +0000 (12:15 -0400)]
Use size of server key when selecting signature algorithm.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4389)
Dmitry Belyavskiy [Mon, 8 Jan 2018 12:32:47 +0000 (15:32 +0300)]
NUMERICSTRING support
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5036)
Dr. Matthias St. Pierre [Sun, 7 Jan 2018 01:29:01 +0000 (02:29 +0100)]
Add util/openssl-update-copyright shell script
usage: openssl-update-copyright [-h|--help] [file|directory] ...
Updates the year ranges of all OpenSSL copyright statements in the given
files or directories. (Directories are traversed recursively.)
Only copyright statements containing the string 'The OpenSSL Project' are
affected. The copyright time range is adjusted to include the current year.
If only a single year was specified, it is replaced by a time range starting
at that year and ending at the current year. All '(c)' and '(C)' signs are
preserved.
Signed-off-by: Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5027)
Richard Levitte [Mon, 8 Jan 2018 11:28:08 +0000 (12:28 +0100)]
Separate general linking flags from extra libraries
So far, we've placed all extra library related flags together, ending
up in the make variable EX_LIBS. This turns out to be problematic, as
for example, some compilers don't quite agree with something like
this:
cc -o foo foo.o -L/whatever -lsomething
They prefer this:
cc -L/whatever -o foo foo.o -lsomething
IBM's compiler on OS/390 is such a compiler that we know of, and we
have previously handled that as a previous case.
The answer here is to make a more general solution, where linking
options are divided in two parts, where one ends up in LDFLAGS and
the other in EX_LIBS (they corresponds to what is called LDFLAGS and
LDLIBS in the GNU world)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5033)
Richard Levitte [Mon, 8 Jan 2018 11:40:06 +0000 (12:40 +0100)]
Clean up uClinux targets
The uClinux targets included some attributes that would result in
circular references of CFLAGS and LDCLAGS.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5034)
Rich Salz [Sun, 7 Jan 2018 20:58:52 +0000 (15:58 -0500)]
Fix IPv6 define
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5030)
Richard Levitte [Sun, 7 Jan 2018 21:36:12 +0000 (22:36 +0100)]
CHANGES: Document the removal of OS390-Unix
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5031)
Patrick Steuer [Mon, 2 Oct 2017 13:53:00 +0000 (15:53 +0200)]
s390x assembly pack: add KMA code path for aes-gcm.
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4634)
Patrick Steuer [Tue, 24 Oct 2017 11:29:40 +0000 (13:29 +0200)]
crypto/aes/asm/aes-s390x.pl: replace decrypt flag by macro.
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4634)
Patrick Steuer [Tue, 14 Feb 2017 01:07:37 +0000 (02:07 +0100)]
s390x assembly pack: add KMA code path for aes-ctr.
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4634)
Andy Polyakov [Sun, 31 Dec 2017 12:23:08 +0000 (13:23 +0100)]
ec/curve25519.c: avoid 2^51 radix on SPARC.
SPARC ISA doesn't have provisions to back up 128-bit multiplications
and additions. And so multiplications are done with library calls
and carries with comparisons and conditional moves. As result base
2^51 code is >40% slower...
Reviewed-by: Tim Hudson <tjh@openssl.org>
Andy Polyakov [Sat, 30 Dec 2017 19:15:44 +0000 (20:15 +0100)]
ec/ecp_nistz256.c: switch to faster addition chain in scalar inversion.
[and improve formatting]
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5001)
Andy Polyakov [Sat, 30 Dec 2017 14:11:25 +0000 (15:11 +0100)]
ec/asm/ecp_nistz256-armv8.pl: add optimized inversion.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5001)
Andy Polyakov [Sat, 30 Dec 2017 14:51:55 +0000 (15:51 +0100)]
ec/asm/ecp_nistz256-x86_64.pl: add .cfi and SEH handlers to new functions.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5001)
Andy Polyakov [Sat, 30 Dec 2017 14:08:31 +0000 (15:08 +0100)]
ec/ecp_nistz256.c: improve ECDSA sign by 30-40%.
This is based on RT#3810, which added dedicated modular inversion.
ECDSA verify results improves as well, but not as much.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5001)
Rich Salz [Sat, 6 Jan 2018 16:49:53 +0000 (11:49 -0500)]
Remove remaining NETWARE ifdef's
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5028)
Rich Salz [Sat, 4 Nov 2017 14:40:49 +0000 (10:40 -0400)]
Add fingerprint text, remove MD5
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4906)
Richard Levitte [Sun, 31 Dec 2017 07:44:26 +0000 (08:44 +0100)]
Add the possibility to do 'openssl help [command]'
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5002)
Richard Levitte [Sun, 31 Dec 2017 07:44:12 +0000 (08:44 +0100)]
apps: make sure prog_init only calculates once
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5002)
Konstantin Shemyak [Thu, 28 Dec 2017 21:12:59 +0000 (23:12 +0200)]
Corrected 'cms' exit status when key or certificate cannot be opened
Fixes #4996.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4997)
Bernd Edlinger [Sat, 6 Jan 2018 14:21:46 +0000 (15:21 +0100)]
Fix error handling in X509_REQ_print_ex
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5025)
Bernd Edlinger [Fri, 5 Jan 2018 17:50:09 +0000 (18:50 +0100)]
Stop using unimplemented cipher classes.
Add comments to no longer usable ciphers.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5023)
Viktor Dukhovni [Wed, 13 Dec 2017 15:55:38 +0000 (10:55 -0500)]
Add x509(1) reference
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Rich Salz [Thu, 4 Jan 2018 18:02:37 +0000 (13:02 -0500)]
Remove old config that used non-exist util script
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5016)
Rich Salz [Wed, 3 Jan 2018 18:12:20 +0000 (13:12 -0500)]
Rewrite RT3513.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5011)
Dr. Matthias St. Pierre [Wed, 3 Jan 2018 21:14:02 +0000 (22:14 +0100)]
Improve readability of evp.pod
The changes are analogous to the ones made in commit
0bf340e1350e
to x509.pod, see PR #4924.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/5012)
Dr. Matthias St. Pierre [Thu, 28 Dec 2017 20:42:14 +0000 (21:42 +0100)]
crypto/rand: restore the generic DRBG implementation
The DRGB concept described in NIST SP 800-90A provides for having different
algorithms to generate random output. In fact, the FIPS object module used to
implement three of them, CTR DRBG, HASH DRBG and HMAC DRBG.
When the FIPS code was ported to master in #4019, two of the three algorithms
were dropped, and together with those the entire code that made RAND_DRBG
generic was removed, since only one concrete implementation was left.
This commit restores the original generic implementation of the DRBG, making it
possible again to add additional implementations using different algorithms
(like RAND_DRBG_CHACHA20) in the future.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4998)
Dr. Matthias St. Pierre [Thu, 28 Dec 2017 01:18:21 +0000 (02:18 +0100)]
crypto/rand: rename drbg_rand.c to drbg_ctr.c
The generic part of the FIPS DRBG was implemented in fips_drbg_lib.c and the
algorithm specific parts in fips_drbg_<alg>.c for <alg> in {ctr, hash, hmac}.
Additionally, there was the module fips_drbg_rand.c which contained 'gluing'
code between the RAND_METHOD api and the FIPS DRBG.
When the FIPS code was ported to master in #4019, for some reason the ctr-drbg
implementation from fips_drbg_ctr.c ended up in drbg_rand.c instead of drbg_ctr.c.
This commit renames the module drbg_rand.c back to drbg_ctr.c, thereby restoring
a simple relationship between the original fips modules and the drbg modules
in master:
fips_drbg_lib.c => drbg_lib.c /* generic part of implementation */
fips_drbg_<alg>.c => drbg_<alg>.c /* algorithm specific implementations */
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4998)
Benjamin Kaduk [Wed, 4 Oct 2017 17:09:16 +0000 (12:09 -0500)]
Test that supported_groups is permitted in ServerHello
Add a regression test for the functionality enabled in the
previous commit.
[extended tests]
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4463)
Benjamin Kaduk [Wed, 4 Oct 2017 16:02:23 +0000 (11:02 -0500)]
Permit the "supported_groups" extension in ServerHellos
Although this is forbidden by all three(!) relevant specifications,
there seem to be multiple server implementations in the wild that
send it. Since we didn't check for unexpected extensions in any
given message type until TLS 1.3 support was added, our previous
behavior was to silently accept these extensions and pass them over
to the custom extension callback (if any). In order to avoid
regression of functionality, relax the check for "extension in
unexpected context" for this specific case, but leave the protocol
enforcment mechanism unchanged for other extensions and in other
extension contexts.
Leave a detailed comment to indicate what is going on.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4463)
Matt Caswell [Tue, 2 Jan 2018 15:51:23 +0000 (15:51 +0000)]
Fix trace of TLSv1.3 Certificate Request message
A TLSv1.3 Certificate Request message was issuing a "Message length parse
error" using the -trace option to s_server/s_client.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/5008)
Daniel Bevenius [Fri, 29 Dec 2017 06:07:15 +0000 (07:07 +0100)]
Fix minor 'the the' typos
Similar to commit
17b602802114d53017ff7894319498934a580b17(
"Remove extra `the` in SSL_SESSION_set1_id.pod"), this commit removes
typos where additional 'the' have been added.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4999)