Commit graph

12058 commits

Author SHA1 Message Date
Billy Brumley
2b80d00e3a RT3863 ECC: Add missing NULL check. Set a flag
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit dd67493c34)
2016-01-21 14:14:33 +00:00
Rich Salz
78a140ecb3 GH issue 572: Error in help message
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-20 18:52:18 -05:00
Matt Caswell
f73c737c7a Handle SSL_shutdown while in init more appropriately
Calling SSL_shutdown while in init previously gave a "1" response, meaning
everything was successfully closed down (even though it wasn't). Better is
to send our close_notify, but fail when trying to receive one.

The problem with doing a shutdown while in the middle of a handshake is
that once our close_notify is sent we shouldn't really do anything else
(including process handshake/CCS messages) until we've received a
close_notify back from the peer. However the peer might send a CCS before
acting on our close_notify - so we won't be able to read it because we're
not acting on CCS messages!

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-20 13:55:36 +00:00
Richard Levitte
930d87c1e1 Fix BSD -rpath parameter
For BSD systems, Configure adds a shared_ldflags including a reference
to the Makefile variable LIBRPATH, but since it must be passed down to
Makefile.shared, care must be taken so the value of LIBRPATH doesn't
get expanded too early, or it ends up giving an empty string.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(cherry picked from commit c64879d3f3)
2016-01-19 20:59:26 +01:00
Alessandro Ghedini
607e77300e Validate ClientHello session_id field length and send alert on failure
RT#4080

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-01-19 15:37:16 +00:00
Prayag Verma
0555901cb4 Update license year range to 2016
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 02f7037247)
2016-01-19 10:24:35 -05:00
Kristian Amlie
7934ce27cd Don't use "grep -q", "-q" is not POSIX, and fails on Solaris.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-18 16:20:51 +01:00
Viktor Dukhovni
4d6fe78f65 Empty SNI names are not valid
While empty inputs to SSL_set1_host() clear the reference identifier
list.

(cherry-picked from 1.1.0-dev)

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-17 16:58:48 -05:00
Zi Lin
15debc128a NGX-2040 - fix wildcard match on punycode/IDNA DNS names
- bugfix: should not treat '--' as invalid domain substring.
    - '-' should not be the first letter of a domain

Signed-off-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-15 14:48:17 -05:00
Dr. Stephen Henson
e254d12c43 To avoid possible time_t overflow use X509_time_adj_ex()
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(cherry picked from commit 9aa00b187a)

Conflicts:
	apps/x509.c
2016-01-14 03:02:27 +00:00
Mouse
8788fb97a8 Root cause discovered and fixed, this fix became unnecessary
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-13 01:23:34 +01:00
Uri Blumenthal
6fa6a66285 Changed help output
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-13 01:23:34 +01:00
Mouse
a2a29f702a Pass engine=NULL to EVP_PKEY_CTX_new(), unless "-engine_impl" was given
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-13 01:23:34 +01:00
Mouse
8259ccb44d Remove unnecessary debugging fprintf
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-13 01:23:34 +01:00
Mouse
ad81ca9061 Fixed crash (SIGSEGV) when freeing of ex_data stumbles upon a NULL-pointer.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-13 01:23:34 +01:00
Mouse
d65a8d0b7e Fixed a bug preventing pkeyutl from accessing keys directly on the token via engine_pkcs11
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-13 01:23:34 +01:00
arijitnayak
75fdee0482 Wrong definition of the macro SSL_set1_sigalgs in ssl.h
Error in the definition of the macro SSL_set1_sigalgs(ctx, slist,
slistlen): the third parameter 'slistlen' not used in the substitution
code; used 'clistlen' instead. As a result of this, compilation error
occurs when any application uses this macro.

Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-01-12 12:53:27 -05:00
Kurt Roeckx
a4530ce039 Change minimum DH size from 768 to 1024
Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org>
2016-01-11 00:01:52 +01:00
Kurt Roeckx
cb19c0d15f File is about s_time, not s_client
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit 1918e01c9f)
2016-01-10 13:14:19 +01:00
Viktor Dukhovni
a3d74afcae Fix X509_STORE_CTX_cleanup()
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-02 11:14:05 -05:00
Rich Salz
4d9c6fa01b RT4202: Update rt URL's.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 41977c53cd)
2015-12-28 16:41:10 -05:00
Matt Caswell
c52c3b5e11 Add some documentation for the OCSP callback functions
Describe the usage of the OCSP callback functions on both the client and
the server side.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-12-27 22:02:33 +00:00
Matt Caswell
0ac6239955 Ensure we don't call the OCSP callback if resuming a session
It makes no sense to call the OCSP status callback if we are resuming a
session because no certificates will be sent.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-12-27 22:02:33 +00:00
Matt Caswell
905943af3b Fix error when server does not send CertificateStatus message
If a server sends the status_request extension then it may choose
to send the CertificateStatus message. However this is optional.
We were treating it as mandatory and the connection was failing.

Thanks to BoringSSL for reporting this issue.

RT#4120

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-12-27 22:02:33 +00:00
Daniel Kahn Gillmor
155a1623d0 The functions take a SSL *, not a SSL_CTX *
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>

RT: #4192, MR: #1533
(cherry picked from commit d938e8dfee)
2015-12-23 22:33:26 +01:00
David Benjamin
1c7de36f62 Fix memory leak in DSA redo case.
Found by clang scan-build.

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>

RT: #4184, MR: #1496
(cherry picked from commit 679d87515d)
2015-12-22 11:49:57 +01:00
Dr. Stephen Henson
6656ba7152 Don't check RSA_FLAG_SIGN_VER.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-20 19:27:03 +00:00
Richard Levitte
17592f323a BIO_s_datagram() ctrl doesn't support SEEK/TELL, so don't pretend it does
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-19 22:07:42 +01:00
Richard Levitte
6d97060ee0 Correct or add comments indicating what controls belong to what
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-19 22:07:42 +01:00
Richard Levitte
7eb5125125 Document how BIO_get_conn_ip and BIO_get_conn_int_port actually work
No dummy arguments.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-19 22:07:42 +01:00
Richard Levitte
2a60fccdd9 Have BIO_get_conn_int_port use BIO_ctrl instead BIO_int_ctrl
BIO_int_ctrl isn't made for the purpose BIO_get_conn_int_port used it
for.

This also changes BIO_C_GET_CONNECT to actually return the port
instead of assigning it to a pointer that was never returned back to
the caller.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-19 22:07:42 +01:00
Matt Caswell
f6cadeeeed Fix more URLs mangled by reformat
Fix some more URLs mangled by indent in the reformat. These ones don't exist
in master so we have a separate commit. Based on a patch supplied by Arnaud
Lacombe <al@aerilon.ca>

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-19 14:44:03 +00:00
Matt Caswell
dd045d17e7 Fix URLs mangled by reformat
Some URLs in the source code ended up getting mangled by indent. This fixes
it. Based on a patch supplied by Arnaud Lacombe <al@aerilon.ca>

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-19 14:43:43 +00:00
Richard Levitte
93a17f79b9 Remove the "eay" c-file-style indicators
Since we don't use the eay style any more, there's no point tryint to
tell emacs to use it.

Reviewed-by: Ben Laurie <ben@openssl.org>
2015-12-18 13:39:34 +01:00
Rich Salz
ecadde4d4d Provide better "make depend" warning.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 2e31ef0366)
2015-12-16 17:46:07 -05:00
Emilia Kasper
44e4f5b04b Fix a ** 0 mod 1 = 0 for real this time.
Commit 2b0180c37f attempted to do this but
only hit one of many BN_mod_exp codepaths. Fix remaining variants and add
a test for each method.

Thanks to Hanno Boeck for reporting this issue.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit d911097d7c)
2015-12-14 17:57:49 +01:00
Richard Levitte
474a53b3a3 Fix tarball production to keep test/bctest and util/pod2mantest
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-14 03:54:56 +01:00
Andy Polyakov
e780ed0336 x86_64 assembly pack: tune clang version detection even further.
RT#4171

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(cherry picked from commit b974943234)
2015-12-13 22:19:32 +01:00
Andy Polyakov
3cd33c42e3 ec/ecp_nistz256_table.c: fix potential misalignment problem with Sun C.
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-10 20:13:28 +01:00
Matt Caswell
50053969e3 Ensure |rwstate| is set correctly on BIO_flush
A BIO_flush call in the DTLS code was not correctly setting the |rwstate|
variable to SSL_WRITING. This means that SSL_get_error() will not return
SSL_ERROR_WANT_WRITE in the event of an IO retry.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 67f60be8c9)
2015-12-10 12:47:49 +00:00
Matt Caswell
01b5c1239b Fix DTLS handshake fragment retries
If using DTLS and NBIO then if a second or subsequent handshake message
fragment hits a retry, then the retry attempt uses the wrong fragment
offset value. This commit restores the fragment offset from the last
attempt.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 2ad226e88b)
2015-12-10 12:47:49 +00:00
Matt Caswell
f4d1926f95 Add a return value check
If the call to OBJ_find_sigid_by_algs fails to find the relevant NID then
we should set the NID to NID_undef.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 330dcb09b2)
2015-12-10 11:50:45 +00:00
Dr Stephen Henson
9501418ea2 Don't use applink for static builds.
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-09 00:30:29 +00:00
Rich Salz
50b255a260 Refer to website for acknowledgements.
Reviewed-by: Steve Marquess <marquess@openssl.com>
(cherry picked from commit ab29c82a55)
2015-12-08 16:07:59 -05:00
Richard Levitte
5ff0cfa517 Not all 'find's know -xtype, use -type instead
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 3cd7aef34d)
2015-12-08 21:06:19 +01:00
Richard Levitte
02d013e621 Adapt the OS X build to use the OS X tar
As part of this, move release creation to a script to be called from
.travis.yml.  That makes it much easier to test outside of travis.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 382af61f62)
2015-12-08 21:06:18 +01:00
Richard Levitte
89cd4fb5e9 Make it possible to affect the way dists are made
Introducing DISTTARVARS to propagate changed variables down to the
tar-making target.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 4d3c30a179)
2015-12-08 21:06:18 +01:00
Richard Levitte
c44844d928 Cleanup the EVP_MD_CTX before exit rather than after
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-12-08 01:04:55 +01:00
Richard Levitte
4e295148c3 Change tar owner and group to just 0
It seems like some tar versions don't like the name:id form for
--owner and --group.  The closest known anonymous user being 0 (root),
that seems to be the most appropriate user/group to assign ownership
to.  It matters very little when unpacking either way.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit b91dd150d2)
2015-12-07 20:10:51 +01:00
Richard Levitte
8e18babd1b Do not add symlinks in the source release
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 451a5bdf03)
2015-12-07 16:21:49 +01:00