]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
8 years agohandshake: treat reply to HRR as a reply to hello verify request
Nikos Mavrogiannopoulos [Fri, 6 Oct 2017 09:16:17 +0000 (11:16 +0200)] 
handshake: treat reply to HRR as a reply to hello verify request

That is, re-use the client random value on the client hello which
is a reply to a hello retry request.

Relates #299

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added key share behavioral test
Nikos Mavrogiannopoulos [Fri, 6 Oct 2017 08:18:33 +0000 (10:18 +0200)] 
tests: added key share behavioral test

This verifies whether the gnutls_init() flags GNUTLS_KEY_SHARE_TOP,
GNUTLS_KEY_SHARE_TOP2, GNUTLS_KEY_SHARE_TOP3 behave as advertized.

Resolves #284

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agokey share: added flags to gnutls_init() to modify its default behavior
Nikos Mavrogiannopoulos [Fri, 6 Oct 2017 07:05:20 +0000 (09:05 +0200)] 
key share: added flags to gnutls_init() to modify its default behavior

That way the application can adjust the range of keys generated
during client hello attempting to guess the server's algorithm.

Applications are intentionally not given the option to select the
algorithm in the key share, but rather chose from the prioritized
list of groups, to avoid a disconnect between the prioritized
groups, and the key share sent.

Relates #284

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: initialize buffer prior to use
Nikos Mavrogiannopoulos [Thu, 2 Nov 2017 14:40:24 +0000 (15:40 +0100)] 
handshake: initialize buffer prior to use

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added tests for TLS1.2- rollback detection
Nikos Mavrogiannopoulos [Wed, 4 Oct 2017 08:55:48 +0000 (10:55 +0200)] 
tests: added tests for TLS1.2- rollback detection

That is, tests which check
 * whether the server's generated values under TLS1.2- match the expected
 * whether the client would fail on negotiation if the rollback values are detected

Resolves #293

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_set_server_random: corrected TLS1.2 and TLS1.1 rollback detection
Nikos Mavrogiannopoulos [Wed, 4 Oct 2017 08:33:11 +0000 (10:33 +0200)] 
_gnutls_set_server_random: corrected TLS1.2 and TLS1.1 rollback detection

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: renamed _gnutls_hello_ext_*sdata to _gnutls_hello_ext_*priv
Nikos Mavrogiannopoulos [Tue, 3 Oct 2017 09:08:04 +0000 (11:08 +0200)] 
extensions: renamed _gnutls_hello_ext_*sdata to _gnutls_hello_ext_*priv

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoserver_name: use the new API for ext data setting
Nikos Mavrogiannopoulos [Tue, 3 Oct 2017 07:35:52 +0000 (09:35 +0200)] 
server_name: use the new API for ext data setting

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: enhanced extension lib with pack and unpack functions
Nikos Mavrogiannopoulos [Tue, 3 Oct 2017 06:58:59 +0000 (08:58 +0200)] 
extensions: enhanced extension lib with pack and unpack functions

That allows the functionality to be used for the majority of extensions.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: check the correct handling of cookie extension in client side
Nikos Mavrogiannopoulos [Tue, 3 Oct 2017 06:41:51 +0000 (08:41 +0200)] 
tests: check the correct handling of cookie extension in client side

Resolves #218

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: allow receiving and sending extensions which were not advertised by clien...
Nikos Mavrogiannopoulos [Tue, 3 Oct 2017 06:39:58 +0000 (08:39 +0200)] 
extensions: allow receiving and sending extensions which were not advertised by client side

That is needed due to the special treatment of the cookie extension,
which is sent by the server in HRR even if it was not advertised by
the client.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: optimized gid_to_ext_entry() map on known extensions
Nikos Mavrogiannopoulos [Fri, 29 Sep 2017 14:41:09 +0000 (16:41 +0200)] 
extensions: optimized gid_to_ext_entry() map on known extensions

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: avoid double loop when parsing received extensions
Nikos Mavrogiannopoulos [Fri, 29 Sep 2017 14:23:10 +0000 (16:23 +0200)] 
extensions: avoid double loop when parsing received extensions

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: avoid looping to discover location of saved data
Nikos Mavrogiannopoulos [Fri, 29 Sep 2017 13:40:36 +0000 (15:40 +0200)] 
extensions: avoid looping to discover location of saved data

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: added support for reading and sending cookie extension
Nikos Mavrogiannopoulos [Fri, 29 Sep 2017 13:16:04 +0000 (15:16 +0200)] 
handshake: added support for reading and sending cookie extension

That introduces an internal API to associate data to an extension.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: document the GNUTLS_E_NO_COMMON_KEY_SHARE usage
Nikos Mavrogiannopoulos [Mon, 13 Nov 2017 07:45:09 +0000 (08:45 +0100)] 
doc: document the GNUTLS_E_NO_COMMON_KEY_SHARE usage

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: added unit test for hello retry request support
Nikos Mavrogiannopoulos [Fri, 29 Sep 2017 09:58:25 +0000 (11:58 +0200)] 
tests: added unit test for hello retry request support

Resolves #285

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: rehandshake tests were restricted to TLS1.2
Nikos Mavrogiannopoulos [Fri, 29 Sep 2017 12:24:54 +0000 (14:24 +0200)] 
tests: rehandshake tests were restricted to TLS1.2

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: reduce assert printouts in common cases
Nikos Mavrogiannopoulos [Fri, 29 Sep 2017 12:11:34 +0000 (14:11 +0200)] 
handshake: reduce assert printouts in common cases

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: accept hello retry request in client side
Nikos Mavrogiannopoulos [Fri, 29 Sep 2017 08:10:48 +0000 (10:10 +0200)] 
handshake: accept hello retry request in client side

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agobuf: _gnutls_buffer_pop_data made easier to use
Nikos Mavrogiannopoulos [Fri, 29 Sep 2017 07:08:59 +0000 (09:08 +0200)] 
buf: _gnutls_buffer_pop_data made easier to use

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: simplified version parsing
Nikos Mavrogiannopoulos [Fri, 29 Sep 2017 07:01:41 +0000 (09:01 +0200)] 
handshake: simplified version parsing

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: send hello retry request when no key share matches
Nikos Mavrogiannopoulos [Thu, 21 Sep 2017 14:40:43 +0000 (16:40 +0200)] 
handshake: send hello retry request when no key share matches

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoext: do not advertize post handshake authentication
Nikos Mavrogiannopoulos [Fri, 29 Sep 2017 10:54:38 +0000 (12:54 +0200)] 
ext: do not advertize post handshake authentication

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: check TLS1.3 record layer packet modification
Nikos Mavrogiannopoulos [Fri, 29 Sep 2017 06:21:54 +0000 (08:21 +0200)] 
tests: check TLS1.3 record layer packet modification

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: split set_client_random to gen and set
Nikos Mavrogiannopoulos [Thu, 28 Sep 2017 05:50:42 +0000 (07:50 +0200)] 
handshake: split set_client_random to gen and set

This aligns with set_server_random() and gen_server_random().

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agohandshake: only attempt to detect downgrade attacks if TLS1.3 is supported
Nikos Mavrogiannopoulos [Thu, 28 Sep 2017 05:47:40 +0000 (07:47 +0200)] 
handshake: only attempt to detect downgrade attacks if TLS1.3 is supported

Otherwise, connections under TLS 1.2 may fail, even if client never enabled
TLS 1.3 support.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agonettle/pk: explicitly mark intentional fallthrough in switch cases
Nikos Mavrogiannopoulos [Wed, 27 Sep 2017 13:10:07 +0000 (15:10 +0200)] 
nettle/pk: explicitly mark intentional fallthrough in switch cases

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agokey share: removed duplicate message
Nikos Mavrogiannopoulos [Fri, 22 Sep 2017 14:59:31 +0000 (16:59 +0200)] 
key share: removed duplicate message

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: fix warning in rng-sigint.c
Nikos Mavrogiannopoulos [Wed, 27 Sep 2017 06:20:10 +0000 (08:20 +0200)] 
tests: fix warning in rng-sigint.c

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: improved tls-session-supplemental
Nikos Mavrogiannopoulos [Wed, 27 Sep 2017 06:58:26 +0000 (08:58 +0200)] 
tests: improved tls-session-supplemental

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agokx: moved to new buffer API
Nikos Mavrogiannopoulos [Tue, 26 Sep 2017 14:44:39 +0000 (16:44 +0200)] 
kx: moved to new buffer API

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: moved to the new mbuffer API
Nikos Mavrogiannopoulos [Tue, 26 Sep 2017 13:38:58 +0000 (15:38 +0200)] 
handshake: moved to the new mbuffer API

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: use the new buffer type in TLS 1.3
Nikos Mavrogiannopoulos [Tue, 26 Sep 2017 10:54:18 +0000 (12:54 +0200)] 
handshake: use the new buffer type in TLS 1.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: new helper functions to use gnutls_buffer_st to generate mbuffers
Nikos Mavrogiannopoulos [Tue, 26 Sep 2017 09:57:18 +0000 (11:57 +0200)] 
handshake: new helper functions to use gnutls_buffer_st to generate mbuffers

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotlsfuzzer: disable non TLS1.3-ready tests
Nikos Mavrogiannopoulos [Tue, 26 Sep 2017 08:29:15 +0000 (10:29 +0200)] 
tlsfuzzer: disable non TLS1.3-ready tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added tests for TLS1.3 record generation / parsing
Nikos Mavrogiannopoulos [Mon, 25 Sep 2017 14:28:38 +0000 (16:28 +0200)] 
tests: added tests for TLS1.3 record generation / parsing

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: introduced basic TLS1.3 key exchange test suite
Nikos Mavrogiannopoulos [Mon, 25 Sep 2017 07:47:52 +0000 (09:47 +0200)] 
tests: introduced basic TLS1.3 key exchange test suite

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agorecord: adjusted overhead calculation for TLS1.3
Nikos Mavrogiannopoulos [Mon, 25 Sep 2017 14:26:45 +0000 (16:26 +0200)] 
record: adjusted overhead calculation for TLS1.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopriority: include groups into priority when having a TLS1.3-only session
Nikos Mavrogiannopoulos [Mon, 25 Sep 2017 12:49:23 +0000 (14:49 +0200)] 
priority: include groups into priority when having a TLS1.3-only session

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopriority: do include all the version's signature semantics
Nikos Mavrogiannopoulos [Mon, 25 Sep 2017 07:46:32 +0000 (09:46 +0200)] 
priority: do include all the version's signature semantics

This resolves issue, which prevented handling certain types
of TLS1.3-only signatures, depending on the order of enabled
protocols.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoext/key_share: corrected release of MPI parameters
Nikos Mavrogiannopoulos [Mon, 25 Sep 2017 07:32:25 +0000 (09:32 +0200)] 
ext/key_share: corrected release of MPI parameters

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoext/signature: explicitly prevent RSA/DSA and SHA1 signatures on TLS1.3
Nikos Mavrogiannopoulos [Mon, 25 Sep 2017 07:28:45 +0000 (09:28 +0200)] 
ext/signature: explicitly prevent RSA/DSA and SHA1 signatures on TLS1.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohello ext: reduce verbosity
Nikos Mavrogiannopoulos [Fri, 22 Sep 2017 14:55:36 +0000 (16:55 +0200)] 
hello ext: reduce verbosity

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoconstate.h: removed non-existing function
Nikos Mavrogiannopoulos [Fri, 22 Sep 2017 09:10:56 +0000 (11:10 +0200)] 
constate.h: removed non-existing function

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agorecord: any alert is fatal under TLS1.3
Nikos Mavrogiannopoulos [Fri, 22 Sep 2017 08:55:43 +0000 (10:55 +0200)] 
record: any alert is fatal under TLS1.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: introduced functions to obtain currently parsed message
Nikos Mavrogiannopoulos [Mon, 18 Sep 2017 12:49:24 +0000 (14:49 +0200)] 
extensions: introduced functions to obtain currently parsed message

This allows the extension handling code to operate differently
on different messages.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agosupported_versions: print the received versions
Nikos Mavrogiannopoulos [Thu, 21 Sep 2017 07:30:39 +0000 (09:30 +0200)] 
supported_versions: print the received versions

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: introduced server side handshake [2/2]
Nikos Mavrogiannopoulos [Thu, 21 Sep 2017 10:58:51 +0000 (12:58 +0200)] 
handshake: introduced server side handshake [2/2]

That is, send server certificate verify and receive
certificate and certificate verify messages. In addition
introduced flags to mark the expected, or sent messages.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocs: select certificate under TLS1.3
Nikos Mavrogiannopoulos [Thu, 21 Sep 2017 08:21:26 +0000 (10:21 +0200)] 
cs: select certificate under TLS1.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: introduced server side handshake [1/2]
Nikos Mavrogiannopoulos [Thu, 21 Sep 2017 07:53:47 +0000 (09:53 +0200)] 
handshake: introduced server side handshake [1/2]

That is, send certificate request and certificate in server side

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agociphersuites: introduce a maximum supported TLS/DTLS version
Nikos Mavrogiannopoulos [Thu, 21 Sep 2017 07:50:10 +0000 (09:50 +0200)] 
ciphersuites: introduce a maximum supported TLS/DTLS version

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: properly set the default record version
Nikos Mavrogiannopoulos [Thu, 21 Sep 2017 07:41:37 +0000 (09:41 +0200)] 
handshake: properly set the default record version

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: send encrypted extensions handshake message
Nikos Mavrogiannopoulos [Wed, 20 Sep 2017 14:07:39 +0000 (16:07 +0200)] 
handshake: send encrypted extensions handshake message

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: parse new session ticket message
Nikos Mavrogiannopoulos [Fri, 15 Sep 2017 11:54:25 +0000 (13:54 +0200)] 
handshake: parse new session ticket message

That does not include extension handling.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agostr: added _gnutls_buffer_pop_prefix24 and _gnutls_buffer_pop_prefix8
Nikos Mavrogiannopoulos [Wed, 20 Sep 2017 13:33:16 +0000 (15:33 +0200)] 
str: added _gnutls_buffer_pop_prefix24 and _gnutls_buffer_pop_prefix8

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agostr: use assert to mark impossible cases
Nikos Mavrogiannopoulos [Wed, 27 Sep 2017 13:07:04 +0000 (15:07 +0200)] 
str: use assert to mark impossible cases

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agostr: allow creating a read-only buffer
Nikos Mavrogiannopoulos [Wed, 20 Sep 2017 13:21:16 +0000 (15:21 +0200)] 
str: allow creating a read-only buffer

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_session_get_desc: more descriptive name for TLS1.3 ciphersuites
Nikos Mavrogiannopoulos [Wed, 20 Sep 2017 11:43:14 +0000 (13:43 +0200)] 
gnutls_session_get_desc: more descriptive name for TLS1.3 ciphersuites

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: generate application keys
Nikos Mavrogiannopoulos [Fri, 15 Sep 2017 07:11:37 +0000 (09:11 +0200)] 
handshake: generate application keys

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoconstate: added _gnutls_epoch_dup
Nikos Mavrogiannopoulos [Fri, 15 Sep 2017 06:30:52 +0000 (08:30 +0200)] 
constate: added _gnutls_epoch_dup

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoconstate: indentation fixes
Nikos Mavrogiannopoulos [Fri, 15 Sep 2017 05:59:21 +0000 (07:59 +0200)] 
constate: indentation fixes

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: added basic support for TLS 1.3 handshake in client side
Nikos Mavrogiannopoulos [Thu, 14 Sep 2017 08:22:36 +0000 (10:22 +0200)] 
handshake: added basic support for TLS 1.3 handshake in client side

That does not include support for client certificates as it
requires extension handling improvements in order for extensions
to be context sensitive (now they cannot distinguish whether the
parsing routine is called during client hello or certificate request
reading)

This does not include proper parsing of extensions present in
the certificate message.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: added parsing of encrypted extensions
Nikos Mavrogiannopoulos [Wed, 13 Sep 2017 12:19:12 +0000 (14:19 +0200)] 
handshake: added parsing of encrypted extensions

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocrypto-api: introduce internal version of AEAD API
Nikos Mavrogiannopoulos [Mon, 25 Sep 2017 08:44:43 +0000 (10:44 +0200)] 
crypto-api: introduce internal version of AEAD API

This allows to initialize the TLS 1.3 connection state without
additional allocations as required by the external API.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agorecord: added TLS 1.3 record parsing and key derivation
Nikos Mavrogiannopoulos [Fri, 11 Aug 2017 13:16:51 +0000 (15:16 +0200)] 
record: added TLS 1.3 record parsing and key derivation

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: introduced TLS 1.3 handshake client state machine outline
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 11:48:13 +0000 (13:48 +0200)] 
handshake: introduced TLS 1.3 handshake client state machine outline

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: separate the hello extensions from others
Nikos Mavrogiannopoulos [Wed, 20 Sep 2017 09:56:28 +0000 (11:56 +0200)] 
extensions: separate the hello extensions from others

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohello_ext.h: removed non-existant function definition
Nikos Mavrogiannopoulos [Wed, 20 Sep 2017 09:51:10 +0000 (11:51 +0200)] 
hello_ext.h: removed non-existant function definition

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: files renamed to hello_ext
Nikos Mavrogiannopoulos [Wed, 20 Sep 2017 09:48:30 +0000 (11:48 +0200)] 
extensions: files renamed to hello_ext

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: renamed hello extension handling functions appropriately
Nikos Mavrogiannopoulos [Wed, 20 Sep 2017 09:46:55 +0000 (11:46 +0200)] 
extensions: renamed hello extension handling functions appropriately

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: simplified semantics of store and check functions
Nikos Mavrogiannopoulos [Wed, 20 Sep 2017 09:40:54 +0000 (11:40 +0200)] 
extensions: simplified semantics of store and check functions

That is, _gnutls_extension_list_check was made a boolean function,
and both were renamed to more appropriate names such as,
_gnutls_hello_ext_is_present, _gnutls_hello_ext_save.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextension: renamed functions to reflect purpose
Nikos Mavrogiannopoulos [Wed, 20 Sep 2017 09:30:12 +0000 (11:30 +0200)] 
extension: renamed functions to reflect purpose

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: use the low-level extension parsing code for hello parsing
Nikos Mavrogiannopoulos [Wed, 20 Sep 2017 08:05:53 +0000 (10:05 +0200)] 
extensions: use the low-level extension parsing code for hello parsing

That's a step towards unification of TLS-type extension handling
for TLS 1.3.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextv: introduced a low-level extension parsing code
Nikos Mavrogiannopoulos [Wed, 20 Sep 2017 07:46:34 +0000 (09:46 +0200)] 
extv: introduced a low-level extension parsing code

This will simplify the parsing and handling of extensions throughout
the TLS 1.3 message contents.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: simplified the extension tracking
Nikos Mavrogiannopoulos [Tue, 19 Sep 2017 10:58:56 +0000 (12:58 +0200)] 
extensions: simplified the extension tracking

Instead of keep a list of the received TLS extension IDs, use the bits
in a variable to mark the received extensions. That reduces the
overall memory usage due to extension tracking.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: use an internal extension ID independent of the TLS id
Nikos Mavrogiannopoulos [Tue, 19 Sep 2017 10:48:14 +0000 (12:48 +0200)] 
extensions: use an internal extension ID independent of the TLS id

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agostr: rename _gnutls_buffer_pop_prefix to _gnutls_buffer_pop_prefix32
Nikos Mavrogiannopoulos [Fri, 15 Sep 2017 12:46:13 +0000 (14:46 +0200)] 
str: rename _gnutls_buffer_pop_prefix to _gnutls_buffer_pop_prefix32

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agostr: rename _gnutls_buffer_pop_datum_prefix to _gnutls_buffer_pop_datum_prefix32
Nikos Mavrogiannopoulos [Fri, 15 Sep 2017 12:45:20 +0000 (14:45 +0200)] 
str: rename _gnutls_buffer_pop_datum_prefix to _gnutls_buffer_pop_datum_prefix32

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agosecurity params: store PRF when packing session
Nikos Mavrogiannopoulos [Thu, 14 Sep 2017 12:10:14 +0000 (14:10 +0200)] 
security params: store PRF when packing session

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: simplify by storing a pointer to PRF mac entry
Nikos Mavrogiannopoulos [Thu, 14 Sep 2017 12:03:43 +0000 (14:03 +0200)] 
handshake: simplify by storing a pointer to PRF mac entry

That way, we avoid multiple function calls to obtain information
such as hash size, and other MAC properties.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoext/signature: improved TLS 1.3 signature algorithm negotiation
Nikos Mavrogiannopoulos [Thu, 14 Sep 2017 10:13:09 +0000 (12:13 +0200)] 
ext/signature: improved TLS 1.3 signature algorithm negotiation

That is, we introduce a simpler way to handle multiple versions
of a single signature algorithm.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agostr: added helper functions to read prefixed data with 8 or 16-bit headers
Nikos Mavrogiannopoulos [Thu, 14 Sep 2017 09:21:51 +0000 (11:21 +0200)] 
str: added helper functions to read prefixed data with 8 or 16-bit headers

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoecc: do not warn on receiving extension on client side
Nikos Mavrogiannopoulos [Thu, 14 Sep 2017 07:44:58 +0000 (09:44 +0200)] 
ecc: do not warn on receiving extension on client side

This extension can be received used under TLS 1.3 on the client side.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoAdded TLS 1.3 HKDF key derivation functionality
Nikos Mavrogiannopoulos [Mon, 14 Aug 2017 12:30:07 +0000 (14:30 +0200)] 
Added TLS 1.3 HKDF key derivation functionality

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: include extension number in debugging message
Nikos Mavrogiannopoulos [Tue, 12 Sep 2017 08:30:59 +0000 (10:30 +0200)] 
extensions: include extension number in debugging message

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: check behavior on the extension hello flags
Nikos Mavrogiannopoulos [Tue, 12 Sep 2017 08:12:41 +0000 (10:12 +0200)] 
tests: check behavior on the extension hello flags

That is, verify whether the various combinations of
GNUTLS_EXT_FLAG_CLIENT_HELLO,
GNUTLS_EXT_FLAG_TLS12_SERVER_HELLO,
GNUTLS_EXT_FLAG_TLS13_SERVER_HELLO
work as expected with regards to sending and receiving
extensions.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoextensions: apply extension msg type restrictions
Nikos Mavrogiannopoulos [Mon, 11 Sep 2017 08:26:44 +0000 (10:26 +0200)] 
extensions: apply extension msg type restrictions

That is, on the extension parsing functions ensure that
no extension which are not valid for the currently
received message are parsed.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoextensions: mark the message validity of each supported extension
Nikos Mavrogiannopoulos [Mon, 11 Sep 2017 08:13:07 +0000 (10:13 +0200)] 
extensions: mark the message validity of each supported extension

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoextensions: type renamed to id for clarity
Nikos Mavrogiannopoulos [Mon, 11 Sep 2017 07:50:58 +0000 (09:50 +0200)] 
extensions: type renamed to id for clarity

We were previously using the variable named 'type' to indicate the
extension ID. With TLS 1.3, extensions are also given an applicability
type (which message the extension applies to), and thus renamed the
variable for clarity.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: guile: don't use VERS-TLS-ALL
Nikos Mavrogiannopoulos [Tue, 12 Sep 2017 06:03:59 +0000 (08:03 +0200)] 
tests: guile: don't use VERS-TLS-ALL

That is, avoid enabling experimental protocols.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago.gitlab-ci.yml: abi-coverage: include guile logs
Nikos Mavrogiannopoulos [Tue, 12 Sep 2017 06:00:00 +0000 (08:00 +0200)] 
.gitlab-ci.yml: abi-coverage: include guile logs

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agonettle: added HKDF functions
Nikos Mavrogiannopoulos [Mon, 14 Aug 2017 07:20:25 +0000 (09:20 +0200)] 
nettle: added HKDF functions

They are being included conditionally depending on the RSA-PSS feature
(RSA-PSS and HKDF are expected to be introduced at the same version).

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-cli-debug: use explicit TLS versions rather than TLS-ALL
Nikos Mavrogiannopoulos [Mon, 11 Sep 2017 13:54:40 +0000 (15:54 +0200)] 
gnutls-cli-debug: use explicit TLS versions rather than TLS-ALL

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_server_select_suite: don't set auth callbacks for TLS 1.3
Nikos Mavrogiannopoulos [Tue, 15 Aug 2017 13:37:04 +0000 (15:37 +0200)] 
_gnutls_server_select_suite: don't set auth callbacks for TLS 1.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agosupported_versions: print negotiated protocol
Nikos Mavrogiannopoulos [Tue, 15 Aug 2017 09:00:27 +0000 (11:00 +0200)] 
supported_versions: print negotiated protocol

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoNegotiate draft-TLS1.3
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 13:35:21 +0000 (15:35 +0200)] 
Negotiate draft-TLS1.3

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: added the TLS 1.3 ciphersuites
Nikos Mavrogiannopoulos [Tue, 18 Jul 2017 12:14:58 +0000 (14:14 +0200)] 
handshake: added the TLS 1.3 ciphersuites

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agohandshake: print negotiated version after its negotiation (for TLS1.3)
Nikos Mavrogiannopoulos [Mon, 11 Sep 2017 09:45:39 +0000 (11:45 +0200)] 
handshake: print negotiated version after its negotiation (for TLS1.3)

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: fix TLS version to 1.2 for tests which used VERS-TLS-ALL
Nikos Mavrogiannopoulos [Mon, 11 Sep 2017 09:33:31 +0000 (11:33 +0200)] 
tests: fix TLS version to 1.2 for tests which used VERS-TLS-ALL

This allows the test suite to run, even when TLS1.3 is still
experimental.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>