]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
8 years agonettle: add support for GOST 34.11 hash functions
Dmitry Eremin-Solenikov [Fri, 21 Oct 2016 01:05:41 +0000 (04:05 +0300)] 
nettle: add support for GOST 34.11 hash functions

Add support for GOST R 34.11-94 and Streebog (256/512) functions.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agonettle: support GOST28147-89 in CFB mode
Dmitry Eremin-Solenikov [Fri, 21 Oct 2016 01:05:07 +0000 (04:05 +0300)] 
nettle: support GOST28147-89 in CFB mode

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agoAdd declarations for GOST 28147-89 cipher in CFB mode
Dmitry Eremin-Solenikov [Thu, 27 Oct 2016 00:18:32 +0000 (03:18 +0300)] 
Add declarations for GOST 28147-89 cipher in CFB mode

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agoAdd declarations for GOST R 34.11 (-94 and -2012) digest algorithms
Dmitry Eremin-Solenikov [Fri, 21 Oct 2016 00:57:17 +0000 (03:57 +0300)] 
Add declarations for GOST R 34.11 (-94 and -2012) digest algorithms

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agoImport GOST-supporting part from Nettle pending patches
Dmitry Eremin-Solenikov [Tue, 29 Aug 2017 12:12:53 +0000 (15:12 +0300)] 
Import GOST-supporting part from Nettle pending patches

Nettle upstream takes significant time to accept GOST-related patches.
As per Nikos' suggestion, push relevant parts to GnuTLS, so that they
can be tested in wild at the same time supporting GOST ciphersuite code.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years ago.gitlab-ci.yml: disable gost in minimal build
Dmitry Eremin-Solenikov [Sun, 17 Sep 2017 17:57:52 +0000 (20:57 +0300)] 
.gitlab-ci.yml: disable gost in minimal build

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agoAdd configure argument to disable GOST support
Dmitry Eremin-Solenikov [Wed, 26 Oct 2016 19:34:17 +0000 (22:34 +0300)] 
Add configure argument to disable GOST support

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agoMerge branch 'tmp-fix-order-extensions' into 'master'
Nikos Mavrogiannopoulos [Fri, 22 Jun 2018 09:52:48 +0000 (09:52 +0000)] 
Merge branch 'tmp-fix-order-extensions' into 'master'

extensions: corrected order of pre-shared-key and dumbfw

Closes #473

See merge request gnutls/gnutls!659

8 years ago_gnutls_parse_hello_extensions: enforce that pre-shared-key extension is last
Nikos Mavrogiannopoulos [Tue, 12 Jun 2018 08:16:10 +0000 (10:16 +0200)] 
_gnutls_parse_hello_extensions: enforce that pre-shared-key extension is last

This is a requirement in draft-ietf-tls-tls13-28 4.2.11 section:
   The "pre_shared_key" extension MUST be the last extension in the
   ClientHello (this facilitates implementation as described below).
   Servers MUST check that it is the last extension and otherwise fail
   the handshake with an "illegal_parameter" alert.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: check whether we send the pre-shared key extension after dumbfw
Nikos Mavrogiannopoulos [Tue, 12 Jun 2018 08:01:22 +0000 (10:01 +0200)] 
tests: check whether we send the pre-shared key extension after dumbfw

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: corrected typo in comment
Nikos Mavrogiannopoulos [Tue, 12 Jun 2018 07:35:16 +0000 (09:35 +0200)] 
tests: corrected typo in comment

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: corrected order of pre-shared-key and dumbfw
Nikos Mavrogiannopoulos [Fri, 8 Jun 2018 08:48:32 +0000 (10:48 +0200)] 
extensions: corrected order of pre-shared-key and dumbfw

The pre-shared-key MUST always be last under TLS1.3 while the
dumbfw extension should be last in order to do proper evaluation
of extension size (gnutls requirement). As such the protocol
requirement takes precedence.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'fix-warnings-in-testsuite' into 'master'
Nikos Mavrogiannopoulos [Thu, 21 Jun 2018 14:33:33 +0000 (14:33 +0000)] 
Merge branch 'fix-warnings-in-testsuite' into 'master'

Fix test code for -Werror

See merge request gnutls/gnutls!675

8 years agoFix test code for -Werror
Tim Rühsen [Tue, 19 Jun 2018 11:21:44 +0000 (13:21 +0200)] 
Fix test code for -Werror

8 years agoMerge branch 'tmp-supplemental-no-tls13' into 'master'
Nikos Mavrogiannopoulos [Thu, 21 Jun 2018 09:30:52 +0000 (09:30 +0000)] 
Merge branch 'tmp-supplemental-no-tls13' into 'master'

Disable TLS1.3 when supplemental data extensions are enabled

Closes #479

See merge request gnutls/gnutls!673

8 years agotests: updated supplemental tests for TLS1.3
Nikos Mavrogiannopoulos [Tue, 19 Jun 2018 12:59:33 +0000 (14:59 +0200)] 
tests: updated supplemental tests for TLS1.3

This includes tests that verify that TLS1.3 is not negotiated
when supplemental data are set in client and/or server side.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_supplemental_register: disable TLS 1.3 globally
Nikos Mavrogiannopoulos [Tue, 19 Jun 2018 14:03:52 +0000 (16:03 +0200)] 
gnutls_supplemental_register: disable TLS 1.3 globally

This allows using the registered supplemental data handlers, since
these are not used under TLS 1.3.

Resolves #479

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_session_supplemental_register: disable TLS1.3 when set
Nikos Mavrogiannopoulos [Tue, 19 Jun 2018 12:42:13 +0000 (14:42 +0200)] 
gnutls_session_supplemental_register: disable TLS1.3 when set

This allows using the registered supplemental data handlers, since
these are not used under TLS 1.3.

Resolves #479

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'exclude-fuzz-corpora' into 'master'
Nikos Mavrogiannopoulos [Wed, 20 Jun 2018 13:18:56 +0000 (13:18 +0000)] 
Merge branch 'exclude-fuzz-corpora' into 'master'

Remove oss-fuzz copora from tarball

Closes #461

See merge request gnutls/gnutls!671

8 years agoRemove oss-fuzz copora from tarball
Tim Rühsen [Tue, 19 Jun 2018 10:02:13 +0000 (12:02 +0200)] 
Remove oss-fuzz copora from tarball

The size of the corpora is huge and not needed for normal builds.

This patch also fixes test run issues on Windows.

8 years agognutls-cli: introduce the rekey1 inline command
Nikos Mavrogiannopoulos [Wed, 20 Jun 2018 11:20:27 +0000 (13:20 +0200)] 
gnutls-cli: introduce the rekey1 inline command

That allows performing a rekey locally and with the
peer.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'tmp-safe-padding-removal-made-optional' into 'master'
Nikos Mavrogiannopoulos [Wed, 20 Jun 2018 12:02:57 +0000 (12:02 +0000)] 
Merge branch 'tmp-safe-padding-removal-made-optional' into 'master'

Safe padding removal was made optional

Closes #466

See merge request gnutls/gnutls!669

8 years agodocument new behavior on safe padding removal
Nikos Mavrogiannopoulos [Mon, 18 Jun 2018 09:33:34 +0000 (11:33 +0200)] 
document new behavior on safe padding removal

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agorecord: fail with invalid request when attempting to send no pad and no data
Nikos Mavrogiannopoulos [Mon, 18 Jun 2018 09:22:36 +0000 (11:22 +0200)] 
record: fail with invalid request when attempting to send no pad and no data

Previously we were returning an internal error which seems to be incorrect
in that case.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: enhance padding check
Nikos Mavrogiannopoulos [Mon, 18 Jun 2018 09:15:56 +0000 (11:15 +0200)] 
tests: enhance padding check

This introduces tests for zero-data transfers with padding as well
as padding and de-padding with safe padding flag set.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-cli: added CCM run under TLS1.2 in benchmark mode
Nikos Mavrogiannopoulos [Mon, 18 Jun 2018 09:03:40 +0000 (11:03 +0200)] 
gnutls-cli: added CCM run under TLS1.2 in benchmark mode

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocipher: made TLS1.3 safe padding check optional
Nikos Mavrogiannopoulos [Mon, 18 Jun 2018 09:00:39 +0000 (11:00 +0200)] 
cipher: made TLS1.3 safe padding check optional

This patch introduces the gnutls_init() flag GNUTLS_SAFE_PADDING_CHECK
which makes the TLS1.3 safe padding check optional. That way applications
which do not utilize the TLS1.3 padding do not get penalized by the performance
drop in TLS1.3 packet processing. This addresses a regression in TLS1.3
packet processing performance.

Resolves: #466

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_session_get_id: document restrictions
Nikos Mavrogiannopoulos [Tue, 19 Jun 2018 11:16:13 +0000 (13:16 +0200)] 
gnutls_session_get_id: document restrictions

This documents the fact that a TLS session ID cannot be relied
to be unique or to even have a meaningful value.

Resolves #484

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: verify that resumed session ID matches original
Nikos Mavrogiannopoulos [Tue, 19 Jun 2018 11:08:27 +0000 (13:08 +0200)] 
tests: verify that resumed session ID matches original

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'fix-files-update' into 'master'
Nikos Mavrogiannopoulos [Wed, 20 Jun 2018 06:21:00 +0000 (06:21 +0000)] 
Merge branch 'fix-files-update' into 'master'

Fix make files-update for out-of-tree builds

See merge request gnutls/gnutls!674

8 years agoMakefile.am: move autogen files update to src/Makefile.am
Dmitry Eremin-Solenikov [Tue, 19 Jun 2018 15:23:14 +0000 (18:23 +0300)] 
Makefile.am: move autogen files update to src/Makefile.am

Move autogen'ed files update to src/Makefile.am to simplify code and
support out-of-tree builds.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agoMakefile.am: files-update: support out-of-tree builds
Dmitry Eremin-Solenikov [Tue, 19 Jun 2018 15:20:18 +0000 (18:20 +0300)] 
Makefile.am: files-update: support out-of-tree builds

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agosymbol-check: fix typo to make it work for out-of-tree builds
Dmitry Eremin-Solenikov [Tue, 19 Jun 2018 08:26:09 +0000 (11:26 +0300)] 
symbol-check: fix typo to make it work for out-of-tree builds

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agoaarch64: update elf files to correspond to the macosx version
Nikos Mavrogiannopoulos [Sat, 16 Jun 2018 13:46:25 +0000 (15:46 +0200)] 
aarch64: update elf files to correspond to the macosx version

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agomacosx: include aarch64 asm files
Nikos Mavrogiannopoulos [Sun, 10 Jun 2018 12:08:54 +0000 (14:08 +0200)] 
macosx: include aarch64 asm files

Relates #475

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoMerge branch 'tmp-fix-tags' into 'master'
Tim Rühsen [Tue, 19 Jun 2018 07:39:32 +0000 (07:39 +0000)] 
Merge branch 'tmp-fix-tags' into 'master'

Makefile.am: abi-check: fetch fresh tags

See merge request gnutls/gnutls!668

8 years agoMakefile.am: abi-check: fetch fresh tags
Nikos Mavrogiannopoulos [Sat, 16 Jun 2018 13:27:02 +0000 (15:27 +0200)] 
Makefile.am: abi-check: fetch fresh tags

This addresses the issue of failed abi-check CI runs on
forked repositories.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodrbg-aes: removed the continuous DRBG checks
Nikos Mavrogiannopoulos [Mon, 18 Jun 2018 13:10:32 +0000 (15:10 +0200)] 
drbg-aes: removed the continuous DRBG checks

These are no longer necessary for FIPS140-2 compliance.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'fix-autoreconf' into 'master'
Nikos Mavrogiannopoulos [Sat, 16 Jun 2018 21:27:49 +0000 (21:27 +0000)] 
Merge branch 'fix-autoreconf' into 'master'

Fix usage of 'autoreconf'

See merge request gnutls/gnutls!667

8 years agoFix usage of 'autoreconf'
Tim Rühsen [Fri, 15 Jun 2018 17:39:22 +0000 (19:39 +0200)] 
Fix usage of 'autoreconf'

'autoreconf' created a different configure script than ./bootstrap.
The result was a broken wchar.h that failed to compile.

The work-around was 'autoreconf -I gl/m4' which is not what a developer
expects. This patch moves gl/m4/* to m4/ which is the default include dir
for autoreconf.

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoconfigure: Check for clock_gettime and fmemopen using a proper test
Martin Storsjo [Thu, 14 Jun 2018 09:53:42 +0000 (12:53 +0300)] 
configure: Check for clock_gettime and fmemopen using a proper test

Don't use AC_CHECK_FUNCS for these functions, but actually test by
including the real header that defines the functions. This allows
the macOS version selection work as intended, making the references
to these functions weak if targeting a version of macOS where these
functions aren't available. Thanks to -no_weak_imports, these weak
references end up in failed linker tests, marking the functions as
unavailable.

This fixes issue #142.

Signed-off-by: Martin Storsjo <martin@martin.st>
8 years agoconfigure: Include sys/random.h before checking for getentropy on macOS
Martin Storsjo [Thu, 14 Jun 2018 09:52:03 +0000 (12:52 +0300)] 
configure: Include sys/random.h before checking for getentropy on macOS

This function is available since macOS 10.12, but it's in
sys/random.h on macOS, contrary to the other platforms supporting
it where it is present in unistd.h.

If we don't include the right header that declares the function
and its availability, the configure check would succeed even if
targeting older versions of macOS that lacks the function.

Also include the same header in the source file that actually
uses getentropy.

Signed-off-by: Martin Storsjo <martin@martin.st>
8 years agoconfigure: Pass -no_weak_imports to the linker, if supported
Martin Storsjo [Thu, 14 Jun 2018 09:36:10 +0000 (12:36 +0300)] 
configure: Pass -no_weak_imports to the linker, if supported

This avoids linking to functions that aren't available in the
lowest targeted macOS version.

If the proper header declaring a function is included, and
gnutls is built with -mmacosx-version-min or the
MACOSX_DEPLOYMENT_TARGET environment variable is set, each
reference to a function that doesn't exist in the minimum
targeted version will be made a weak reference, so that loading
the binary still works, but the function pointer will resolve
to NULL if running on a version of the platform that lacks it.

Since this project doesn't do such runtime checks for functions
it expects to have available, we should instead add this linker
option to fail on the weak references. This allows autoconf to
work as intended, detecting that these functions aren't usable.

This flag appeared in Xcode 8, so check for its availability
before using it. (Xcode 8 and the 10.12 SDK is coincidentally
the release where most relevant new functions appeared, so with
older Xcode versions, the modern platform functions we might want
to avoid don't exist.)

See issue #142.

Signed-off-by: Martin Storsjo <martin@martin.st>
8 years agoconfigure: Remove a duplicate check for fmemopen
Martin Storsjo [Thu, 14 Jun 2018 10:47:41 +0000 (13:47 +0300)] 
configure: Remove a duplicate check for fmemopen

The duplicate was added in 5bb8a18b without any specific reasoning
as to why.

Signed-off-by: Martin Storsjo <martin@martin.st>
8 years agoMerge branch 'tmp-tlsfuzzer-tls13-hrr' into 'master'
Nikos Mavrogiannopoulos [Fri, 15 Jun 2018 14:44:55 +0000 (14:44 +0000)] 
Merge branch 'tmp-tlsfuzzer-tls13-hrr' into 'master'

update tlsfuzzer with TLS 1.3 HRR test

Closes #469

See merge request gnutls/gnutls!664

8 years agotlsfuzzer: update to the latest version
Daiki Ueno [Wed, 13 Jun 2018 15:50:20 +0000 (17:50 +0200)] 
tlsfuzzer: update to the latest version

Also enable test-tls13-hrr.py.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years ago_gnutls13_handshake_server: send CCS immediately after HRR
Daiki Ueno [Wed, 13 Jun 2018 15:47:50 +0000 (17:47 +0200)] 
_gnutls13_handshake_server: send CCS immediately after HRR

In the TLS 1.3 middlebox compatibility mode, CCS follows the first
handshake message sent from the server, that is either SH or HRR.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years ago_gnutls13_handshake_server: corrected transition when post_handshake callback is set
Nikos Mavrogiannopoulos [Thu, 14 Jun 2018 11:43:30 +0000 (13:43 +0200)] 
_gnutls13_handshake_server: corrected transition when post_handshake callback is set

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_send_change_cipher_spec: don't cache under TLS 1.3
Daiki Ueno [Wed, 13 Jun 2018 15:43:32 +0000 (17:43 +0200)] 
_gnutls_send_change_cipher_spec: don't cache under TLS 1.3

Under TLS 1.3, when the server sent HRR, CCS may be followed by
receiving ClientHello.  In that case, the messsage shouldn't be
cached.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agoMerge branch 'tmp-iovec-api' into 'master'
Nikos Mavrogiannopoulos [Thu, 14 Jun 2018 19:38:38 +0000 (19:38 +0000)] 
Merge branch 'tmp-iovec-api' into 'master'

Introduce an iovec API for encryption

Closes #458

See merge request gnutls/gnutls!653

8 years agoabi-check skip session::set_transport_vec_push_function
Nikos Mavrogiannopoulos [Sun, 10 Jun 2018 09:42:10 +0000 (11:42 +0200)] 
abi-check skip session::set_transport_vec_push_function

This prevents an abi-compliance checker error when run under
gcc8 (though this error is not there under any other gcc).

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agocorrected check for iovec types in libc
Nikos Mavrogiannopoulos [Sun, 27 May 2018 13:13:47 +0000 (15:13 +0200)] 
corrected check for iovec types in libc

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Sat, 2 Jun 2018 20:23:29 +0000 (22:23 +0200)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agognutls-cli: benchmark for TLS1.3 and TLS1.2
Nikos Mavrogiannopoulos [Sat, 2 Jun 2018 20:15:58 +0000 (22:15 +0200)] 
gnutls-cli: benchmark for TLS1.3 and TLS1.2

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agocipher: use gnutls_aead_cipher_encryptv
Nikos Mavrogiannopoulos [Sat, 2 Jun 2018 19:37:00 +0000 (21:37 +0200)] 
cipher: use gnutls_aead_cipher_encryptv

This eliminates the need of a memory allocation during each
packet encryption when no padding is done.

Relates #458

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agognutls_aead_cipher_encryptv: introduced
Nikos Mavrogiannopoulos [Sat, 2 Jun 2018 19:25:10 +0000 (21:25 +0200)] 
gnutls_aead_cipher_encryptv: introduced

This API allows encryption using a scatter input, by also
taking advantage of ciphers which are optimized for such input.
That is particularly useful under TLS1.3 since its encryption is
based on encryption of scattered data (data+pad).

Resolves #458

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoMAX_CIPHER_BLOCK_SIZE: increased to 64-bytes for CHACHA20
Nikos Mavrogiannopoulos [Sat, 2 Jun 2018 19:23:41 +0000 (21:23 +0200)] 
MAX_CIPHER_BLOCK_SIZE: increased to 64-bytes for CHACHA20

This was not necessary since that value was only used by block
(in TLS sense) ciphers, but that definition could also be used
for the CHACHA20.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoconfigure: reduce warnings about implicit-fallthrough [ci skip]
Nikos Mavrogiannopoulos [Thu, 14 Jun 2018 12:51:23 +0000 (14:51 +0200)] 
configure: reduce warnings about implicit-fallthrough [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_alert_send_appropriate: fix type
Nikos Mavrogiannopoulos [Thu, 14 Jun 2018 11:22:03 +0000 (13:22 +0200)] 
gnutls_alert_send_appropriate: fix type

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoREADME-ci.freebsd.md: updated for new build method with gnulib [ci skip]
Nikos Mavrogiannopoulos [Thu, 14 Jun 2018 11:18:54 +0000 (13:18 +0200)] 
README-ci.freebsd.md: updated for new build method with gnulib [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'gnulib-bootstrap' into 'master'
Nikos Mavrogiannopoulos [Thu, 14 Jun 2018 10:38:29 +0000 (10:38 +0000)] 
Merge branch 'gnulib-bootstrap' into 'master'

Gnulib bootstrap, fix 'make distcheck' and more...

See merge request gnutls/gnutls!641

8 years agoUse $(MAKE) instead of make
Tim Rühsen [Wed, 6 Jun 2018 07:45:32 +0000 (09:45 +0200)] 
Use $(MAKE) instead of make

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agodistclean temp. test files for 'make distcheck'
Tim Rühsen [Tue, 5 Jun 2018 15:06:05 +0000 (17:06 +0200)] 
distclean temp. test files for 'make distcheck'

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoAdd DISTCLEANFILES to src/Makefile.am to fix 'make distcheck'
Tim Rühsen [Tue, 5 Jun 2018 08:58:10 +0000 (10:58 +0200)] 
Add DISTCLEANFILES to src/Makefile.am to fix 'make distcheck'

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoFix creation of ChangeLog for 'make distcheck'
Tim Rühsen [Mon, 4 Jun 2018 14:15:07 +0000 (16:15 +0200)] 
Fix creation of ChangeLog for 'make distcheck'

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoFix 'compare-makefile' make target for 'make distcheck'
Tim Rühsen [Mon, 4 Jun 2018 09:56:57 +0000 (11:56 +0200)] 
Fix 'compare-makefile' make target for 'make distcheck'

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoFix 'compare-exported' make target for 'make distcheck'
Tim Rühsen [Mon, 4 Jun 2018 09:33:18 +0000 (11:33 +0200)] 
Fix 'compare-exported' make target for 'make distcheck'

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoFix distcheck issues
Tim Rühsen [Thu, 31 May 2018 11:20:51 +0000 (13:20 +0200)] 
Fix distcheck issues

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoFix gcc 8 warnings
Tim Rühsen [Mon, 21 May 2018 14:25:20 +0000 (16:25 +0200)] 
Fix gcc 8 warnings

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoFix CI testing -Werror
Tim Rühsen [Sat, 19 May 2018 11:24:58 +0000 (13:24 +0200)] 
Fix CI testing -Werror

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoSkip sc_prohibit_always_true_header_tests
Tim Rühsen [Sat, 19 May 2018 08:19:32 +0000 (10:19 +0200)] 
Skip sc_prohibit_always_true_header_tests

We can't simply remove the checks for HAVE_SYS_SOCKET_H.
If we do, we have to make checks on real WIN32, which
is currently not an option.
So we skip sc_prohibit_always_true_header_tests.

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoFix sc_prohibit_always-defined_macros
Tim Rühsen [Sat, 19 May 2018 07:37:24 +0000 (09:37 +0200)] 
Fix sc_prohibit_always-defined_macros

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoAvoid certain gnulib tests
Tim Rühsen [Fri, 18 May 2018 21:23:26 +0000 (23:23 +0200)] 
Avoid certain gnulib tests

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoUpdate GTK-DOC check in configure.ac
Tim Rühsen [Fri, 18 May 2018 21:10:16 +0000 (23:10 +0200)] 
Update GTK-DOC check in configure.ac

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoUse ./bootstrap in .gitlab-ci.yml
Tim Rühsen [Wed, 6 Jun 2018 07:19:45 +0000 (09:19 +0200)] 
Use ./bootstrap in .gitlab-ci.yml

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoAdd bootstrap + bootstrap.conf
Tim Rühsen [Fri, 18 May 2018 18:31:31 +0000 (20:31 +0200)] 
Add bootstrap + bootstrap.conf

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoAdd gnulib submodule
Tim Rühsen [Fri, 18 May 2018 18:06:16 +0000 (20:06 +0200)] 
Add gnulib submodule

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agoMerge branch 'req-nettle-3_4' into 'master'
Nikos Mavrogiannopoulos [Thu, 14 Jun 2018 06:26:03 +0000 (06:26 +0000)] 
Merge branch 'req-nettle-3_4' into 'master'

nettle: require Nettle library >= 3.4

See merge request gnutls/gnutls!662

8 years agonettle: require Nettle library >= 3.4
Dmitry Eremin-Solenikov [Wed, 13 Jun 2018 09:12:18 +0000 (12:12 +0300)] 
nettle: require Nettle library >= 3.4

Nettle version 3.4 was released more than a half year ago, require it to
compile GnuTLS library. It allows us to remove bundled code that was
merged into that release.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agoMerge branch 'tmp-tlsfuzzer-tls13' into 'master'
Nikos Mavrogiannopoulos [Wed, 13 Jun 2018 08:37:46 +0000 (08:37 +0000)] 
Merge branch 'tmp-tlsfuzzer-tls13' into 'master'

update tlsfuzzer with TLS 1.3

Closes #411

See merge request gnutls/gnutls!660

8 years ago.gitlab-ci.yml: fix artifact paths for TLS1.3/interop
Daiki Ueno [Tue, 12 Jun 2018 11:01:17 +0000 (13:01 +0200)] 
.gitlab-ci.yml: fix artifact paths for TLS1.3/interop

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agotlsfuzzer-tls13: use a random port for testing
Nikos Mavrogiannopoulos [Tue, 12 Jun 2018 07:12:07 +0000 (09:12 +0200)] 
tlsfuzzer-tls13: use a random port for testing

That eliminates the need for locking and allows parallel runs.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotlsfuzzer: update to the latest version
Daiki Ueno [Fri, 8 Jun 2018 11:13:27 +0000 (13:13 +0200)] 
tlsfuzzer: update to the latest version

Also enable the TLS 1.3 tests.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agobuffers: remove redundant assignment
Daiki Ueno [Mon, 11 Jun 2018 10:08:18 +0000 (12:08 +0200)] 
buffers: remove redundant assignment

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agorecord: use correct alert type upon receiving empty Alert
Daiki Ueno [Mon, 11 Jun 2018 08:51:16 +0000 (10:51 +0200)] 
record: use correct alert type upon receiving empty Alert

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agorecord: improve empty message handling in TLS 1.3
Daiki Ueno [Fri, 8 Jun 2018 13:55:06 +0000 (15:55 +0200)] 
record: improve empty message handling in TLS 1.3

Previously, _gnutls_recv_in_buffers() silently discarded empty
messages because such messages are used as a countermeasure to
vulnerabilities in the CBC mode.  In TLS 1.3, however, there are only
AEAD ciphers and such logic is meaningless.  Moreover, in the protocol
it is suggested to send "unexpected_message" alert when receiving
empty messages in certain occasions.  This change moves the empty
message handling to record_add_to_buffers().

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agorecord: fix padding removal when the payload is zero-length
Daiki Ueno [Fri, 8 Jun 2018 10:51:40 +0000 (12:51 +0200)] 
record: fix padding removal when the payload is zero-length

Previoysly if TLSInnerPlaintext.content is zero-length, the loop
couldn't detect ContentType following the content.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agoMerge branch 'tmp-measure-record' into 'master'
Nikos Mavrogiannopoulos [Tue, 12 Jun 2018 13:00:03 +0000 (13:00 +0000)] 
Merge branch 'tmp-measure-record' into 'master'

Address issues in record layer decoding

Closes #472, #456, and #455

See merge request gnutls/gnutls!657

8 years agopriorities: introduced %FORCE_ETM
Nikos Mavrogiannopoulos [Tue, 5 Jun 2018 08:37:58 +0000 (10:37 +0200)] 
priorities: introduced %FORCE_ETM

This introduces a priority string option to force encrypt-then-mac
during negotiation, to prevent negotiating the legacy CBC ciphersuites.

Resolves #472

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agopriorities: hmac-sha256 ciphersuites were removed from defaults
Nikos Mavrogiannopoulos [Wed, 6 Jun 2018 07:25:20 +0000 (09:25 +0200)] 
priorities: hmac-sha256 ciphersuites were removed from defaults

These ciphersuites are deprecated since the introduction of AEAD
ciphersuites, and are only necessary for compatibility with older
servers. Since older servers already support hmac-sha1 there is
no reason to keep these ciphersuites enabled by default, as they
increase our attack surface.

Relates #456

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agocbc_mac_verify: require minimum padding under SSL3.0
Nikos Mavrogiannopoulos [Thu, 7 Jun 2018 07:56:49 +0000 (09:56 +0200)] 
cbc_mac_verify: require minimum padding under SSL3.0

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocipher: separated CBC w/o EtM handling
Nikos Mavrogiannopoulos [Thu, 7 Jun 2018 07:54:50 +0000 (09:54 +0200)] 
cipher: separated CBC w/o EtM handling

This would allow to further modify for more invasive work-arounds.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodummy_wait: always hash the same amount of blocks that would have been on minimum pad
Nikos Mavrogiannopoulos [Mon, 4 Jun 2018 15:57:52 +0000 (17:57 +0200)] 
dummy_wait: always hash the same amount of blocks that would have been on minimum pad

This improves protection against lucky13-type of attacks when
encrypt-then-mac is not in use.

Resolves #456

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocbc-record-check.sh: introduced
Nikos Mavrogiannopoulos [Mon, 21 May 2018 07:04:55 +0000 (09:04 +0200)] 
cbc-record-check.sh: introduced

That enhances the existing CBC check and adds sha384, uses PSK
to reduce handshake time, and other updates.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodummy_wait: correctly account the length field in SHA384 HMAC
Nikos Mavrogiannopoulos [Fri, 18 May 2018 13:43:36 +0000 (15:43 +0200)] 
dummy_wait: correctly account the length field in SHA384 HMAC

The existing lucky13 attack count-measures did not work correctly for
SHA384 HMAC.

The overall impact of that should not be significant as SHA384 is prioritized
lower than SHA256 or SHA1 and thus it is not typically negotiated, unless a
client prioritizes a SHA384 MAC, or a server only supports SHA384, and in both
cases the vulnerability is only present if Encrypt-then-MAC (RFC7366) is unsupported
by the peer.

Resolves #455

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoFix warnings seen on OpenCSW Solaris 10
Tim Rühsen [Thu, 7 Jun 2018 10:11:30 +0000 (12:11 +0200)] 
Fix warnings seen on OpenCSW Solaris 10

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agognutls_session_get_data2: harmonize documentation with practice
Nikos Mavrogiannopoulos [Fri, 8 Jun 2018 06:56:23 +0000 (08:56 +0200)] 
gnutls_session_get_data2: harmonize documentation with practice

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'fix-overflow' into 'master'
Nikos Mavrogiannopoulos [Wed, 6 Jun 2018 13:03:35 +0000 (13:03 +0000)] 
Merge branch 'fix-overflow' into 'master'

Fix variable overflow in TLS1.3 session ticket code

Closes #471

See merge request gnutls/gnutls!656

8 years agoFix variable overflow in TLS1.3 session ticket code
Tim Rühsen [Wed, 6 Jun 2018 10:45:13 +0000 (12:45 +0200)] 
Fix variable overflow in TLS1.3 session ticket code

8 years agoMerge branch 'tmp-session-ticket-incompatible' into 'master'
Nikos Mavrogiannopoulos [Tue, 5 Jun 2018 22:20:11 +0000 (22:20 +0000)] 
Merge branch 'tmp-session-ticket-incompatible' into 'master'

TLS 1.3 session ticket: don't send ticket when no common KE modes

See merge request gnutls/gnutls!652