]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
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>
8 years agorecord: send 0x0303 under TLS1.3
Nikos Mavrogiannopoulos [Thu, 22 Feb 2018 13:42:43 +0000 (14:42 +0100)] 
record: send 0x0303 under TLS1.3

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

Resolves #396

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocryptodev: fix prototype of cryptodev_mac_fast [ci skip]
Nikos Mavrogiannopoulos [Thu, 8 Mar 2018 11:03:39 +0000 (12:03 +0100)] 
cryptodev: fix prototype of cryptodev_mac_fast [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocryptodev: added missing macro [ci skip]
Nikos Mavrogiannopoulos [Wed, 7 Mar 2018 15:14:51 +0000 (16:14 +0100)] 
cryptodev: added missing macro [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoMerge branch 'tmp-fix-re-encoding' into 'master'
Nikos Mavrogiannopoulos [Mon, 5 Mar 2018 16:17:39 +0000 (16:17 +0000)] 
Merge branch 'tmp-fix-re-encoding' into 'master'

Avoid re-encoding of certificates

See merge request gnutls/gnutls!608

8 years agotests: added unit tests of gnutls_x509_crt_export
Nikos Mavrogiannopoulos [Mon, 5 Mar 2018 14:42:14 +0000 (15:42 +0100)] 
tests: added unit tests of gnutls_x509_crt_export

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update
Nikos Mavrogiannopoulos [Fri, 2 Mar 2018 22:21:34 +0000 (23:21 +0100)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agognutls_x509_crt_export2: avoid re-encoding
Nikos Mavrogiannopoulos [Fri, 2 Mar 2018 22:09:11 +0000 (23:09 +0100)] 
gnutls_x509_crt_export2: avoid re-encoding

That prevents possible re-encoding issues in libtasn1 or ambiguously
formatted DER data, from affecting verbatim usage of certificates.

Relates #403

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: added reproducer with DER re-encoding error on client side
Nikos Mavrogiannopoulos [Fri, 2 Mar 2018 16:48:01 +0000 (17:48 +0100)] 
tests: added reproducer with DER re-encoding error on client side

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocfg.mk: update-po rule uses commit -s
Nikos Mavrogiannopoulos [Sun, 4 Mar 2018 18:07:29 +0000 (19:07 +0100)] 
cfg.mk: update-po rule uses commit -s

This makes it produce a commit message which can be sent to
the repo (Signed-off-by is mandatory).

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoSync with TP.
Nikos Mavrogiannopoulos [Sun, 4 Mar 2018 18:01:41 +0000 (19:01 +0100)] 
Sync with TP.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoCONTRIBUTING.md: added more info about gnulib
Nikos Mavrogiannopoulos [Sun, 4 Mar 2018 18:01:23 +0000 (19:01 +0100)] 
CONTRIBUTING.md: added more info about gnulib

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoMerge branch 'tmp-fuzzer-coverage' into 'master'
Nikos Mavrogiannopoulos [Sun, 4 Mar 2018 18:03:52 +0000 (18:03 +0000)] 
Merge branch 'tmp-fuzzer-coverage' into 'master'

Improve fuzzer coverage report creation

See merge request gnutls/gnutls!609

8 years agoImprove fuzzer coverage report creation
Tim Rühsen [Sat, 3 Mar 2018 17:42:20 +0000 (18:42 +0100)] 
Improve fuzzer coverage report creation

8 years agoMerge branch 'tmp-rsa-pss-fix' into 'master'
Nikos Mavrogiannopoulos [Sat, 3 Mar 2018 15:28:08 +0000 (15:28 +0000)] 
Merge branch 'tmp-rsa-pss-fix' into 'master'

_gnutls_find_rsa_pss_salt_size: add a validity check for salt size

Closes #402

See merge request gnutls/gnutls!607

8 years agopkcs11: set the modulus bits on RSA keys
Nikos Mavrogiannopoulos [Fri, 2 Mar 2018 22:40:43 +0000 (23:40 +0100)] 
pkcs11: set the modulus bits on RSA keys

That value is necessary when using RSA-PSS keys.

Relates #402

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agognutls_privkey_import_ext4: enhanced with GNUTLS_PRIVKEY_INFO_PK_ALGO_BITS flag
Nikos Mavrogiannopoulos [Fri, 2 Mar 2018 13:51:31 +0000 (14:51 +0100)] 
gnutls_privkey_import_ext4: enhanced with GNUTLS_PRIVKEY_INFO_PK_ALGO_BITS flag

That flag is utilized by the information function to obtain the
value of the parameters (e.g., modulus). That information is necessary
to safely handle RSA-PSS keys.

For RSA-PSS keys this is a regression since 3.6.0 where this API was
introduced, but as this change is necessary and 3.6.x is not yet marked
as stable, it should be acceptable.

Relates #402

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_find_rsa_pss_salt_size: add a validity check for salt size
Nikos Mavrogiannopoulos [Fri, 2 Mar 2018 10:18:12 +0000 (11:18 +0100)] 
_gnutls_find_rsa_pss_salt_size: add a validity check for salt size

That is, in order to reject invalid parameters.

Resolves #402

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: eliminated destructive tests
Nikos Mavrogiannopoulos [Fri, 2 Mar 2018 08:38:55 +0000 (09:38 +0100)] 
tests: eliminated destructive tests

That adds a dependency to p11-kit 0.23.10 for the test suite.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoconfigure: simplified nettle version check
Nikos Mavrogiannopoulos [Thu, 1 Mar 2018 15:38:29 +0000 (16:38 +0100)] 
configure: simplified nettle version check

Relates #401

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-cli: do not ask any questions with --strict-tofu
Łukasz Stelmach [Tue, 27 Feb 2018 14:44:55 +0000 (15:44 +0100)] 
gnutls-cli: do not ask any questions with --strict-tofu

Signed-off-by: Łukasz Stelmach <stlman@poczta.fm>
8 years agoUpdate oss-fuzz corpora
Tim Rühsen [Tue, 27 Feb 2018 21:04:10 +0000 (22:04 +0100)] 
Update oss-fuzz corpora

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agodrbg-aes: use the new nettle APIs for AES
Nikos Mavrogiannopoulos [Thu, 22 Feb 2018 10:43:53 +0000 (11:43 +0100)] 
drbg-aes: use the new nettle APIs for AES

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoaccelerated: padlock: use the new nettle APIs
Nikos Mavrogiannopoulos [Thu, 22 Feb 2018 10:29:08 +0000 (11:29 +0100)] 
accelerated: padlock: use the new nettle APIs

Also remove any ifdefs for nettle (it is not conditionally compiled in),
and do not register accelerators for AES-192-CBC. That cipher is widely
ignored to bother.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update
Nikos Mavrogiannopoulos [Mon, 26 Feb 2018 10:46:09 +0000 (11:46 +0100)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Mon, 26 Feb 2018 10:44:56 +0000 (11:44 +0100)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_ext_raw_parse: introduced function
Nikos Mavrogiannopoulos [Fri, 23 Feb 2018 08:55:50 +0000 (09:55 +0100)] 
gnutls_ext_raw_parse: introduced function

That function can be combined with callbacks like
gnutls_handshake_set_hook_function() for applications to
be able to process messages when necessary.

Resolves #382

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agofuzz: added TLS1.3 client and server traces [ci skip]
Nikos Mavrogiannopoulos [Wed, 21 Feb 2018 10:46:08 +0000 (11:46 +0100)] 
fuzz: added TLS1.3 client and server traces [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agofuzz: enable fuzzer target in afl examples and add missing script [ci skip]
Nikos Mavrogiannopoulos [Wed, 21 Feb 2018 10:21:36 +0000 (11:21 +0100)] 
fuzz: enable fuzzer target in afl examples and add missing script [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agofuzz: fixes in README file [ci skip]
Nikos Mavrogiannopoulos [Wed, 21 Feb 2018 10:20:31 +0000 (11:20 +0100)] 
fuzz: fixes in README file [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoupdated Since version in new function entries as well as map file versions
Nikos Mavrogiannopoulos [Mon, 19 Feb 2018 19:11:57 +0000 (20:11 +0100)] 
updated Since version in new function entries as well as map file versions

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agofuzz: enable TLS1.3 in server and client fuzzers
Nikos Mavrogiannopoulos [Mon, 19 Feb 2018 16:17:45 +0000 (17:17 +0100)] 
fuzz: enable TLS1.3 in server and client fuzzers

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Mon, 19 Feb 2018 14:10:00 +0000 (15:10 +0100)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update
Nikos Mavrogiannopoulos [Mon, 19 Feb 2018 14:02:36 +0000 (15:02 +0100)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agorecord: new gnutls_record_send2 function
Daiki Ueno [Tue, 23 Jan 2018 15:39:36 +0000 (16:39 +0100)] 
record: new gnutls_record_send2 function

This adds a new function gnutls_record_send2() which takes an extra
argument to specify the padding size of the record.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years ago_gnutls_record_overhead: count content type octet in plaintext
Daiki Ueno [Thu, 8 Feb 2018 12:24:46 +0000 (13:24 +0100)] 
_gnutls_record_overhead: count content type octet in plaintext

In TLS 1.3, TLSInnerPlaintext has the 'type' field followed by the
padding.  Exclude it from the overhead calculation.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agotests: check extended record padding work with TLS 1.3
Daiki Ueno [Wed, 3 Jan 2018 13:14:56 +0000 (14:14 +0100)] 
tests: check extended record padding work with TLS 1.3

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agorange: make length hiding always usable under TLS 1.3
Daiki Ueno [Thu, 21 Dec 2017 16:02:22 +0000 (17:02 +0100)] 
range: make length hiding always usable under TLS 1.3

This patch reintroduce the extended record padding mode removed in
commit 7df219f0.  Under TLS 1.3, the padding mode can be implemented
in the record protocol.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agotests: re-enable mini-record-range test
Daiki Ueno [Wed, 3 Jan 2018 13:10:22 +0000 (14:10 +0100)] 
tests: re-enable mini-record-range test

This test was previously disabled as part of NEW_PADDING extension
removal (commit 7df219f0).  Even though the extension is not usable,
gnutls_record_send_range() should work with the standard TLS block
cipher padding.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agodoc: fix mention of gnutls_record_send_range()
Daiki Ueno [Thu, 21 Dec 2017 14:53:30 +0000 (15:53 +0100)] 
doc: fix mention of gnutls_record_send_range()

Signed-off-by: Daiki Ueno <dueno@redhat.com>