]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
7 years agoMake tlsproxy/buffer.c compilable by gcc 4.4.7
Tim Rühsen [Wed, 26 Sep 2018 10:54:37 +0000 (12:54 +0200)] 
Make tlsproxy/buffer.c compilable by gcc 4.4.7

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years ago_gnutls_check_key_purpose: eliminated dead code
Nikos Mavrogiannopoulos [Wed, 26 Sep 2018 07:38:04 +0000 (09:38 +0200)] 
_gnutls_check_key_purpose: eliminated dead code

Resolves #573

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agomanpages: do not generate any manpages for openpgp.h
Nikos Mavrogiannopoulos [Tue, 25 Sep 2018 11:52:25 +0000 (13:52 +0200)] 
manpages: do not generate any manpages for openpgp.h

This API is no longer functional and is only available as stubs
for backwards binary compatibility.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agomanpage generation: cleanup
Nikos Mavrogiannopoulos [Tue, 25 Sep 2018 11:06:57 +0000 (13:06 +0200)] 
manpage generation: cleanup

Recognize parameters of the form unsigned char name[8], and
do not print obscure warnings. Furthermore gdoc will fail
when a function parameter is not described or when no
function is found. This addresses the generation of undetected
errors in generated manpages.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agodoc: fixed missing function and enumeration parameters
Nikos Mavrogiannopoulos [Tue, 25 Sep 2018 10:07:10 +0000 (12:07 +0200)] 
doc: fixed missing function and enumeration parameters

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agotests: removed unused file
Nikos Mavrogiannopoulos [Tue, 25 Sep 2018 12:12:26 +0000 (14:12 +0200)] 
tests: removed unused file

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-fix-mech-list-generation' into 'master'
Dmitry Eremin-Solenikov [Wed, 26 Sep 2018 10:03:06 +0000 (10:03 +0000)] 
Merge branch 'tmp-fix-mech-list-generation' into 'master'

mech-list.h: generate unique entries

See merge request gnutls/gnutls!761

7 years agomech-list.h: generate unique entries
Nikos Mavrogiannopoulos [Tue, 25 Sep 2018 16:10:12 +0000 (18:10 +0200)] 
mech-list.h: generate unique entries

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoreleased 3.6.4 gnutls_3_6_4
Nikos Mavrogiannopoulos [Mon, 24 Sep 2018 15:33:03 +0000 (17:33 +0200)] 
released 3.6.4

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agotests: pkcs12-utf8 depend on bash
Nikos Mavrogiannopoulos [Fri, 21 Sep 2018 14:31:58 +0000 (16:31 +0200)] 
tests: pkcs12-utf8 depend on bash

The NetBSD default shell cannot handle the UTF-8 strings we use
in that script.

Resolves #544

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agobumped versions and updated NEWS file
Nikos Mavrogiannopoulos [Fri, 21 Sep 2018 14:20:36 +0000 (16:20 +0200)] 
bumped versions and updated NEWS file

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoEnable the TLS1.3 protocol by default
Nikos Mavrogiannopoulos [Fri, 21 Sep 2018 14:18:23 +0000 (16:18 +0200)] 
Enable the TLS1.3 protocol by default

As the protocol has been finalized, and the implementation is
stable and interoperable, there is no need to enable it conditionally.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-pkcs11-lax-search' into 'master'
Nikos Mavrogiannopoulos [Mon, 24 Sep 2018 10:44:39 +0000 (10:44 +0000)] 
Merge branch 'tmp-pkcs11-lax-search' into 'master'

Provide a less restrictive PKCS#11 search of certificates

Closes #569

See merge request gnutls/gnutls!757

7 years agoMerge branch 'tmp-be-strict-on-crls' into 'master'
Nikos Mavrogiannopoulos [Fri, 21 Sep 2018 12:36:09 +0000 (12:36 +0000)] 
Merge branch 'tmp-be-strict-on-crls' into 'master'

gnutls-cli enables CRL validation on startup

Closes #564

See merge request gnutls/gnutls!752

7 years agoMerge branch 'tmp-session-ticket-key-rotation-ajuaristi' into 'master'
Nikos Mavrogiannopoulos [Fri, 21 Sep 2018 11:29:18 +0000 (11:29 +0000)] 
Merge branch 'tmp-session-ticket-key-rotation-ajuaristi' into 'master'

Session ticket key rotation with TOTP

Closes #184

See merge request gnutls/gnutls!695

7 years agognutls-cli: enable CRL validation on startup
Nikos Mavrogiannopoulos [Tue, 18 Sep 2018 06:36:18 +0000 (08:36 +0200)] 
gnutls-cli: enable CRL validation on startup

This also makes the failure in adding CRLs or CAs, a fatal error.

Resolves #564

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoProvide a more flexible PKCS#11 search of trust store certificates
Nikos Mavrogiannopoulos [Thu, 20 Sep 2018 14:44:51 +0000 (16:44 +0200)] 
Provide a more flexible PKCS#11 search of trust store certificates

This addresses the problem where the CA certificate doesn't
have a subject key identifier whereas the end certificates
have an authority key identifier.

Resolves #569

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agotrust list: added flag to force failure on CRL validation error
Nikos Mavrogiannopoulos [Tue, 18 Sep 2018 06:35:32 +0000 (08:35 +0200)] 
trust list: added flag to force failure on CRL validation error

This allows an application to be notified of the addition of invalid
CRLs in the trust list.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-rm-mech-list' into 'master'
Nikos Mavrogiannopoulos [Thu, 20 Sep 2018 17:26:34 +0000 (17:26 +0000)] 
Merge branch 'tmp-rm-mech-list' into 'master'

Remove auto-generated src/mech-list.h from repo

See merge request gnutls/gnutls!753

7 years agoRemove auto-generated src/mech-list.h from repo
Tim Rühsen [Tue, 18 Sep 2018 09:50:43 +0000 (11:50 +0200)] 
Remove auto-generated src/mech-list.h from repo

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-res-prio' into 'master'
Nikos Mavrogiannopoulos [Thu, 20 Sep 2018 14:29:52 +0000 (14:29 +0000)] 
Merge branch 'tmp-res-prio' into 'master'

Fix issue introduced in 20886264fe

See merge request gnutls/gnutls!756

7 years agoFix issue introduced in 20886264fe
Tim Rühsen [Tue, 18 Sep 2018 13:35:20 +0000 (15:35 +0200)] 
Fix issue introduced in 20886264fe

This makes _gnutls_resolve_priorities() return a string that is always
allocated with the gnutls memory functions.

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agosession tickets: check timestamp for validity
Nikos Mavrogiannopoulos [Wed, 19 Sep 2018 12:15:20 +0000 (14:15 +0200)] 
session tickets: check timestamp for validity

We were previously only relying on the client's view of the
ticket lifetime for TLS1.3 tickets. This makes sure that we
only resume tickets that the server considers valid and consolidates
the expiration time checks to _gnutls_check_resumed_params().

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoECC export/import: updated documentation on EdDSA curves
Nikos Mavrogiannopoulos [Thu, 20 Sep 2018 08:11:42 +0000 (10:11 +0200)] 
ECC export/import: updated documentation on EdDSA curves

This clarifies the format that parameters in the EdDSA curves
will be returned, and also ensures that the import/export
functions fail on unsupported curves.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'gost-endianness' into 'master'
Nikos Mavrogiannopoulos [Thu, 20 Sep 2018 07:53:15 +0000 (07:53 +0000)] 
Merge branch 'gost-endianness' into 'master'

GOST endianness

See merge request gnutls/gnutls!755

7 years agotests: use virt-time.h in resumption tests
Nikos Mavrogiannopoulos [Wed, 19 Sep 2018 13:03:32 +0000 (15:03 +0200)] 
tests: use virt-time.h in resumption tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoAdded session ticket key rotation with TOTP
Ander Juaristi [Tue, 18 Sep 2018 07:40:20 +0000 (09:40 +0200)] 
Added session ticket key rotation with TOTP

This introduces session ticket key rotation on server side. The
key set with gnutls_session_ticket_enable_server() is used as a
master key to generate time-based keys for tickets. The rotation
relates to the gnutls_db_set_cache_expiration() period.

Resolves #184

Signed-off-by: Ander Juaristi <a@juaristi.eus>
7 years agocerttool: print GOST public key with MSB first
Dmitry Eremin-Solenikov [Tue, 18 Sep 2018 00:05:51 +0000 (03:05 +0300)] 
certtool: print GOST public key with MSB first

OpenSSL and other libraries print MSB first, when printing GOST public
keys. Let's return to this convention.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agox509: print_pubkey: print GOST public key with MSB first
Dmitry Eremin-Solenikov [Tue, 18 Sep 2018 00:05:51 +0000 (03:05 +0300)] 
x509: print_pubkey: print GOST public key with MSB first

OpenSSL and other libraries print MSB first, when printing GOST public
keys. Let's return to this convention.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agolib: use little endian when importing/exporting GOST keys
Dmitry Eremin-Solenikov [Mon, 17 Sep 2018 21:53:17 +0000 (00:53 +0300)] 
lib: use little endian when importing/exporting GOST keys

GOST R 34.10 native format is little endian. It is better for the
application code to use native format data to interface library, rather
than convert buffers on their own.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agompi: add function to dprint mpi in little endianness
Dmitry Eremin-Solenikov [Mon, 17 Sep 2018 21:51:05 +0000 (00:51 +0300)] 
mpi: add function to dprint mpi in little endianness

Add little endian counterpart to _gnutls_mpi_dprint and
_gnutls_mpi_dprint_le.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agoMerge branch 'fix-gost-docs' into 'master'
Dmitry Eremin-Solenikov [Tue, 18 Sep 2018 12:02:24 +0000 (12:02 +0000)] 
Merge branch 'fix-gost-docs' into 'master'

gnutls.h: correct GOST R number references

See merge request gnutls/gnutls!750

7 years agognutls.h: correct GOST R number references [ci skip]
Dmitry Eremin-Solenikov [Mon, 17 Sep 2018 09:26:31 +0000 (12:26 +0300)] 
gnutls.h: correct GOST R number references [ci skip]

Fix numeric GOST R ids used in documentation, too many numbers:
 - GOST R 34.11 is digest function
 - GOST R 34.10-2001 is a digital signature over GOST R 34.11-94 digest
 - GOST R 34.10-2012 is a digital signature over GOST R 34.11-2012 digest

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agoUpdate git submodules via ./bootstrap
Tim Rühsen [Mon, 17 Sep 2018 08:12:38 +0000 (10:12 +0200)] 
Update git submodules via ./bootstrap

Setting $SUBMODULE_NOFETCH to a non-empty value adds
--no-fetch to the git command (for CI speedup).

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agotests: pkcs1-pad: run with SHA-1 enabled or disabled
Nikos Mavrogiannopoulos [Mon, 17 Sep 2018 13:14:12 +0000 (15:14 +0200)] 
tests: pkcs1-pad: run with SHA-1 enabled or disabled

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years ago.gitlab-ci.yml: enable run with SHA-1 enabled
Nikos Mavrogiannopoulos [Mon, 17 Sep 2018 10:58:38 +0000 (12:58 +0200)] 
.gitlab-ci.yml: enable run with SHA-1 enabled

This adds a CI run with SHA-1 enabled, and corrects issues in the
testsuite when that's the case.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agognutls_x509_trust_list_add_trust_mem: fix behavior with unaccounted certs
Nikos Mavrogiannopoulos [Mon, 17 Sep 2018 07:28:08 +0000 (09:28 +0200)] 
gnutls_x509_trust_list_add_trust_mem: fix behavior with unaccounted certs

If gnutls_x509_trust_list_add_cas returns less than clist_size, the additional
unaccounted certificates will never be freed.

Relates #552

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agognutls_x509_trust_list_add_cas: corrected return value
Nikos Mavrogiannopoulos [Mon, 17 Sep 2018 07:12:29 +0000 (09:12 +0200)] 
gnutls_x509_trust_list_add_cas: corrected return value

When the flag GNUTLS_TL_USE_IN_TLS is used and add_new_ca_to_rdn_seq
the return value did not include the last certificate added to the
list. This corrects its return value.

Relates #552

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agofixed documentation in trust list functions
Nikos Mavrogiannopoulos [Mon, 17 Sep 2018 07:10:24 +0000 (09:10 +0200)] 
fixed documentation in trust list functions

That clarifies and addresses issues in the documentation of
gnutls_x509_trust_list_add_crls() and gnutls_x509_trust_list_add_cas()

Relates #552

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-crl' into 'master'
Nikos Mavrogiannopoulos [Mon, 17 Sep 2018 09:02:46 +0000 (09:02 +0000)] 
Merge branch 'tmp-crl' into 'master'

certtool: crl handling updates

See merge request gnutls/gnutls!747

7 years agotests: added CRL verification tests
Nikos Mavrogiannopoulos [Sun, 16 Sep 2018 13:54:41 +0000 (15:54 +0200)] 
tests: added CRL verification tests

This tests CRL verification with certtool --verify-crl on correct
and incorrect cases.

Relates #564

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agocerttool: updates in documentation in messages for CRL generation
Nikos Mavrogiannopoulos [Sun, 16 Sep 2018 13:35:19 +0000 (15:35 +0200)] 
certtool: updates in documentation in messages for CRL generation

This fixes the messages printed for the generation of a CRL, and
makes the return code of the CRL verification depending on the
verification result.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoFix variable used in reallocation
Nikos Mavrogiannopoulos [Fri, 14 Sep 2018 14:32:05 +0000 (16:32 +0200)] 
Fix variable used in reallocation

This corrects the variable name used in the sizeof argument
for realloc. This does not alter the actual allocation size,
but rather it fixes a logic error.

Relates: #554

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years ago.gitignore: updated
Nikos Mavrogiannopoulos [Wed, 22 Aug 2018 13:25:06 +0000 (15:25 +0200)] 
.gitignore: updated

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agodtls: recover when a NewSessionTicket message is lost
Nikos Mavrogiannopoulos [Wed, 22 Aug 2018 08:08:41 +0000 (10:08 +0200)] 
dtls: recover when a NewSessionTicket message is lost

When the server's NewSessionTicket gets lost while the ChangeCipherSpec
goes through, the client did not request retransmission by retransmitting
his last flight, and the handshake was blocked. This commit addresses
the issue and adds a reproducer.

Resolves #543

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agotlsfuzzer: remove duplicate tests and sort them alphabetically
Daiki Ueno [Mon, 27 Aug 2018 15:44:35 +0000 (17:44 +0200)] 
tlsfuzzer: remove duplicate tests and sort them alphabetically

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agodoc: fix reference to invocation nodes
Andreas Schwab [Mon, 10 Sep 2018 15:35:08 +0000 (17:35 +0200)] 
doc: fix reference to invocation nodes

Signed-off-by: Andreas Schwab <schwab@suse.de>
7 years agopriority: be backwards compatible with priority strings starting with NONE
Nikos Mavrogiannopoulos [Mon, 20 Aug 2018 13:17:04 +0000 (15:17 +0200)] 
priority: be backwards compatible with priority strings starting with NONE

That is, we allow priority strings which do not enable any groups to
work, by disabling TLS1.3. For example
'NONE:+VERS-TLS-ALL:+MAC-ALL:+RSA:+AES-128-GCM:+SIGN-ALL:+COMP-NULL'
is still operational, but no TLS1.3 is enabled when specified.

Resolves: #549

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-strdup' into 'master'
Tim Rühsen [Thu, 30 Aug 2018 08:15:03 +0000 (08:15 +0000)] 
Merge branch 'tmp-strdup' into 'master'

Use gnutls_strdup() in library code

See merge request gnutls/gnutls!742

7 years agoUse gnutls_strdup() instead of strdup() in library code
Tim Rühsen [Fri, 24 Aug 2018 14:34:14 +0000 (16:34 +0200)] 
Use gnutls_strdup() instead of strdup() in library code

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoRemove gnulib work-around '#undef strdup'
Tim Rühsen [Fri, 24 Aug 2018 14:27:36 +0000 (16:27 +0200)] 
Remove gnulib work-around '#undef strdup'

The 'issue' should be fixed already. Even if not, it has to
addressed in gnulib.

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-psk-ext-refactor' into 'master'
Daiki Ueno [Thu, 23 Aug 2018 14:19:17 +0000 (14:19 +0000)] 
Merge branch 'tmp-psk-ext-refactor' into 'master'

tls13/psk_ext_parser: simplify the iterator interface

See merge request gnutls/gnutls!736

7 years agoext/pre_shared_key: use consistent name for regitration entry
Daiki Ueno [Tue, 21 Aug 2018 13:02:56 +0000 (15:02 +0200)] 
ext/pre_shared_key: use consistent name for regitration entry

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoext/pre_shared_key: make ticket age calculation consistent
Daiki Ueno [Tue, 21 Aug 2018 12:54:41 +0000 (14:54 +0200)] 
ext/pre_shared_key: make ticket age calculation consistent

Previously we used a pattern like this:

  uint32_t obfuscated_ticket_age, ticket_age_add;
  time_t ticket_age;

  ticket_age = obfuscated_ticket_age - ticket_age_add;
  if (ticket_age < 0) {
   ...
  }

This always evaluates to false, because subtraction between unsigned
integers yields an unsigned integer.  Let's do the comparison before
subtraction and also use correct types for representing time: uint32_t
for protocol time and time_t for system time.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agotls13/psk_ext_parser: simplify the iterator interface
Daiki Ueno [Fri, 17 Aug 2018 13:45:20 +0000 (15:45 +0200)] 
tls13/psk_ext_parser: simplify the iterator interface

Previously it was unclear whether psk_ext_parser_st is stateful or
not.  This change introduces the simpler API to iterate over the
immutable data (psk_ext_parser_st), following the iterator pattern.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agognutls-cli-debug: mention RFC8446 for TLS1.3 and RFC8422 for X25519
Nikos Mavrogiannopoulos [Tue, 21 Aug 2018 14:18:11 +0000 (16:18 +0200)] 
gnutls-cli-debug: mention RFC8446 for TLS1.3 and RFC8422 for X25519

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-gnulib-use-git' into 'master'
Nikos Mavrogiannopoulos [Wed, 22 Aug 2018 04:04:51 +0000 (04:04 +0000)] 
Merge branch 'tmp-gnulib-use-git' into 'master'

Remove --no-git from ./bootstrap

See merge request gnutls/gnutls!739

7 years agoRemove --no-git from ./bootstrap [ci skip]
Tim Rühsen [Tue, 21 Aug 2018 11:10:48 +0000 (13:10 +0200)] 
Remove --no-git from ./bootstrap [ci skip]

This removes the --no-git option as bootstrap itself does not use
the remote repository for cloning. At least as long $GNULIB_SRCDIR
points to a recent enough local gnulib git repo.

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-update-version-numbers' into 'master'
Nikos Mavrogiannopoulos [Tue, 21 Aug 2018 14:01:45 +0000 (14:01 +0000)] 
Merge branch 'tmp-update-version-numbers' into 'master'

Update library to use the final RFC8446 version numbers

Closes #542 and #359

See merge request gnutls/gnutls!730

7 years agohandshake: do not negotiate TLS1.3 using the legacy version field
Nikos Mavrogiannopoulos [Fri, 17 Aug 2018 12:02:34 +0000 (14:02 +0200)] 
handshake: do not negotiate TLS1.3 using the legacy version field

Previously we could end-up with a TLS1.3 connection if the TLS1.3
ID was seen on the wire. We now explicitly fallback to TLS1.2
when we see a protocol with TLS1.3 semantics in an SSL2.0 or
in the legacy version of the client hello.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agohandshake: simplified protocol version checking functions
Nikos Mavrogiannopoulos [Fri, 17 Aug 2018 10:57:25 +0000 (12:57 +0200)] 
handshake: simplified protocol version checking functions

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agotlsfuzzer: modify to use the final code points
Nikos Mavrogiannopoulos [Fri, 17 Aug 2018 08:50:15 +0000 (10:50 +0200)] 
tlsfuzzer: modify to use the final code points

Relates #542

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agofuzz: updated traces for final TLS1.3 version
Nikos Mavrogiannopoulos [Mon, 13 Aug 2018 18:55:50 +0000 (20:55 +0200)] 
fuzz: updated traces for final TLS1.3 version

Resolves #359

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoprotocols: bumped TLS1.3 version number to RFC8446 value
Nikos Mavrogiannopoulos [Mon, 13 Aug 2018 18:46:21 +0000 (20:46 +0200)] 
protocols: bumped TLS1.3 version number to RFC8446 value

This adds support of the final RFC numbers.

Resolves #542

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'rfc7250_cert-types' into 'master'
Nikos Mavrogiannopoulos [Mon, 20 Aug 2018 19:20:12 +0000 (19:20 +0000)] 
Merge branch 'rfc7250_cert-types' into 'master'

RFC7250 certificate type negotiation

See merge request gnutls/gnutls!498

7 years agoImplemented RFC7250 certificate type negotiation extensions.
Tom Vrancken [Wed, 15 Aug 2018 16:29:32 +0000 (18:29 +0200)] 
Implemented RFC7250 certificate type negotiation extensions.

Signed-off-by: Tom Vrancken <dev@tomvrancken.nl>
7 years agoMerge branch 'tmp-record-size-limit' into 'master'
Daiki Ueno [Mon, 20 Aug 2018 13:17:35 +0000 (13:17 +0000)] 
Merge branch 'tmp-record-size-limit' into 'master'

record_size_limit extension

Closes #524

See merge request gnutls/gnutls!733

7 years agoext/record_size_limit: new extension
Daiki Ueno [Fri, 10 Aug 2018 12:06:16 +0000 (14:06 +0200)] 
ext/record_size_limit: new extension

This implements the record_size_limit extension as defined in RFC 8449.

Although it obsoletes the max_record_size extension, for compatibility
reasons GnuTLS still sends it on certain occasions.  For example, when
the new size is representable as the codepoint defined for
max_record_size.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoext/max_record: remove use of extension private data
Daiki Ueno [Tue, 14 Aug 2018 14:46:12 +0000 (16:46 +0200)] 
ext/max_record: remove use of extension private data

As the extension data is always stored in
session->security_parameters.max_record_send_size, it shouldn't be
necessary to track it with the private data.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoMerge branch 'tmp-fix-resumption-requested' into 'master'
Nikos Mavrogiannopoulos [Mon, 20 Aug 2018 09:52:47 +0000 (09:52 +0000)] 
Merge branch 'tmp-fix-resumption-requested' into 'master'

Fix gnutls_session_resumption_requested

Closes #546

See merge request gnutls/gnutls!735

7 years agognutls_session_resumption_requested: fixed behavior under TLS1.3
Nikos Mavrogiannopoulos [Fri, 17 Aug 2018 12:43:30 +0000 (14:43 +0200)] 
gnutls_session_resumption_requested: fixed behavior under TLS1.3

This makes gnutls_session_resumption_requested() functional under
TLS1.3 and introduces a unit test of the function.

Resolves #546

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-no-git-in-bootstrap' into 'master'
Tim Rühsen [Mon, 20 Aug 2018 07:22:24 +0000 (07:22 +0000)] 
Merge branch 'tmp-no-git-in-bootstrap' into 'master'

.gitlab-ci.yml: use --no-git to bootstrap

Closes #547

See merge request gnutls/gnutls!737

7 years ago.gitlab-ci.yml: use --no-git to bootstrap
Nikos Mavrogiannopoulos [Sun, 19 Aug 2018 16:59:02 +0000 (18:59 +0200)] 
.gitlab-ci.yml: use --no-git to bootstrap

That is, to reduce CI time, and avoid failures due to
non-availability of the gnulib git repo.

Resolves #547

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agohello_ext: removed bogus comment
Nikos Mavrogiannopoulos [Fri, 17 Aug 2018 12:48:56 +0000 (14:48 +0200)] 
hello_ext: removed bogus comment

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years ago.gitmodules: gnulib submodule is now synced from libidn's mirror
Nikos Mavrogiannopoulos [Fri, 17 Aug 2018 14:08:37 +0000 (16:08 +0200)] 
.gitmodules: gnulib submodule is now synced from libidn's mirror

This mirror is updated hourly and is hosted on gitlab, meaning
less dependency on external sites downtime.

Resolves: #547

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-ametzler-typo-guarranteed_overriden' into 'master'
Tim Rühsen [Sat, 18 Aug 2018 08:22:21 +0000 (08:22 +0000)] 
Merge branch 'tmp-ametzler-typo-guarranteed_overriden' into 'master'

Fix two typos (overriden/guarranteed)

See merge request gnutls/gnutls!734

7 years agoFix two typos (overriden/guarranteed)
Andreas Metzler [Wed, 15 Aug 2018 12:20:43 +0000 (14:20 +0200)] 
Fix two typos (overriden/guarranteed)

Signed-off-by: Andreas Metzler <ametzler@bebt.de>
7 years agoMerge branch 'tmp-document-none' into 'master'
Nikos Mavrogiannopoulos [Wed, 15 Aug 2018 08:07:02 +0000 (08:07 +0000)] 
Merge branch 'tmp-document-none' into 'master'

doc: document the non-portability of NONE priority string

See merge request gnutls/gnutls!731

7 years agodoc: document the non-portability of NONE priority string
Nikos Mavrogiannopoulos [Mon, 13 Aug 2018 19:47:53 +0000 (21:47 +0200)] 
doc: document the non-portability of NONE priority string

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-fixes-cov' into 'master'
Nikos Mavrogiannopoulos [Tue, 14 Aug 2018 12:40:03 +0000 (12:40 +0000)] 
Merge branch 'tmp-fixes-cov' into 'master'

Fixes for issues identified by static analyzers

Closes #518

See merge request gnutls/gnutls!729

7 years agotools: check output of called functions
Nikos Mavrogiannopoulos [Mon, 13 Aug 2018 18:22:48 +0000 (20:22 +0200)] 
tools: check output of called functions

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agowrite_oid_and_params: moved nullity check of params earlier
Nikos Mavrogiannopoulos [Mon, 13 Aug 2018 18:19:55 +0000 (20:19 +0200)] 
write_oid_and_params: moved nullity check of params earlier

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agognutls_session_set_premaster: corrected error checks
Nikos Mavrogiannopoulos [Thu, 9 Aug 2018 14:13:50 +0000 (16:13 +0200)] 
gnutls_session_set_premaster: corrected error checks

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agopubkey_verify_hashed_data: apply algorithm checks
Nikos Mavrogiannopoulos [Thu, 9 Aug 2018 14:12:36 +0000 (16:12 +0200)] 
pubkey_verify_hashed_data: apply algorithm checks

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoprivkey_sign_raw_data: use assert to mark code which always succeeds
Nikos Mavrogiannopoulos [Thu, 9 Aug 2018 14:09:21 +0000 (16:09 +0200)] 
privkey_sign_raw_data: use assert to mark code which always succeeds

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years ago_gnutls_send_change_cipher_spec: removed unnecessary test
Nikos Mavrogiannopoulos [Thu, 9 Aug 2018 14:05:47 +0000 (16:05 +0200)] 
_gnutls_send_change_cipher_spec: removed unnecessary test

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years ago.travis.yml: do not run brew upgrade
Nikos Mavrogiannopoulos [Mon, 13 Aug 2018 19:04:56 +0000 (21:04 +0200)] 
.travis.yml: do not run brew upgrade

This addresses issue with travis compilation on MacOSX.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoMerge branch 'tmp-use-explicit-bzero' into 'master'
Nikos Mavrogiannopoulos [Wed, 8 Aug 2018 16:30:38 +0000 (16:30 +0000)] 
Merge branch 'tmp-use-explicit-bzero' into 'master'

gnutls_memset: use explicit_bzero

Closes #230

See merge request gnutls/gnutls!728

8 years agognutls_memset: use explicit_bzero
Nikos Mavrogiannopoulos [Tue, 7 Aug 2018 14:27:19 +0000 (16:27 +0200)] 
gnutls_memset: use explicit_bzero

That is, use the glibc function when available and the second
parameter is zero.

Resolves #230

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'tmp-consistent-falltrough' into 'master'
Nikos Mavrogiannopoulos [Wed, 8 Aug 2018 14:22:08 +0000 (14:22 +0000)] 
Merge branch 'tmp-consistent-falltrough' into 'master'

use a consistent method to mark fall-through in switch cases

Closes #306

See merge request gnutls/gnutls!726

8 years agouse a consistent method to mark fall-through in switch cases
Nikos Mavrogiannopoulos [Tue, 7 Aug 2018 07:52:55 +0000 (09:52 +0200)] 
use a consistent method to mark fall-through in switch cases

Also document that method in contribution guide.

Resolves #306

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoMerge branch 'tmp-tlsfuzzer-update-tls13' into 'master'
Daiki Ueno [Wed, 8 Aug 2018 11:58:14 +0000 (11:58 +0000)] 
Merge branch 'tmp-tlsfuzzer-update-tls13' into 'master'

tlsfuzzer: update to the latest version to enable more TLS 1.3 tests

Closes #537

See merge request gnutls/gnutls!727

8 years agoext/pre_shared_key: prevent crash if no server credentials are set
Daiki Ueno [Tue, 7 Aug 2018 12:45:07 +0000 (14:45 +0200)] 
ext/pre_shared_key: prevent crash if no server credentials are set

Previously, if server is configured without PSK credentials and the
client authenticated with PSK, the server crashed with:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b190ba in server_recv_params (session=0x636fc0, data=0x634e6e "",
    len=46, pskcred=0x0) at pre_shared_key.c:523
523                             prf = pskcred->binder_algo;

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agotlsfuzzer: update to the latest version
Daiki Ueno [Tue, 7 Aug 2018 11:21:16 +0000 (13:21 +0200)] 
tlsfuzzer: update to the latest version

Also enable test-tls13-ffdhe-sanity.py,
test-tls13-session-resumption.py, and
test-tls13-unrecognised-groups.py.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agoalert: map GNUTLS_E_NO_COMMON_KEY_SHARE to handshake_failure
Daiki Ueno [Tue, 7 Aug 2018 10:32:56 +0000 (12:32 +0200)] 
alert: map GNUTLS_E_NO_COMMON_KEY_SHARE to handshake_failure

Previously, when server received a ClientHello that does include only
groups from unassigned ranges in supported_groups, it aborted the
connection with an illegal_parameter.

Resolves #537

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agoalgorithms: add support for FFDHE6144
Daiki Ueno [Tue, 7 Aug 2018 09:43:32 +0000 (11:43 +0200)] 
algorithms: add support for FFDHE6144

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agoMerge branch 'tmp-fix-ecdsa-pubkey-import' into 'master'
Nikos Mavrogiannopoulos [Tue, 7 Aug 2018 10:54:15 +0000 (10:54 +0000)] 
Merge branch 'tmp-fix-ecdsa-pubkey-import' into 'master'

Corrected the importing of ECDSA public keys

Closes #538

See merge request gnutls/gnutls!725

8 years agoCorrected the importing of ECDSA public keys
Nikos Mavrogiannopoulos [Fri, 3 Aug 2018 20:26:47 +0000 (22:26 +0200)] 
Corrected the importing of ECDSA public keys

This seems to be a regression since EdDSA support. The call to
_gnutls_x509_get_pk_algorithm() in public key import was unnecessary
and in fact it was overriding the available curve with a curve associated
with the OID. As the ECDSA OID doesn't include the curve, that had the
result of deleting the already read curve.

Resolves #538

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoEnsure we are sending the right protocol version on second client hello
Nikos Mavrogiannopoulos [Fri, 3 Aug 2018 12:13:14 +0000 (14:13 +0200)] 
Ensure we are sending the right protocol version on second client hello

That is, when we respond to a Hello Retry Request as client, we put
the TLS1.2 version on the second client hello to send a hello that is
as close as possible to the original hello. That effectively separates
the handling of TLS1.2 rehandshake and TLS1.3 hello retry request
when sending a client hello.

Resolves #535

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: improved text on certifications
Nikos Mavrogiannopoulos [Tue, 7 Aug 2018 05:30:55 +0000 (07:30 +0200)] 
doc: improved text on certifications

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