]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
8 years agodoc: clarified re-handshake details under TLS1.2 server
Nikos Mavrogiannopoulos [Mon, 23 Apr 2018 08:07:32 +0000 (10:07 +0200)] 
doc: clarified re-handshake details under TLS1.2 server

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotls13/certificate_request: corrected check of duplicate signature algorithms
Nikos Mavrogiannopoulos [Mon, 23 Apr 2018 07:09:41 +0000 (09:09 +0200)] 
tls13/certificate_request: corrected check of duplicate signature algorithms

Made the check local when parsing a certificate request, as we may
receive multiple requests when post-handshake authentication is
in place. Furthermore check whether this extension has been received
as this is a mandatory one. In addition handle a memory leak when
multiple peer certificates are set.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_reauth: doc update
Nikos Mavrogiannopoulos [Mon, 23 Apr 2018 06:41:22 +0000 (08:41 +0200)] 
gnutls_reauth: doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-cli: enhanced tool for TLS1.3 options
Nikos Mavrogiannopoulos [Fri, 20 Apr 2018 19:35:52 +0000 (21:35 +0200)] 
gnutls-cli: enhanced tool for TLS1.3 options

This patch allows a client to enable post-handshake
authentication, perform re-key and restrict the sent key shares.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotls13/certificate: send empty certificate instead of skipping
Nikos Mavrogiannopoulos [Fri, 20 Apr 2018 12:51:15 +0000 (14:51 +0200)] 
tls13/certificate: send empty certificate instead of skipping

According to TLS1.3 spec:
   The server's certificate_list MUST always be non-empty.  A client
   will send an empty certificate_list if it does not have an
   appropriate certificate to send in response to the server's
   authentication request.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_figure_common_ciphersuite: ignore certificate check if PSK is negotiated
Nikos Mavrogiannopoulos [Fri, 20 Apr 2018 11:47:57 +0000 (13:47 +0200)] 
_gnutls_figure_common_ciphersuite: ignore certificate check if PSK is negotiated

That is, if we are performing PSK under TLS1.3, don't bother
checking whether the certificate is compatible with the ciphersuite;
there isn't any.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotls13/certificate_verify: corrected context in signatures in client side
Nikos Mavrogiannopoulos [Fri, 20 Apr 2018 08:53:51 +0000 (10:53 +0200)] 
tls13/certificate_verify: corrected context in signatures in client side

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls13_handshake_sign_data: avoid unnecessary copy
Nikos Mavrogiannopoulos [Fri, 20 Apr 2018 08:47:59 +0000 (10:47 +0200)] 
_gnutls13_handshake_sign_data: avoid unnecessary copy

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: cleanup in TLS1.3 initial secret calculation
Nikos Mavrogiannopoulos [Fri, 20 Apr 2018 07:01:28 +0000 (09:01 +0200)] 
handshake: cleanup in TLS1.3 initial secret calculation

That eliminates duplicate code in server hello parsing.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopsk: compute binder which is compatible with draft-ietf-tls-tls13
Nikos Mavrogiannopoulos [Fri, 20 Apr 2018 06:06:14 +0000 (08:06 +0200)] 
psk: compute binder which is compatible with draft-ietf-tls-tls13

Previously the computed binder values was not compatible with any
TLS1.3 draft, and was not interoperating with openssl or tlslite.

Resolves #427

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoCONTRIBUTING.md: added text on CI [ci skip]
Nikos Mavrogiannopoulos [Fri, 4 May 2018 06:06:35 +0000 (08:06 +0200)] 
CONTRIBUTING.md: added text on CI [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: fallback scsv: check proper fallback under TLS 1.3
Nikos Mavrogiannopoulos [Thu, 3 May 2018 12:19:34 +0000 (14:19 +0200)] 
tests: fallback scsv: check proper fallback under TLS 1.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoencrypt_packet_tls13: made size check safer
Nikos Mavrogiannopoulos [Thu, 3 May 2018 13:13:13 +0000 (15:13 +0200)] 
encrypt_packet_tls13: made size check safer

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'tmp-pkcs11-sensitive-fix' into 'master'
Nikos Mavrogiannopoulos [Thu, 3 May 2018 11:45:14 +0000 (11:45 +0000)] 
Merge branch 'tmp-pkcs11-sensitive-fix' into 'master'

pkcs11: mark private key objects as sensitive by default

See merge request gnutls/gnutls!627

8 years agopkcs11: mark private key objects as sensitive by default
Nikos Mavrogiannopoulos [Sat, 28 Apr 2018 09:14:34 +0000 (11:14 +0200)] 
pkcs11: mark private key objects as sensitive by default

That is, to prevent accidentally creating objects which can
be exported.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoMerge branch 'tmp-rsa-psk-fix' into 'master'
Nikos Mavrogiannopoulos [Mon, 30 Apr 2018 06:58:56 +0000 (06:58 +0000)] 
Merge branch 'tmp-rsa-psk-fix' into 'master'

RSA-PSK ciphersuites: only use under TLS1.2

See merge request gnutls/gnutls!624

8 years agotests: check the behavior of TLS1.2 key exchange methods under TLS1.3
Nikos Mavrogiannopoulos [Mon, 23 Apr 2018 13:02:53 +0000 (15:02 +0200)] 
tests: check the behavior of TLS1.2 key exchange methods under TLS1.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopsk: mark psk_ke_modes as invalid when ignored
Nikos Mavrogiannopoulos [Mon, 23 Apr 2018 13:11:28 +0000 (15:11 +0200)] 
psk: mark psk_ke_modes as invalid when ignored

TLS1.3 handles the receiving of pre-shared keys extension as
invalid when the psk_ke_modes extension is not received as well.
As such, when we ignore the psk_ke_modes for some reason (e.g.,
no credentials) we need to indicate that it was received. We
use the invalid mode flag for that reason, allowing the handshake
to fail later for the right reason (e.g., no credentials error rather
than illegal extension).

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopriority: handle RSA-PSK ciphersuites similar to SRP
Nikos Mavrogiannopoulos [Mon, 23 Apr 2018 13:01:48 +0000 (15:01 +0200)] 
priority: handle RSA-PSK ciphersuites similar to SRP

That is, when specified disable TLS1.3.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'tmp-sni-hostname' into 'master'
Nikos Mavrogiannopoulos [Sun, 29 Apr 2018 16:38:05 +0000 (16:38 +0000)] 
Merge branch 'tmp-sni-hostname' into 'master'

tests: updated sni-hostname check for TLS1.3

Closes #344

See merge request gnutls/gnutls!623

8 years agoAdd another sni related test
Andreas Metzler [Sat, 28 Apr 2018 12:14:30 +0000 (14:14 +0200)] 
Add another sni related test

As --sni-hostname does not imply --verify-hostname a hostname mismatch
still triggers an error.

Signed-off-by: Andreas Metzler <ametzler@bebt.de>
8 years agotests: sni-hostname was updated to support TLS1.3
Nikos Mavrogiannopoulos [Mon, 23 Apr 2018 12:00:15 +0000 (14:00 +0200)] 
tests: sni-hostname was updated to support TLS1.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Sun, 29 Apr 2018 11:44:04 +0000 (13:44 +0200)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodoc: Add crossreference/warning
Andreas Metzler [Sat, 28 Apr 2018 12:11:27 +0000 (14:11 +0200)] 
doc: Add crossreference/warning

Add pointer to --verify-hostname to --sni-hostname description.

Signed-off-by: Andreas Metzler <ametzler@bebt.de>
8 years agognutls-cli: added option to specify the verification hostname
Nikos Mavrogiannopoulos [Mon, 23 Apr 2018 11:58:22 +0000 (13:58 +0200)] 
gnutls-cli: added option to specify the verification hostname

This enables testing various scenarios, by allowing to specify the
hostname to be used for certificate validation when connecting to
a remote host (e.g., localhost but with a certificate for example.com).

Resolves #344

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: fixes for better latex pdf generation [ci skip]
Nikos Mavrogiannopoulos [Thu, 26 Apr 2018 07:06:00 +0000 (09:06 +0200)] 
doc: fixes for better latex pdf generation [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoretrieve_pin: refuse to retrieve PIN from URI more than one time
Nikos Mavrogiannopoulos [Tue, 24 Apr 2018 06:36:06 +0000 (08:36 +0200)] 
retrieve_pin: refuse to retrieve PIN from URI more than one time

That is, prevent re-using a static PIN if it has already been
known to be wrong. Introduced tests of that behavior.

Resolves #425

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: updated OCSP documentation [ci skip]
Nikos Mavrogiannopoulos [Tue, 24 Apr 2018 14:42:10 +0000 (16:42 +0200)] 
doc: updated OCSP documentation [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls.h.in: corrected typo [ci skip]
Nikos Mavrogiannopoulos [Sun, 22 Apr 2018 14:02:08 +0000 (16:02 +0200)] 
gnutls.h.in: corrected typo [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agofuzz: corrected TLS1.3 enablement [ci skip]
Nikos Mavrogiannopoulos [Fri, 20 Apr 2018 06:42:27 +0000 (08:42 +0200)] 
fuzz: corrected TLS1.3 enablement [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'tmp-constate-fix' into 'master'
Nikos Mavrogiannopoulos [Wed, 18 Apr 2018 18:50:16 +0000 (18:50 +0000)] 
Merge branch 'tmp-constate-fix' into 'master'

Fix re-handshake failure when interrupted by application data

Closes #426

See merge request gnutls/gnutls!620

8 years ago_gnutls_epoch_new: allow re-allocation epoch next epoch
Nikos Mavrogiannopoulos [Tue, 17 Apr 2018 08:59:25 +0000 (10:59 +0200)] 
_gnutls_epoch_new: allow re-allocation epoch next epoch

On certain cases when re-handshake is interrupted by application
data, _gnutls_epoch_new() will be called twice. Make sure that
this does not lead to an error. We also rename the function to
clarify its purpose _gnutls_epoch_setup_next().

Resolves #426

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added reproducers for receiving app data when rehandshake is expected
Nikos Mavrogiannopoulos [Tue, 17 Apr 2018 07:52:01 +0000 (09:52 +0200)] 
tests: added reproducers for receiving app data when rehandshake is expected

Relates: #426

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: eliminated exit_code variable used in few tests
Nikos Mavrogiannopoulos [Tue, 17 Apr 2018 07:31:12 +0000 (09:31 +0200)] 
tests: eliminated exit_code variable used in few tests

It was a legacy variable for error printing that was never
used uniformly.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: eagain: moved to cmocka and enhanced for TLS1.3
Nikos Mavrogiannopoulos [Tue, 17 Apr 2018 07:24:29 +0000 (09:24 +0200)] 
tests: eagain: moved to cmocka and enhanced for TLS1.3

That also makes macros from eagain-common.h functioning under cmocka.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: tls12-rehandshake-cert*: run multiple rehandshake tests
Nikos Mavrogiannopoulos [Mon, 16 Apr 2018 07:51:11 +0000 (09:51 +0200)] 
tests: tls12-rehandshake-cert*: run multiple rehandshake tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'tmp-memleak-fix' into 'master'
Nikos Mavrogiannopoulos [Tue, 17 Apr 2018 07:31:44 +0000 (07:31 +0000)] 
Merge branch 'tmp-memleak-fix' into 'master'

tls13/finished: addressed memory leak in receiving finished packet

See merge request gnutls/gnutls!619

8 years agotls13/finished: addressed memory leak in receiving finished packet
Nikos Mavrogiannopoulos [Tue, 17 Apr 2018 05:45:54 +0000 (07:45 +0200)] 
tls13/finished: addressed memory leak in receiving finished packet

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7518

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopriority: document the reasons for the order of supported groups [ci skip]
Nikos Mavrogiannopoulos [Mon, 16 Apr 2018 13:35:33 +0000 (15:35 +0200)] 
priority: document the reasons for the order of supported groups [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: described the epoch reference counting [ci skip]
Nikos Mavrogiannopoulos [Mon, 16 Apr 2018 13:14:01 +0000 (15:14 +0200)] 
handshake: described the epoch reference counting [ci skip]

It is used only in DTLS where multiple handshake states may be
active.

Resolves #421

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: tls12-rehandshake-cert-3: run multiple rehandshake tests
Nikos Mavrogiannopoulos [Mon, 16 Apr 2018 07:51:11 +0000 (09:51 +0200)] 
tests: tls12-rehandshake-cert-3: run multiple rehandshake tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'tmp-disable-tls13' into 'master'
Nikos Mavrogiannopoulos [Fri, 13 Apr 2018 08:14:11 +0000 (08:14 +0000)] 
Merge branch 'tmp-disable-tls13' into 'master'

Disable TLS1.3 under certain priority strings

See merge request gnutls/gnutls!617

8 years agodoc update
Nikos Mavrogiannopoulos [Wed, 11 Apr 2018 12:35:26 +0000 (14:35 +0200)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoANON,SRP,NULL ciphersuites: when set do not negotiate TLS1.3 or later
Nikos Mavrogiannopoulos [Wed, 11 Apr 2018 06:34:15 +0000 (08:34 +0200)] 
ANON,SRP,NULL ciphersuites: when set do not negotiate TLS1.3 or later

The reason is that these ciphersuites cannot be negotiated using TLS1.3.
There is a different strategy followed for these.

 * NULL ciphersuites: they are not something normally enabled and used
   for debugging purposes mostly. When set both in client and server side
   only TLS1.2 can be used.

 * SRP ciphersuites: they are used on client side when the client is actually
   performing a username-password authentication with SRP. On server side we
   can have indeed a server support SRP and non-SRP. In that case we limit
   both on TLS1.2. That an unfortunate restriction, but is not a regression
   and IMHO these servers would most likely be phased out as very few would
   want to stick to TLS1.2 connections for SRP; or we may have an SRP update
   for TLS1.3 which could lift that limitation in the future.

 * ANON ciphersuites: they are used in certain client/server setups where very
   basic level of security is required, and in opportunistic encryption scenarios.
   There is a difference in the handling of these cases. In the case of Anon-only
   server/clients they provide the session with anonymous credentials structure; in
   the case of opportunistic encryption they provide both certificate and anonymous
   credentials. Thus we allow the protocol (TLS1.3) be in the priorities, but if we
   see no certificate or PSK credentials we disable TLS1.3 negotiation.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoext/pre_shared_key: cleanups in error handling
Nikos Mavrogiannopoulos [Sat, 7 Apr 2018 19:42:57 +0000 (21:42 +0200)] 
ext/pre_shared_key: cleanups in error handling

This addresses a memory leak found via oss-fuzz. It also
sets the right index on the selected PSK, and returns the
right server error code on incorrect key file.

Addresses:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7465

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoext/psk_ke_modes: corrected data access
Nikos Mavrogiannopoulos [Sat, 7 Apr 2018 19:27:27 +0000 (21:27 +0200)] 
ext/psk_ke_modes: corrected data access

That also improves the if-checks.

Issue and reproducer discovered via oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7470

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agofuzz: added client and server traces for TLS 1.3 draft-26 [ci skip]
Nikos Mavrogiannopoulos [Sat, 7 Apr 2018 19:06:53 +0000 (21:06 +0200)] 
fuzz: added client and server traces for TLS 1.3 draft-26 [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodoc: corrected space-tab issues in examples
Nikos Mavrogiannopoulos [Sat, 7 Apr 2018 04:20:05 +0000 (06:20 +0200)] 
doc: corrected space-tab issues in examples

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoconstate: fixed key generation for TLS1.3
Nikos Mavrogiannopoulos [Fri, 6 Apr 2018 18:51:39 +0000 (20:51 +0200)] 
constate: fixed key generation for TLS1.3

This amends 62ea232f180b980a0d4b6462c468706db6cc4700, and
removes invalid NULL checks, as well as corrects the key
set for server side.

This is verified against openssl master, but does not include
automated test suite; it will be tested as part of #328

Resolves #419

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodoc: re-organized and modernized examples
Nikos Mavrogiannopoulos [Wed, 4 Apr 2018 12:51:08 +0000 (14:51 +0200)] 
doc: re-organized and modernized examples

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: updated for TLS1.3
Nikos Mavrogiannopoulos [Wed, 4 Apr 2018 11:47:36 +0000 (13:47 +0200)] 
doc: updated for TLS1.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agofuzz: added PSK traces with TLS1.3
Nikos Mavrogiannopoulos [Fri, 6 Apr 2018 11:36:11 +0000 (13:36 +0200)] 
fuzz: added PSK traces with TLS1.3

Relates: #359

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'tmp-psk-tls1.3' into 'master'
Nikos Mavrogiannopoulos [Fri, 6 Apr 2018 11:36:58 +0000 (11:36 +0000)] 
Merge branch 'tmp-psk-tls1.3' into 'master'

TLS1.3: add support for PSK key exchange

Closes #414 and #125

See merge request gnutls/gnutls!615

8 years agopsk: save the username on auth info struct under TLS1.3
Nikos Mavrogiannopoulos [Wed, 4 Apr 2018 13:28:37 +0000 (15:28 +0200)] 
psk: save the username on auth info struct under TLS1.3

Add the necessary tests to verify that gnutls_psk_server_get_username()
reports the right username under TLS1.2 and TLS1.3.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: enhanced test suite for TLS1.3 and PSK
Nikos Mavrogiannopoulos [Thu, 22 Mar 2018 09:02:36 +0000 (10:02 +0100)] 
tests: enhanced test suite for TLS1.3 and PSK

That includes tests with unknown usernames and connections with wrong key
and updates to fastopen.sh to use certificate auth, making it applicable
under TLS1.3.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agopriority: added GROUP-DH-ALL and GROUP-EC-ALL
Nikos Mavrogiannopoulos [Thu, 29 Mar 2018 07:51:32 +0000 (09:51 +0200)] 
priority: added GROUP-DH-ALL and GROUP-EC-ALL

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodumbfw: account for extension data padding
Nikos Mavrogiannopoulos [Tue, 3 Apr 2018 11:10:30 +0000 (13:10 +0200)] 
dumbfw: account for extension data padding

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoSimplified the _gnutls13_psk_ext_parser interface and added unit tests
Nikos Mavrogiannopoulos [Thu, 5 Apr 2018 07:04:47 +0000 (09:04 +0200)] 
Simplified the _gnutls13_psk_ext_parser interface and added unit tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoAdded support for out-of-band Pre-shared keys under TLS1.3
Ander Juaristi [Thu, 22 Mar 2018 07:59:56 +0000 (08:59 +0100)] 
Added support for out-of-band Pre-shared keys under TLS1.3

That adds support for pre-shared keys with and without Diffie-Hellman
key exchange. That's a modified version of initial Ander's patch.

Resolves #414
Resolves #125

Signed-off-by: Ander Juaristi <a@juaristi.eus>
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.org>
8 years agocerttool: key-type desc was moved along the privkey functionality [ci skip]
Nikos Mavrogiannopoulos [Fri, 6 Apr 2018 08:36:18 +0000 (10:36 +0200)] 
certtool: key-type desc was moved along the privkey functionality [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_record_can_use_length_hiding: corrected return type
Nikos Mavrogiannopoulos [Wed, 4 Apr 2018 11:47:25 +0000 (13:47 +0200)] 
gnutls_record_can_use_length_hiding: corrected return type

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoencrypt_packet_tls13: reverted to original API
Nikos Mavrogiannopoulos [Wed, 4 Apr 2018 14:54:15 +0000 (16:54 +0200)] 
encrypt_packet_tls13: reverted to original API

That allows more uniformity across encrypt/decrypt, and
across different protocol handling.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'tmp-nettle-version-check-update' into 'master'
Nikos Mavrogiannopoulos [Mon, 26 Mar 2018 10:14:01 +0000 (10:14 +0000)] 
Merge branch 'tmp-nettle-version-check-update' into 'master'

nettle: corrected typo in version check for compatibility mode with 3.3

See merge request gnutls/gnutls!614

8 years agonettle: corrected typo in version check for compatibility mode with 3.3
Nikos Mavrogiannopoulos [Sun, 25 Mar 2018 18:08:26 +0000 (20:08 +0200)] 
nettle: corrected typo in version check for compatibility mode with 3.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoMerge branch 'tmp-draft-ietf-tls13-26' into 'master'
Nikos Mavrogiannopoulos [Sat, 24 Mar 2018 14:46:00 +0000 (14:46 +0000)] 
Merge branch 'tmp-draft-ietf-tls13-26' into 'master'

Move to draft-ietf-tls-tls13-26

Closes #409, #378, and #410

See merge request gnutls/gnutls!611

8 years agodoc update
Nikos Mavrogiannopoulos [Tue, 13 Mar 2018 10:11:52 +0000 (11:11 +0100)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoprotocols: bumped TLS1.3 protocol to draft -26
Nikos Mavrogiannopoulos [Tue, 13 Mar 2018 08:45:44 +0000 (09:45 +0100)] 
protocols: bumped TLS1.3 protocol to draft -26

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agorecord: added AAD data when encrypting or decrypting
Nikos Mavrogiannopoulos [Tue, 13 Mar 2018 08:23:05 +0000 (09:23 +0100)] 
record: added AAD data when encrypting or decrypting

This is a requirement of draft-ietf-tls-tls13-25

Resolves #409

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopriorities: disable any key exchange methods if there is no TLS1.2 or earlier
Nikos Mavrogiannopoulos [Mon, 12 Mar 2018 16:10:42 +0000 (17:10 +0100)] 
priorities: disable any key exchange methods if there is no TLS1.2 or earlier

That is, because TLS1.2 has specific requirements in the ordering of
curves/groups if certain ciphersuites (ECDHE/DHE) are present, and
by being able to eliminate them early we simplify the negotiation
for TLS1.3-only clients/servers.

Relates #378

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_supported_ecc_recv_params: take into account precedence
Nikos Mavrogiannopoulos [Fri, 9 Mar 2018 11:12:56 +0000 (12:12 +0100)] 
_gnutls_supported_ecc_recv_params: take into account precedence

That is, when %SERVER_PRECEDENCE is given in the priority string make
sure that the negotiated curve of DH group respects the server's priorities.
That's very relevant under TLS1.3 as ciphersuite negotiation itself, where
%SERVER_PRECEDENCE applied, does contain only the cipher algorithm and MAC
unlike TLS1.2 which included key exchange as well.

Resolves #378

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agosupported_versions: cannot be used to negotiate pre-TLS1.3
Nikos Mavrogiannopoulos [Mon, 12 Mar 2018 09:37:00 +0000 (10:37 +0100)] 
supported_versions: cannot be used to negotiate pre-TLS1.3

This is a requirement of draft-ietf-tls-tls13-26

Resolves #410

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update [ci skip]
Nikos Mavrogiannopoulos [Fri, 23 Mar 2018 19:45:40 +0000 (20:45 +0100)] 
doc update [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodoc: mention gnutls_privkey_import_ext4 in upgrade from 3.5.x
Nikos Mavrogiannopoulos [Fri, 23 Mar 2018 06:04:37 +0000 (07:04 +0100)] 
doc: mention gnutls_privkey_import_ext4 in upgrade from 3.5.x

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodoc: added since field in gnutls_record_send2() description
Nikos Mavrogiannopoulos [Fri, 23 Mar 2018 06:02:23 +0000 (07:02 +0100)] 
doc: added since field in gnutls_record_send2() description

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoMakefile.am: reduce automake warnings and corrected version
Nikos Mavrogiannopoulos [Fri, 23 Mar 2018 05:47:55 +0000 (06:47 +0100)] 
Makefile.am: reduce automake warnings and corrected version

That is, avoid using the := syntax, set the right version variable
and use a hidden file for abi-check cache stamp.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoThe abi-check target was updated to check against the last tag
Nikos Mavrogiannopoulos [Sun, 18 Mar 2018 14:46:36 +0000 (15:46 +0100)] 
The abi-check target was updated to check against the last tag

As abi-dumper and abi-compliance-checker tools are not reliable when
run across different systems, we now compare the previous tag ABI with the
current compiled library. That is in contrast with the previous behavior
of storing the output files of abi-dumper, which can become obsolete on
a CI update.

That also moves the ABI check only on the CI, and not in the 'make dist' rule
as it takes significant time to run.

This relates to an issue reported against libidn2's use of abi-compliance-checker
but it affects gnutls as they share similar code:
https://gitlab.com/libidn/libidn2/issues/42

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agonettle/pk: include nettle/version.h
Nikos Mavrogiannopoulos [Tue, 20 Mar 2018 06:15:13 +0000 (07:15 +0100)] 
nettle/pk: include nettle/version.h

That enables the nettle version macros to operate.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: avoid duplicate runs of tests when not necessary
Nikos Mavrogiannopoulos [Mon, 19 Mar 2018 13:42:38 +0000 (14:42 +0100)] 
tests: avoid duplicate runs of tests when not necessary

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: moved invalid-cert reproducer into fuzz/ reproducers
Nikos Mavrogiannopoulos [Mon, 19 Mar 2018 17:31:40 +0000 (18:31 +0100)] 
tests: moved invalid-cert reproducer into fuzz/ reproducers

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: testpkcs11.sh was moved to the main tests
Nikos Mavrogiannopoulos [Mon, 19 Mar 2018 17:29:23 +0000 (18:29 +0100)] 
tests: testpkcs11.sh was moved to the main tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: long-crl.sh was moved to main suite
Nikos Mavrogiannopoulos [Mon, 19 Mar 2018 17:24:10 +0000 (18:24 +0100)] 
tests: long-crl.sh was moved to main suite

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: suite: dropped ocsp-coverage and cert-coverage
Nikos Mavrogiannopoulos [Mon, 19 Mar 2018 14:22:14 +0000 (15:22 +0100)] 
tests: suite: dropped ocsp-coverage and cert-coverage

These tests are duplicates of fuzz/gnutls_ocsp_resp/req_parser_fuzzer
and gnutls_x509_parser_fuzzer.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: testsrn.sh was removed as duplicate of safe-renegotation/ tests
Nikos Mavrogiannopoulos [Mon, 19 Mar 2018 14:11:38 +0000 (15:11 +0100)] 
tests: testsrn.sh was removed as duplicate of safe-renegotation/ tests

Also safe-renegotiation tests were made TLS1.2-only as they do not
apply to TLS1.3.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: pkcs7-cat: moved to main suite
Nikos Mavrogiannopoulos [Mon, 19 Mar 2018 14:07:14 +0000 (15:07 +0100)] 
tests: pkcs7-cat: moved to main suite

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: updated for TLS1.3 inclusion
Nikos Mavrogiannopoulos [Tue, 13 Mar 2018 14:46:16 +0000 (15:46 +0100)] 
tests: updated for TLS1.3 inclusion

This moves the test to use a specific version or test multiple
TLS versions if applicable.

Resolves #413

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: mini-record-retvals was split into return vals checking and alerts checking
Nikos Mavrogiannopoulos [Mon, 19 Mar 2018 08:00:23 +0000 (09:00 +0100)] 
tests: mini-record-retvals was split into return vals checking and alerts checking

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: client-fast-open: updated for TLS1.3
Nikos Mavrogiannopoulos [Tue, 13 Mar 2018 12:47:46 +0000 (13:47 +0100)] 
tests: client-fast-open: updated for TLS1.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: removed unused test
Nikos Mavrogiannopoulos [Tue, 13 Mar 2018 12:43:47 +0000 (13:43 +0100)] 
tests: removed unused test

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: auto-verify: update for TLS1.3
Nikos Mavrogiannopoulos [Tue, 13 Mar 2018 12:41:19 +0000 (13:41 +0100)] 
tests: auto-verify: update for TLS1.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update [ci skip]
Nikos Mavrogiannopoulos [Sat, 10 Mar 2018 18:08:08 +0000 (19:08 +0100)] 
doc update [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoMerge branch 'tmp-nmav-draft-ietf-tls-tls13-22' into 'master'
Nikos Mavrogiannopoulos [Sat, 10 Mar 2018 11:57:18 +0000 (11:57 +0000)] 
Merge branch 'tmp-nmav-draft-ietf-tls-tls13-22' into 'master'

Move to draft-ietf-tls-tls-23

Closes #391, #400, #393, #389, #397, #398, #395, and #396

See merge request gnutls/gnutls!610

8 years agotlsfuzzer: updated to the latest version
Nikos Mavrogiannopoulos [Thu, 8 Mar 2018 15:21:20 +0000 (16:21 +0100)] 
tlsfuzzer: updated to the latest version

Also enabled the RSA-PSS tests.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoalert: send the appropriate alert on GNUTLS_E_ERROR_IN_FINISHED_PACKET
Nikos Mavrogiannopoulos [Thu, 8 Mar 2018 15:00:34 +0000 (16:00 +0100)] 
alert: send the appropriate alert on GNUTLS_E_ERROR_IN_FINISHED_PACKET

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoBumped TLS1.3 draft version to -23
Nikos Mavrogiannopoulos [Thu, 8 Mar 2018 13:54:55 +0000 (14:54 +0100)] 
Bumped TLS1.3 draft version to -23

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoHello retry request matches server hello
Nikos Mavrogiannopoulos [Thu, 8 Mar 2018 12:57:05 +0000 (13:57 +0100)] 
Hello retry request matches server hello

That also distinguishes between them by using the special random value,
and implements the version check as in draft-ietf-tls-tls13-24.

Resolves #391 #390 #392

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added negative tests for RSA-PSS key exchange
Nikos Mavrogiannopoulos [Wed, 7 Mar 2018 11:52:46 +0000 (12:52 +0100)] 
tests: added negative tests for RSA-PSS key exchange

Relates #400

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agosignatures: distinguish RSA-PSS signatures with RSA PKCS#1 1.5 certificates from...
Nikos Mavrogiannopoulos [Tue, 6 Mar 2018 14:09:50 +0000 (15:09 +0100)] 
signatures: distinguish RSA-PSS signatures with RSA PKCS#1 1.5 certificates from "pure"

This change enhances signature algorithms to have a private key algorithm
parameter. That is, to allow signature algorithms operating with a private
key of type X while the public key is of type Y. That is useful for the
RSA-PSS signatures which are of two types; one which is seen from servers
having PKCS#1 1.5 certificates, the other with RSA-PSS certificates, while
both utilize RSA-PSS private keys.

This is a draft-ietf-tls-tls13-23 change.

Resolves #400

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoServer hello format follows TLS1.2 format
Nikos Mavrogiannopoulos [Wed, 28 Feb 2018 11:41:40 +0000 (12:41 +0100)] 
Server hello format follows TLS1.2 format

Also version negotiation was moved to supported_versions extension,
and session ID is set by client following appendix D.4.

This is a draft-ietf-tls-tls13-22 change.

Resolves #393, #389, #397

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoRenumbered the key share extension to 51
Nikos Mavrogiannopoulos [Wed, 28 Feb 2018 10:38:53 +0000 (11:38 +0100)] 
Renumbered the key share extension to 51

This is a draft-ietf-tls-tls13-23 change.

Resolves #398

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agorecord: ignore any ChangeCipherSpec messages under TLS1.3 handshake
Nikos Mavrogiannopoulos [Thu, 22 Feb 2018 15:12:55 +0000 (16:12 +0100)] 
record: ignore any ChangeCipherSpec messages under TLS1.3 handshake

Also send ChangeCipherSpec messages under TLS1.3 handshake.

This is a draft-ietf-tls-tls13-22 change.

Resolves #395

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>