]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
7 years ago.gitlab-ci.yml: updated cache key name
Nikos Mavrogiannopoulos [Wed, 13 Mar 2019 08:03:39 +0000 (09:03 +0100)] 
.gitlab-ci.yml: updated cache key name

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-test-certtool' into 'master'
Tim Rühsen [Mon, 11 Mar 2019 09:10:33 +0000 (09:10 +0000)] 
Merge branch 'tmp-test-certtool' into 'master'

tests: verify that 'certtool -i --outder' does not output text

Closes #627

See merge request gnutls/gnutls!952

7 years agotests: verify that 'certtool -i --outder' does not output text
Nikos Mavrogiannopoulos [Sun, 10 Mar 2019 12:59:32 +0000 (13:59 +0100)] 
tests: verify that 'certtool -i --outder' does not output text

A common regression in the past, was certtool outputting text while
writing raw DER data. Ensure that the certificate-info option does not
regress.

Resolves: #627

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-remove-doc-cyclo' into 'master'
Nikos Mavrogiannopoulos [Sun, 10 Mar 2019 11:14:14 +0000 (11:14 +0000)] 
Merge branch 'tmp-remove-doc-cyclo' into 'master'

doc: removed cyclo subdir

Closes #727

See merge request gnutls/gnutls!950

7 years agoSECURITY.md: updated to reflect the current practice [ci skip]
Nikos Mavrogiannopoulos [Sat, 9 Mar 2019 20:50:46 +0000 (21:50 +0100)] 
SECURITY.md: updated to reflect the current practice [ci skip]

This change updates the SECURITY guidelines to reflect the current
practice (no special security releases), and thus refer directly
to the upcoming or following release. Furthermore, it removes
any mention of absolute time, as the release cadence is already
fixed to bi-monthly.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agodoc: removed cyclo subdir
Nikos Mavrogiannopoulos [Sat, 9 Mar 2019 20:14:39 +0000 (21:14 +0100)] 
doc: removed cyclo subdir

This directory had a makefile which was intended to calculate the cyclomatic
complexity, however that was not functional, and not related with gnutls'
documentation.

Resolves: #727

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoNEWS: fix NEWS entries [ci skip]
Nikos Mavrogiannopoulos [Fri, 8 Mar 2019 19:17:49 +0000 (20:17 +0100)] 
NEWS: fix NEWS entries [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-explicit-sanity-checks' into 'master'
Nikos Mavrogiannopoulos [Wed, 6 Mar 2019 07:24:34 +0000 (07:24 +0000)] 
Merge branch 'tmp-explicit-sanity-checks' into 'master'

cleanup: _gnutls_recv_handshake: added explicit sanity checks

See merge request gnutls/gnutls!937

7 years agoMerge branch 'tmp-cert-req' into 'master'
Daiki Ueno [Wed, 6 Mar 2019 03:35:09 +0000 (03:35 +0000)] 
Merge branch 'tmp-cert-req' into 'master'

TLS 1.3: utilize "certificate_required" alert

Closes #715

See merge request gnutls/gnutls!946

7 years agotls13/certificate: utilize "certificate_required" alert
Daiki Ueno [Mon, 4 Mar 2019 16:17:47 +0000 (17:17 +0100)] 
tls13/certificate: utilize "certificate_required" alert

This could make errors more distinguishable when the client sends no
certificates or a bad certificate.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoMerge branch 'tmp-fix-cli-starttls-xmpp' into 'master'
Tim Rühsen [Tue, 5 Mar 2019 12:22:56 +0000 (12:22 +0000)] 
Merge branch 'tmp-fix-cli-starttls-xmpp' into 'master'

gnutls-cli: Fix --starttls-proto=xmpp

Closes #697

See merge request gnutls/gnutls!911

7 years agoMerge branch 'lgtm-analysis' into 'master'
Tim Rühsen [Tue, 5 Mar 2019 11:27:29 +0000 (11:27 +0000)] 
Merge branch 'lgtm-analysis' into 'master'

Create .lgtm.yml for LGTM.com C/C++ analysis

See merge request gnutls/gnutls!945

7 years agoMerge branch 'tmp-doc-update-iv' into 'master'
Nikos Mavrogiannopoulos [Tue, 5 Mar 2019 07:37:31 +0000 (07:37 +0000)] 
Merge branch 'tmp-doc-update-iv' into 'master'

Improve documentation for gnutls_cipher_get_iv_size and AEAD ciphers

Closes #717

See merge request gnutls/gnutls!941

7 years agoalert: recognize "certificate_required"
Daiki Ueno [Wed, 27 Feb 2019 17:38:09 +0000 (18:38 +0100)] 
alert: recognize "certificate_required"

This may be sent if the server received an empty Certificate message.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoMerge branch 'fix_fips_lib_name' into 'master'
Nikos Mavrogiannopoulos [Mon, 4 Mar 2019 14:44:52 +0000 (14:44 +0000)] 
Merge branch 'fix_fips_lib_name' into 'master'

Fix FIPS integrity self tests

See merge request gnutls/gnutls!873

7 years ago.gitlab-ci.yml: Test FIPS HMAC self-test
Anderson Toshiyuki Sasaki [Fri, 18 Jan 2019 12:17:46 +0000 (13:17 +0100)] 
.gitlab-ci.yml: Test FIPS HMAC self-test

This enables the integrity self-tests in FIPS140 test build.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
7 years agofips140: Ignore newlines read at the end of HMAC file
Anderson Toshiyuki Sasaki [Fri, 11 Jan 2019 10:23:21 +0000 (11:23 +0100)] 
fips140: Ignore newlines read at the end of HMAC file

This makes the integrity check to ignore newlines appended after the
HMAC value.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
7 years agofips140: Fix the names of files used in integrity checks
Anderson Toshiyuki Sasaki [Thu, 10 Jan 2019 13:04:02 +0000 (14:04 +0100)] 
fips140: Fix the names of files used in integrity checks

The names of the libraries haven't been updated when the soname version
were bumped.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
7 years agoMerge branch 'tmp-false-start-clarifications' into 'master'
Nikos Mavrogiannopoulos [Sat, 2 Mar 2019 21:50:13 +0000 (21:50 +0000)] 
Merge branch 'tmp-false-start-clarifications' into 'master'

Fixed operation under multiple threads

Closes #713

See merge request gnutls/gnutls!935

7 years agoMerge branch 'update-bootstrap' into 'master'
Nikos Mavrogiannopoulos [Sat, 2 Mar 2019 20:55:49 +0000 (20:55 +0000)] 
Merge branch 'update-bootstrap' into 'master'

Update ./bootstrap from latest gnulib

See merge request gnutls/gnutls!943

7 years agoCreate .lgtm.yml for LGTM.com C/C++ analysis
Bas van Schaik [Thu, 28 Feb 2019 22:15:26 +0000 (22:15 +0000)] 
Create .lgtm.yml for LGTM.com C/C++ analysis

Signed-off-by: Bas van Schaik <gitlab.com@s.traiectum.net>
7 years ago.gitlab-ci.yml: added thread sanitizer run
Nikos Mavrogiannopoulos [Mon, 25 Feb 2019 13:41:24 +0000 (14:41 +0100)] 
.gitlab-ci.yml: added thread sanitizer run

This checks for unsafe uses of variables in our included threaded
tests.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoProtected _gnutls_epoch_get from _gnutls_epoch_gc on false start
Nikos Mavrogiannopoulos [Mon, 25 Feb 2019 13:35:16 +0000 (14:35 +0100)] 
Protected _gnutls_epoch_get from _gnutls_epoch_gc on false start

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agognutls_record_send2: try to ensure integrity of operations on false and early start
Nikos Mavrogiannopoulos [Mon, 25 Feb 2019 14:11:19 +0000 (15:11 +0100)] 
gnutls_record_send2: try to ensure integrity of operations on false and early start

This adds a double check in the sanity check of gnutls_record_send2()
for the initial_negotiation_completed value, making sure that the
check will be successful even in parallel operation of send/recv.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agomini-dtls-pthread: renamed and fixed several shortcomings
Nikos Mavrogiannopoulos [Sun, 24 Feb 2019 20:13:27 +0000 (21:13 +0100)] 
mini-dtls-pthread: renamed and fixed several shortcomings

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMake false start and early start multi-thread recv/send safe
Nikos Mavrogiannopoulos [Sat, 23 Feb 2019 23:19:21 +0000 (00:19 +0100)] 
Make false start and early start multi-thread recv/send safe

An application that is sending and receiving from different threads
after handshake is complete cannot take advantage of false start because
gnutls_record_send2() detects operations during the handshake process
as invalid.

Because in early start and false start the remaining handshake process needs
only to receive data, and the sending side is already set-up, this error
detection is bogus. With this patch we remove it.

Resolves: #713

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agodoc: added more information on operation under multiple threads
Nikos Mavrogiannopoulos [Sat, 23 Feb 2019 17:57:09 +0000 (18:57 +0100)] 
doc: added more information on operation under multiple threads

Relates: #713

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoUpdate ./bootstrap from latest gnulib
Tim Rühsen [Fri, 1 Mar 2019 19:13:38 +0000 (20:13 +0100)] 
Update ./bootstrap from latest gnulib

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoClarifications on AEAD ciphers
Nikos Mavrogiannopoulos [Wed, 27 Feb 2019 09:01:47 +0000 (10:01 +0100)] 
Clarifications on AEAD ciphers

Relates: #716

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoImprove documentation for gnutls_cipher_get_iv_size
Nikos Mavrogiannopoulos [Wed, 27 Feb 2019 08:29:04 +0000 (09:29 +0100)] 
Improve documentation for gnutls_cipher_get_iv_size

This clarifies what is returned and what is to be expected on algorithms
with variable IV sizes.

Resolves: #717

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-token-modname-clarifications' into 'master'
Nikos Mavrogiannopoulos [Thu, 28 Feb 2019 07:55:39 +0000 (07:55 +0000)] 
Merge branch 'tmp-token-modname-clarifications' into 'master'

pkcs11: clarify GNUTLS_PKCS11_TOKEN_MODNAME presence [ci skip]

Closes #633

See merge request gnutls/gnutls!938

7 years agopkcs11: clarify GNUTLS_PKCS11_TOKEN_MODNAME presence [ci skip]
Nikos Mavrogiannopoulos [Tue, 26 Feb 2019 14:42:01 +0000 (15:42 +0100)] 
pkcs11: clarify GNUTLS_PKCS11_TOKEN_MODNAME presence [ci skip]

Resolves: #633

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agocppcheck: suppress warning on nettle code [ci skip]
Nikos Mavrogiannopoulos [Tue, 26 Feb 2019 14:21:48 +0000 (15:21 +0100)] 
cppcheck: suppress warning on nettle code [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-ametzler-gnutls-cli-benchmark-overflow' into 'master'
Tim Rühsen [Sun, 24 Feb 2019 17:44:29 +0000 (17:44 +0000)] 
Merge branch 'tmp-ametzler-gnutls-cli-benchmark-overflow' into 'master'

gnutls-cli: fix --benchmark-ciphers type overflow

See merge request gnutls/gnutls!934

7 years agognutls-cli: fix --benchmark-ciphers type overflow
Andreas Metzler [Sat, 23 Feb 2019 17:43:49 +0000 (18:43 +0100)] 
gnutls-cli: fix --benchmark-ciphers type overflow

Signed-off-by: Andreas Metzler <ametzler@bebt.de>
7 years agoMerge branch 'tmp-fetch-fuzz-corpora-faster' into 'master'
Tim Rühsen [Sat, 23 Feb 2019 22:22:47 +0000 (22:22 +0000)] 
Merge branch 'tmp-fetch-fuzz-corpora-faster' into 'master'

Fetch OSS-Fuzz corpora much faster [skip ci]

See merge request gnutls/gnutls!883

7 years agoMerge branch 'tmp-update-ax-code-coverage' into 'master'
Tim Rühsen [Sat, 23 Feb 2019 22:22:13 +0000 (22:22 +0000)] 
Merge branch 'tmp-update-ax-code-coverage' into 'master'

Update m4/ax_code_coverage.m4

See merge request gnutls/gnutls!905

7 years agoMerge branch 'tmp-reset-after-free' into 'master'
Tim Rühsen [Sat, 23 Feb 2019 22:21:09 +0000 (22:21 +0000)] 
Merge branch 'tmp-reset-after-free' into 'master'

Automatically NULLify after gnutls_free()

See merge request gnutls/gnutls!923

7 years agoMerge branch 'tmp-cleanup-cert' into 'master'
Tim Rühsen [Sat, 23 Feb 2019 22:20:21 +0000 (22:20 +0000)] 
Merge branch 'tmp-cleanup-cert' into 'master'

Cleanup lib/auth/cert.c as suggested by cppcheck

See merge request gnutls/gnutls!924

7 years ago_gnutls_recv_handshake: added explicit sanity checks
Nikos Mavrogiannopoulos [Sat, 23 Feb 2019 20:19:06 +0000 (21:19 +0100)] 
_gnutls_recv_handshake: added explicit sanity checks

Although, this function acts on the message provided as expected and thus
it should never call a message parsing function on unexpected
messages, we make a more explicit sanity check. This unifies the
sanity checks existing within the involved functions.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agognutls_x509_crt_init: Fix dereference of NULL pointer
Tim Rühsen [Tue, 12 Feb 2019 14:20:23 +0000 (15:20 +0100)] 
gnutls_x509_crt_init: Fix dereference of NULL pointer

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoRemove redundant resets of variables after free()
Tim Rühsen [Tue, 12 Feb 2019 14:14:07 +0000 (15:14 +0100)] 
Remove redundant resets of variables after free()

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoAutomatically NULLify after gnutls_free()
Tim Rühsen [Tue, 12 Feb 2019 14:09:11 +0000 (15:09 +0100)] 
Automatically NULLify after gnutls_free()

This method prevents direct use-after-free and
double-free issues.

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-downgrade-sentinel' into 'master'
Daiki Ueno [Fri, 22 Feb 2019 11:42:27 +0000 (11:42 +0000)] 
Merge branch 'tmp-downgrade-sentinel' into 'master'

handshake: defer setting downgrade sentinel until version is selected

Closes #689

See merge request gnutls/gnutls!918

7 years agoMerge branch 'use_topendir_fixed' into 'master'
Tim Rühsen [Fri, 22 Feb 2019 10:23:31 +0000 (10:23 +0000)] 
Merge branch 'use_topendir_fixed' into 'master'

Re-introduce topendir on Windows with Unicode support

See merge request gnutls/gnutls!932

7 years agotlsfuzzer: update to the latest upstream for downgrade protection tests
Daiki Ueno [Tue, 19 Feb 2019 12:56:35 +0000 (13:56 +0100)] 
tlsfuzzer: update to the latest upstream for downgrade protection tests

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoext/supported_versions: regenerate server random
Daiki Ueno [Sat, 9 Feb 2019 09:26:56 +0000 (10:26 +0100)] 
ext/supported_versions: regenerate server random

This adds a call to _gnutls_gen_server_random() in handling the
"supported_versions" extension, so that the TLS 1.3 downgrade sentinel
is set only when the earlier versions are selected.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoUpdate ax_code_coverage.m4 to latest release of autoconf-archive
Tim Rühsen [Tue, 5 Feb 2019 10:01:20 +0000 (11:01 +0100)] 
Update ax_code_coverage.m4 to latest release of autoconf-archive

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'thread_local_msvc_fixed' into 'master'
Nikos Mavrogiannopoulos [Thu, 21 Feb 2019 18:13:48 +0000 (18:13 +0000)] 
Merge branch 'thread_local_msvc_fixed' into 'master'

lib: Provide _Thread_local on MSVC

See merge request gnutls/gnutls!933

7 years agolib: x509: Minor directory browsing simplification
Hugo Beauzée-Luyssen [Thu, 21 Feb 2019 13:49:36 +0000 (14:49 +0100)] 
lib: x509: Minor directory browsing simplification

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
7 years agoRevert "Revert "verify-high2: Fix cert dir iteration on Win32""
Hugo Beauzée-Luyssen [Mon, 18 Feb 2019 13:41:56 +0000 (14:41 +0100)] 
Revert "Revert "verify-high2: Fix cert dir iteration on Win32""

This reverts commit 681330882da19099eea360fab141cab937c45677.

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
This revert also contains the fix to the original commit (invalid
utf8->utf16 conversion) and a minor simplification of the _treaddir loop.

7 years agoiconv: Allow _gnutls_utf8_to_ucs2 to output little endian
Hugo Beauzée-Luyssen [Mon, 18 Feb 2019 16:12:54 +0000 (17:12 +0100)] 
iconv: Allow _gnutls_utf8_to_ucs2 to output little endian

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
7 years agolib: Provide _Thread_local on MSVC
Hugo Beauzée-Luyssen [Mon, 18 Feb 2019 08:37:04 +0000 (09:37 +0100)] 
lib: Provide _Thread_local on MSVC

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
7 years agoMerge branch 'tmp-get-source-branch' into 'master'
Nikos Mavrogiannopoulos [Tue, 19 Feb 2019 07:20:17 +0000 (07:20 +0000)] 
Merge branch 'tmp-get-source-branch' into 'master'

check_if_signed: Get source branch if not set

See merge request gnutls/gnutls!930

7 years agoAdd test for starttls XMPP
Tim Rühsen [Mon, 18 Feb 2019 20:38:38 +0000 (21:38 +0100)] 
Add test for starttls XMPP

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agognutls-cli: Fix --starttls-proto=xmpp
Tim Rühsen [Wed, 6 Feb 2019 10:30:06 +0000 (11:30 +0100)] 
gnutls-cli: Fix --starttls-proto=xmpp

Fixes two issues with gnutls-cli --starttls-proto=xmpp:
1. Print 'Timeout' on timeout instead of random errno message
2. Do not wait for linefeed when using XMPP (XML)

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agocheck_if_signed: Get source branch if not set
Tim Rühsen [Mon, 18 Feb 2019 14:38:56 +0000 (15:38 +0100)] 
check_if_signed: Get source branch if not set

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-fix-record-size-limit-resumption' into 'master'
Daiki Ueno [Mon, 18 Feb 2019 12:10:11 +0000 (12:10 +0000)] 
Merge branch 'tmp-fix-record-size-limit-resumption' into 'master'

Fix issues in record_size_limit extension handling

See merge request gnutls/gnutls!879

7 years agoMerge branch 'gnutls-703' into 'master'
Tim Rühsen [Thu, 14 Feb 2019 19:31:14 +0000 (19:31 +0000)] 
Merge branch 'gnutls-703' into 'master'

tests: wrap ADD_SYSCALL for getrandom in test for SYS_getrandom

Closes #703

See merge request gnutls/gnutls!926

7 years agotests: wrap ADD_SYSCALL for getrandom in test for SYS_getrandom
R. Andrew Bailey [Thu, 14 Feb 2019 14:38:33 +0000 (09:38 -0500)] 
tests: wrap ADD_SYSCALL for getrandom in test for SYS_getrandom

Signed-off-by: R. Andrew Bailey <bailey@akamai.com>
7 years agognutls_record_set_max_size: make it work on server side
Daiki Ueno [Fri, 8 Feb 2019 13:46:33 +0000 (14:46 +0100)] 
gnutls_record_set_max_size: make it work on server side

The record_size_limit extension can also be specified by the server to
indicate the maximum plaintext.  Also add test cases for asymmetric
settings between server and client.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agotlsfuzzer: update to the latest upstream for record_size_limit test
Daiki Ueno [Thu, 31 Jan 2019 12:39:35 +0000 (13:39 +0100)] 
tlsfuzzer: update to the latest upstream for record_size_limit test

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoMerge branch 'tmp-macosx-fix' into 'master'
Tim Rühsen [Thu, 14 Feb 2019 14:55:56 +0000 (14:55 +0000)] 
Merge branch 'tmp-macosx-fix' into 'master'

bootstrap.conf: do not override GNULIB_SRCDIR

See merge request gnutls/gnutls!925

7 years agoext/record_size_limit: account for content type octet in TLS 1.3
Daiki Ueno [Fri, 8 Feb 2019 12:22:13 +0000 (13:22 +0100)] 
ext/record_size_limit: account for content type octet in TLS 1.3

In TLS 1.3, the protocol maximum of plaintext size is 2^14+1, while
it is 2^14 in TLS 1.2.  To accommodate that, this introduces the
following invariant:
- when the maximum is set by the user with
  gnutls_record_set_max_size(), store it as is.  The value range is
  [511, 16834].
- when the maximum is negotiated through record_size_limit extension,
  it can be [512, 16385].  In TLS 1.3, subtract by 1 to fit in [511,
  16384].

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agodecrypt_packet_tls13: add check for max plaintext size
Daiki Ueno [Thu, 31 Jan 2019 15:56:55 +0000 (16:56 +0100)] 
decrypt_packet_tls13: add check for max plaintext size

There is check in _gnutls_recv_in_buffers already, but for TLS 1.3 we
need to take account of the padding.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agorecord: reject too large plaintext after decryption
Daiki Ueno [Fri, 25 Jan 2019 16:00:44 +0000 (17:00 +0100)] 
record: reject too large plaintext after decryption

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoconstate: reset max_record_recv_size upon renegotiation
Daiki Ueno [Wed, 30 Jan 2019 15:45:08 +0000 (16:45 +0100)] 
constate: reset max_record_recv_size upon renegotiation

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agosession_pack: reset max_record_recv_size when packing
Daiki Ueno [Wed, 30 Jan 2019 09:21:07 +0000 (10:21 +0100)] 
session_pack: reset max_record_recv_size when packing

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoext/record_size_limit: don't confuse with negotiated/user-supplied maximum
Daiki Ueno [Thu, 17 Jan 2019 10:53:35 +0000 (11:53 +0100)] 
ext/record_size_limit: don't confuse with negotiated/user-supplied maximum

As documented in gnutls_int.h, max_record_send_size is for tracking
the user-supplied maximum, while max_record_recv_size for the
protocol negotiated maximum.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoext/max_record: server shouldn't send it with record_size_limit
Daiki Ueno [Sun, 20 Jan 2019 08:18:21 +0000 (09:18 +0100)] 
ext/max_record: server shouldn't send it with record_size_limit

Otherwise, the connection will be disconnected by the client, as
suggested in RFC: A client MUST treat receipt of both
"max_fragment_length" and "record_size_limit" as a fatal error, and it
SHOULD generate an "illegal_parameter" alert.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years ago_gnutls_hello_ext_is_present: don't ignore max_fragment_length
Daiki Ueno [Thu, 7 Feb 2019 15:28:52 +0000 (16:28 +0100)] 
_gnutls_hello_ext_is_present: don't ignore max_fragment_length

The extension is assigned the internal ID 0.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years ago.dir-locals.el: disable indent-tabs-mode in js-mode
Daiki Ueno [Fri, 25 Jan 2019 16:04:40 +0000 (17:04 +0100)] 
.dir-locals.el: disable indent-tabs-mode in js-mode

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agobootstrap.conf: do not override GNULIB_SRCDIR
Nikos Mavrogiannopoulos [Thu, 14 Feb 2019 12:01:34 +0000 (13:01 +0100)] 
bootstrap.conf: do not override GNULIB_SRCDIR

This was not set in all of our CI platforms, and was causing
issues in MacOSX.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-fix-cert-params-checks' into 'master'
Nikos Mavrogiannopoulos [Thu, 14 Feb 2019 11:57:23 +0000 (11:57 +0000)] 
Merge branch 'tmp-fix-cert-params-checks' into 'master'

x509: corrected issue in the algorithm parameters comparison

Closes #698

See merge request gnutls/gnutls!921

7 years agoMerge branch 'tmp-fix-uninitialized2' into 'master'
Tim Rühsen [Thu, 14 Feb 2019 11:07:15 +0000 (11:07 +0000)] 
Merge branch 'tmp-fix-uninitialized2' into 'master'

Fix uninitialized warning in pkcs11.c

See merge request gnutls/gnutls!906

7 years agox509: corrected issue in the algorithm parameters comparison
Nikos Mavrogiannopoulos [Mon, 11 Feb 2019 08:18:46 +0000 (09:18 +0100)] 
x509: corrected issue in the algorithm parameters comparison

Each certificate has two fields to set the signature algorithm
and parameters used for the digital signature. One of the fields is
authenticated and the other is not. It is required from RFC5280 to
enforce the equality of these fields, but currently due to an issue
we wouldn't enforce the equality of the parameters fields. This
fix corrects the issue.

We also move an RSA-PSS certificate in chainverify that was relying
on invalid parameters, to this set of invalid certificates.

Resolves: #698

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agotests: added further checks for gnutls_pkcs11_token_get_info
Nikos Mavrogiannopoulos [Wed, 13 Feb 2019 07:54:59 +0000 (07:54 +0000)] 
tests: added further checks for gnutls_pkcs11_token_get_info

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoFix uninitialized warning in pkcs11.c
Tim Rühsen [Tue, 29 Jan 2019 15:10:59 +0000 (16:10 +0100)] 
Fix uninitialized warning in pkcs11.c

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoCleanup lib/auth/cert.c as suggested by cppcheck
Tim Rühsen [Wed, 13 Feb 2019 16:22:21 +0000 (17:22 +0100)] 
Cleanup lib/auth/cert.c as suggested by cppcheck

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-serv-args' into 'master'
Tim Rühsen [Tue, 12 Feb 2019 16:53:01 +0000 (16:53 +0000)] 
Merge branch 'tmp-serv-args' into 'master'

Fix 32bit overflow issue in src/serv-args.def

Closes #700

See merge request gnutls/gnutls!922

7 years agoFix 32bit overflow issue in src/serv-args.def
Tim Rühsen [Mon, 11 Feb 2019 09:41:47 +0000 (10:41 +0100)] 
Fix 32bit overflow issue in src/serv-args.def

Fixing this warning seen on 32bit architectures:

serv-args.c: In function 'doOptMaxearlydata':
serv-args.c:1431:14: warning: overflow in conversion from 'long long int' to 'long int' changes value from '4294967296' to '0' [-Woverflow]
         { 1, 4294967296 } };
              ^~~~~~~~~~

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-ssize-t' into 'master'
Tim Rühsen [Tue, 12 Feb 2019 11:34:22 +0000 (11:34 +0000)] 
Merge branch 'tmp-ssize-t' into 'master'

Remove typedef'ing ssize_t in gnutls.h

Closes #688

See merge request gnutls/gnutls!916

7 years agoRemove typedef'ing ssize_t in gnutls.h
Tim Rühsen [Fri, 8 Feb 2019 12:03:30 +0000 (13:03 +0100)] 
Remove typedef'ing ssize_t in gnutls.h

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-gnulib-pton' into 'master'
Tim Rühsen [Sun, 10 Feb 2019 15:46:55 +0000 (15:46 +0000)] 
Merge branch 'tmp-gnulib-pton' into 'master'

Use inet_pton() from gnulib

See merge request gnutls/gnutls!913

7 years agoUse inet_pton() from gnulib
Tim Rühsen [Wed, 6 Feb 2019 19:54:45 +0000 (20:54 +0100)] 
Use inet_pton() from gnulib

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-gitlab-triage' into 'master'
Tim Rühsen [Sun, 10 Feb 2019 07:26:01 +0000 (07:26 +0000)] 
Merge branch 'tmp-gitlab-triage' into 'master'

.triage-policies.yml: added [ci skip]

See merge request gnutls/gnutls!908

7 years agoMerge branch 'tmp-enforce-gnulib-rules-for-lib' into 'master'
Tim Rühsen [Sat, 9 Feb 2019 18:06:41 +0000 (18:06 +0000)] 
Merge branch 'tmp-enforce-gnulib-rules-for-lib' into 'master'

bootstrap: refuse to bootstrap if any new dependencies bring gnulib's network stack

See merge request gnutls/gnutls!919

7 years agobootstrap: refuse to bootstrap if any dependencies bring gnulib's network stack
Nikos Mavrogiannopoulos [Sat, 9 Feb 2019 09:52:29 +0000 (10:52 +0100)] 
bootstrap: refuse to bootstrap if any dependencies bring gnulib's network stack

If gnulib's network stack is brought (due to a dependency) in the library
it will make the library unusable to non-gnulib using applications. This
prevents windows applications for example to use gnutls, and so on. Even
more it is quite hard to catch that issue because our testsuite uses
gnulib as well. Instead we try to catch the these modules at import time.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-key-usage' into 'master'
Nikos Mavrogiannopoulos [Fri, 8 Feb 2019 17:42:10 +0000 (17:42 +0000)] 
Merge branch 'tmp-key-usage' into 'master'

When negotiating TLS1.3 enforce certificate key usage

Closes #690

See merge request gnutls/gnutls!902

7 years agoMerge branch 'tmp-gnulib-ntop' into 'master'
Tim Rühsen [Fri, 8 Feb 2019 13:04:47 +0000 (13:04 +0000)] 
Merge branch 'tmp-gnulib-ntop' into 'master'

Use inet_ntop() from gnulib

See merge request gnutls/gnutls!912

7 years agoUse inet_ntop() from gnulib
Tim Rühsen [Wed, 6 Feb 2019 19:35:11 +0000 (20:35 +0100)] 
Use inet_ntop() from gnulib

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years ago_gnutls_gen_rawpk_crt: corrected the use of assert
Nikos Mavrogiannopoulos [Sun, 3 Feb 2019 11:18:30 +0000 (12:18 +0100)] 
_gnutls_gen_rawpk_crt: corrected the use of assert

The API could return 0 or 1 matching certificates. The case of zero
can only happen in client side.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoraw public keys: apply the key usage bits the same way as X.509
Nikos Mavrogiannopoulos [Sun, 3 Feb 2019 07:47:50 +0000 (08:47 +0100)] 
raw public keys: apply the key usage bits the same way as X.509

That is, we require a signing certificate when negotiating
TLS1.3, or when sending a client certificate (on all cases).

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoFallback to TLS 1.2 when incompatible with signature certs are provided
Nikos Mavrogiannopoulos [Sat, 2 Feb 2019 08:13:40 +0000 (09:13 +0100)] 
Fallback to TLS 1.2 when incompatible with signature certs are provided

This only takes into account certificates in the credentials structure.
If certificates are provided in a callback, these must be checked by
the provider. For that we assume that the credentials structure is
filled when associated with a session; if not then the fallback mechanism
will not work and the handshake will fail.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoEnforce the certificate key usage restrictions on all cases
Nikos Mavrogiannopoulos [Sat, 2 Feb 2019 06:10:10 +0000 (07:10 +0100)] 
Enforce the certificate key usage restrictions on all cases

That is, we require a signing certificate when negotiating
TLS1.3, or when sending a client certificate (on all cases).

Before we would not perform any checks under TLS1.3 or when client
certificates are sent, assuming that the certificates used will always
be signing ones. However if the user sets up incorrectly a decryption
certificate we would use it for signing. This fix makes sure that an
error is returned early when these scenarios are detected.

Resolves: #690

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoFetch OSS-Fuzz corpora much faster [skip ci]
Tim Rühsen [Mon, 21 Jan 2019 11:54:58 +0000 (12:54 +0100)] 
Fetch OSS-Fuzz corpora much faster [skip ci]

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years ago.triage-policies.yml: added [ci skip]
Nikos Mavrogiannopoulos [Mon, 4 Feb 2019 14:10:19 +0000 (15:10 +0100)] 
.triage-policies.yml: added [ci skip]

This adds a set of policies regarding issues and merge requests
to be enforced by the gitlab-triage bot. That is:
 - Issues without any label for more than a month are marked
   with needs attention label
 - Issues with needinfo label are closed if they are not updated
   within a month
 - Merge requests marked as WIP with no update within 5 months
   are closed.

These rules are not enforced automatically; we have to schedule
a run of the gitlab-triage bot.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'fix-nettle-check' into 'master'
Nikos Mavrogiannopoulos [Mon, 4 Feb 2019 13:16:11 +0000 (13:16 +0000)] 
Merge branch 'fix-nettle-check' into 'master'

build: pass NETTLE_LIBS together with HOGWEED_LIBS

See merge request gnutls/gnutls!903

7 years agoMerge branch 'fix-pkcs11-mechs' into 'master'
Nikos Mavrogiannopoulos [Mon, 4 Feb 2019 13:11:56 +0000 (13:11 +0000)] 
Merge branch 'fix-pkcs11-mechs' into 'master'

build: do not generate mech-list.h if p11-kit is not available

See merge request gnutls/gnutls!904

7 years agobuild: do not generate mech-list.h if p11-kit is not available
Dmitry Eremin-Solenikov [Sat, 2 Feb 2019 14:47:48 +0000 (17:47 +0300)] 
build: do not generate mech-list.h if p11-kit is not available

Compiling GnuTLS with no p11-kit installed will result in a serie of
warnings during build time because mech-list.h will be generated even if
pkcs11 tool compilation is disabled. Move mech-list.h generation to
happen only if pkcs11 is enabled, thus removing these warnings.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>