]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
7 years agoMerge branch 'tmp-fix-ci-runs' into 'master'
Dmitry Eremin-Solenikov [Fri, 9 Nov 2018 00:27:34 +0000 (00:27 +0000)] 
Merge branch 'tmp-fix-ci-runs' into 'master'

This fixes the recent issue with openssl interop testing in CI

See merge request gnutls/gnutls!798

7 years agotestcompat-openssl: do not test DSS or small curves with 1.1.1
Nikos Mavrogiannopoulos [Wed, 7 Nov 2018 08:56:56 +0000 (09:56 +0100)] 
testcompat-openssl: do not test DSS or small curves with 1.1.1

DSA uses 1024-bit parameters, and these together with curves of
less than 256 bits are not accepted by debian's openssl.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agodoc/credentials: increased key size in RSA client cert
Nikos Mavrogiannopoulos [Wed, 7 Nov 2018 09:20:32 +0000 (10:20 +0100)] 
doc/credentials: increased key size in RSA client cert

This is used by the test suite and recent openssl in debian requires
a larger certificates.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agocerttool: allow --update-certificate to replace public key
Nikos Mavrogiannopoulos [Wed, 7 Nov 2018 09:16:10 +0000 (10:16 +0100)] 
certtool: allow --update-certificate to replace public key

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoREADME.md: updated instructions to apply to fedora29
Nikos Mavrogiannopoulos [Wed, 7 Nov 2018 07:37:23 +0000 (08:37 +0100)] 
README.md: updated instructions to apply to fedora29

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-ignore-ctypes' into 'master'
Nikos Mavrogiannopoulos [Fri, 2 Nov 2018 13:41:46 +0000 (13:41 +0000)] 
Merge branch 'tmp-ignore-ctypes' into 'master'

gnutls_priority_init: ignore CTYPE-OPENPGP options

Closes #593

See merge request gnutls/gnutls!789

7 years agoMerge branch 'tmp-fix-record-size-limit-tls12' into 'master'
Nikos Mavrogiannopoulos [Fri, 2 Nov 2018 06:32:38 +0000 (06:32 +0000)] 
Merge branch 'tmp-fix-record-size-limit-tls12' into 'master'

ext/record_size_limit: handle the extension in TLS 1.2 ServerHello

Closes #599

See merge request gnutls/gnutls!791

7 years agoMerge branch 'ajuaristi-update-docs' into 'master'
Nikos Mavrogiannopoulos [Thu, 1 Nov 2018 20:54:22 +0000 (20:54 +0000)] 
Merge branch 'ajuaristi-update-docs' into 'master'

Update docs for session ticket key rotation

Closes #581

See merge request gnutls/gnutls!768

7 years agoUpdate docs for session ticket key rotation [ci skip]
Ander Juaristi [Thu, 4 Oct 2018 12:57:47 +0000 (14:57 +0200)] 
Update docs for session ticket key rotation [ci skip]

Fix #581.

Signed-off-by: Ander Juaristi <a@juaristi.eus>
7 years agoext/record_size_limit: handle the extension in TLS 1.2 ServerHello
Daiki Ueno [Thu, 1 Nov 2018 12:43:17 +0000 (13:43 +0100)] 
ext/record_size_limit: handle the extension in TLS 1.2 ServerHello

Previously it had assumed that TLS 1.2 servers don't send the
extension, while actually it can be present in ServerHello.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agognutls_priority_init: ignore CTYPE-OPENPGP options
Nikos Mavrogiannopoulos [Tue, 30 Oct 2018 18:56:47 +0000 (19:56 +0100)] 
gnutls_priority_init: ignore CTYPE-OPENPGP options

In GnuTLS 3.6.0 we dropped support for openpgp keys, however
the CTYPE-OPENPGP is often seen in applications, sometimes
as -CTYPE-OPENPGP to ensure it is not enabled. We simply
ignore this priority string when seen, to avoid preventing
these applications from running.

Resolves #593

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agognutls_priority_init: fixed indentation according to project rules
Nikos Mavrogiannopoulos [Tue, 30 Oct 2018 18:46:09 +0000 (19:46 +0100)] 
gnutls_priority_init: fixed indentation according to project rules

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-fix-priority-set' into 'master'
Nikos Mavrogiannopoulos [Wed, 31 Oct 2018 09:34:52 +0000 (09:34 +0000)] 
Merge branch 'tmp-fix-priority-set' into 'master'

gnutls_priority_set: do not override the version after handshake is complete

See merge request gnutls/gnutls!777

7 years agognutls_priority_set: re-organized
Nikos Mavrogiannopoulos [Fri, 19 Oct 2018 10:04:29 +0000 (12:04 +0200)] 
gnutls_priority_set: re-organized

The sanity tests we moved prior to setting these priorities
and the %GNUTLS_E_NO_PRIORITIES_WERE_SET error code is returned
consistently to indicate that the existing priorities were not
overwritten.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agognutls_priority_set: do not override the version after handshake is complete
Nikos Mavrogiannopoulos [Wed, 17 Oct 2018 12:53:47 +0000 (14:53 +0200)] 
gnutls_priority_set: do not override the version after handshake is complete

When an application would re-set priorities prior to a rehandshake
we would override the negotiated version with the highest supported,
something which may lead to issues. This disables that unnecessary
version override. See:

https://bugzilla.redhat.com/show_bug.cgi?id=1634736

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agognutls-serv: use default priorities when none are given
Nikos Mavrogiannopoulos [Tue, 30 Oct 2018 09:28:20 +0000 (10:28 +0100)] 
gnutls-serv: use default priorities when none are given

This makes it in par with gnutls-cli.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-cli-reduce-output' into 'master'
Dmitry Eremin-Solenikov [Tue, 30 Oct 2018 08:14:50 +0000 (08:14 +0000)] 
Merge branch 'tmp-cli-reduce-output' into 'master'

gnutls-cli: reduce printed session information

See merge request gnutls/gnutls!784

7 years agoMerge branch 'gost-selfcheck' into 'master'
Dmitry Eremin-Solenikov [Mon, 29 Oct 2018 16:04:36 +0000 (16:04 +0000)] 
Merge branch 'gost-selfcheck' into 'master'

self-tests: add GOST public key tests

Closes #492

See merge request gnutls/gnutls!788

7 years agoself-tests: add GOST public key tests
Dmitry Eremin-Solenikov [Sun, 28 Oct 2018 22:42:28 +0000 (01:42 +0300)] 
self-tests: add GOST public key tests

Test vectors provided in standard are not that usefull (they use
unsupported curves with a != -3), so these test vectors were generated
by hand.

Fixes #492

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agoNEWS: added CMAC entries [ci skip]
Nikos Mavrogiannopoulos [Mon, 29 Oct 2018 06:24:01 +0000 (07:24 +0100)] 
NEWS: added CMAC entries [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'cmac' into 'master'
Dmitry Eremin-Solenikov [Mon, 29 Oct 2018 00:48:55 +0000 (00:48 +0000)] 
Merge branch 'cmac' into 'master'

Add support for AES CMAC mac

Closes #351

See merge request gnutls/gnutls!786

7 years agoAdd NEWS entry about AES-CMAC
Simo Sorce [Sun, 28 Oct 2018 16:19:46 +0000 (12:19 -0400)] 
Add NEWS entry about AES-CMAC

Signed-off-by: Simo Sorce <simo@redhat.com>
7 years agoAdd selftests for CMAC
Simo Sorce [Fri, 26 Oct 2018 20:55:27 +0000 (16:55 -0400)] 
Add selftests for CMAC

Signed-off-by: Simo Sorce <simo@redhat.com>
7 years agoVendor in CMAC functionality from Nettle
Simo Sorce [Fri, 26 Oct 2018 17:38:13 +0000 (13:38 -0400)] 
Vendor in CMAC functionality from Nettle

If nettle's CMAC is not available, use a vendored in version from master.
This is necessary as long as we need to link against 3.4 for ABI
compatibility reasons.

Signed-off-by: Simo Sorce <simo@redhat.com>
7 years agoAdd CMAC Support
Simo Sorce [Fri, 26 Oct 2018 17:22:23 +0000 (13:22 -0400)] 
Add CMAC Support

Signed-off-by: Simo Sorce <simo@redhat.com>
7 years agoMerge branch 'gost-selfcheck' into 'master'
Nikos Mavrogiannopoulos [Sun, 28 Oct 2018 16:41:18 +0000 (16:41 +0000)] 
Merge branch 'gost-selfcheck' into 'master'

Selftests for symmetric GOST algorithms

See merge request gnutls/gnutls!787

7 years agoNEWS: Add entry mentioning fix of S-BOXes for CryptoPro-B,-C,-D variants
Dmitry Eremin-Solenikov [Sun, 28 Oct 2018 12:44:15 +0000 (15:44 +0300)] 
NEWS: Add entry mentioning fix of S-BOXes for CryptoPro-B,-C,-D variants

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agoself-tests: add GOST symmetric algorithms tests
Dmitry Eremin-Solenikov [Sun, 28 Oct 2018 07:13:00 +0000 (10:13 +0300)] 
self-tests: add GOST symmetric algorithms tests

Add tests for:
 - GOST 28147-89 CFB cipher
 - GOST R 34.11-94 hash function
 - Streebog-256/-512 hash functions
 - HMAC using GOST R 34.11-94/Streebog functions

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agonettle: fix s-boxes selection for rare GOST 28147-89 variants
Dmitry Eremin-Solenikov [Sun, 28 Oct 2018 07:11:21 +0000 (10:11 +0300)] 
nettle: fix s-boxes selection for rare GOST 28147-89 variants

gost28147-89 code contained c&p error, which resulted in using S-BOX
CryptoPro-A instead of -B, -C, -D. Fix that.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agodoc update [ci skip]
Nikos Mavrogiannopoulos [Fri, 26 Oct 2018 20:50:52 +0000 (22:50 +0200)] 
doc update [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'cfb8' into 'master'
Dmitry Eremin-Solenikov [Fri, 26 Oct 2018 14:15:16 +0000 (14:15 +0000)] 
Merge branch 'cfb8' into 'master'

Add support for AES CFB8 cipher

Closes #357

See merge request gnutls/gnutls!783

7 years agoMerge branch 'tmp-session-ticket-timestamp' into 'master'
Nikos Mavrogiannopoulos [Fri, 26 Oct 2018 13:43:22 +0000 (13:43 +0000)] 
Merge branch 'tmp-session-ticket-timestamp' into 'master'

TLS 1.3: calculate ticket age based on higher precision time

See merge request gnutls/gnutls!785

7 years agoext/pre_shared_key: don't assume ob_ticket_age < ticket_age_add
Daiki Ueno [Wed, 24 Oct 2018 11:08:45 +0000 (13:08 +0200)] 
ext/pre_shared_key: don't assume ob_ticket_age < ticket_age_add

Previously, the server treated the condition as error, while it is
possible that ob_ticket_age may have wrapped round by 2^32.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agotls13/session_ticket: calculate ticket_age in milliseconds
Daiki Ueno [Thu, 25 Oct 2018 10:32:52 +0000 (12:32 +0200)] 
tls13/session_ticket: calculate ticket_age in milliseconds

Previously we calculated ticket age from the current wall clock in
seconds, multiplying by 1000.  This is conceptually wrong, because
ticket age is designed to be in milliseconds.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agostr: add macros to encode/decode struct timespec value
Daiki Ueno [Fri, 26 Oct 2018 06:18:01 +0000 (08:18 +0200)] 
str: add macros to encode/decode struct timespec value

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agosystem: provide a means to replace gettime implementation
Daiki Ueno [Thu, 25 Oct 2018 11:47:13 +0000 (13:47 +0200)] 
system: provide a means to replace gettime implementation

While gettime() is extensively used in the code, the library
previously hadn't provided a way to replace it for testing.  This adds
a new internal function _gnutls_global_set_gettime_function and makes
use of it through virt-time.h.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoAdd selftest for CFB8
Simo Sorce [Wed, 24 Oct 2018 19:45:23 +0000 (15:45 -0400)] 
Add selftest for CFB8

7 years ago_gnutls_timespec_cmp: new inline function
Daiki Ueno [Thu, 25 Oct 2018 10:09:05 +0000 (12:09 +0200)] 
_gnutls_timespec_cmp: new inline function

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agotls13/session_ticket: rename tls13_ticket_t type to tls13_ticket_st
Daiki Ueno [Thu, 25 Oct 2018 10:02:53 +0000 (12:02 +0200)] 
tls13/session_ticket: rename tls13_ticket_t type to tls13_ticket_st

This is consistent with the coding guideline.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agognutls-cli: reduce printed session information
Nikos Mavrogiannopoulos [Thu, 25 Oct 2018 06:29:27 +0000 (08:29 +0200)] 
gnutls-cli: reduce printed session information

When connecting to a server we were printing a lot of duplicate
information that was already part of the "Description" string.
No longer print that information unless --verbose is given.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agognutls-cli: do not print errors twice
Nikos Mavrogiannopoulos [Wed, 24 Oct 2018 11:05:58 +0000 (13:05 +0200)] 
gnutls-cli: do not print errors twice

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoVendor in CFB8 functionality from Nettle
Simo Sorce [Wed, 24 Oct 2018 17:04:22 +0000 (13:04 -0400)] 
Vendor in CFB8 functionality from Nettle

If nettle's CFB8 is not available, use a vendored in version from master.
This is necessary as long as we need to link against 3.4 for ABI
compatibility reasons.

Signed-off-by: Simo Sorce <simo@redhat.com>
7 years agoAdd AES-CFB8 Support
Simo Sorce [Wed, 24 Oct 2018 16:14:51 +0000 (12:14 -0400)] 
Add AES-CFB8 Support

Signed-off-by: Simo Sorce <simo@redhat.com>
7 years agoMerge branch 'tmp-fix-fips-mode' into 'master'
Nikos Mavrogiannopoulos [Wed, 24 Oct 2018 11:16:26 +0000 (11:16 +0000)] 
Merge branch 'tmp-fix-fips-mode' into 'master'

fips140: aligned code with documentation

See merge request gnutls/gnutls!781

7 years agoMerge branch 'tmp-initialize-so-pin-fix' into 'master'
Nikos Mavrogiannopoulos [Wed, 24 Oct 2018 10:51:08 +0000 (10:51 +0000)] 
Merge branch 'tmp-initialize-so-pin-fix' into 'master'

p11tool: fix admin user PIN initialization

Closes #561

See merge request gnutls/gnutls!776

7 years agop11tool: fix initialization of security officer's PIN
Nikos Mavrogiannopoulos [Mon, 15 Oct 2018 13:59:48 +0000 (15:59 +0200)] 
p11tool: fix initialization of security officer's PIN

Previously we would call gnutls_pkcs11_token_set_pin() without an
old PIN provided, which will result to the use of C_InitPIN() on the
underlying module. The C_InitPIN() in contrast with C_SetPIN() will
only work for the user and not for the administrator. As such, we
always provide the oldpin for when we change the admin's PIN.

Resolves #561

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agofips140: aligned code with documentation 781/head
Nikos Mavrogiannopoulos [Tue, 23 Oct 2018 13:20:45 +0000 (15:20 +0200)] 
fips140: aligned code with documentation

That is, we introduce the documented but unimplemented macros
GNUTLS_FIPS140_SET_LAX_MODE() and GNUTLS_FIPS140_SET_STRICT_MODE().

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp_cleanup_and_fixes' into 'master'
Nikos Mavrogiannopoulos [Tue, 23 Oct 2018 06:10:05 +0000 (06:10 +0000)] 
Merge branch 'tmp_cleanup_and_fixes' into 'master'

Cleanup and fixes

Closes #453

See merge request gnutls/gnutls!779

7 years agoSimplified check for NULL pointer to reduce code changes.
Tom Vrancken [Mon, 22 Oct 2018 08:52:08 +0000 (10:52 +0200)] 
Simplified check for NULL pointer to reduce code changes.

Signed-off-by: Tom Vrancken <dev@tomvrancken.nl>
7 years agoUnified abbreviation for certificate type priorities in code.
Tom Vrancken [Mon, 22 Oct 2018 08:51:19 +0000 (10:51 +0200)] 
Unified abbreviation for certificate type priorities in code.

Signed-off-by: Tom Vrancken <dev@tomvrancken.nl>
7 years agoMerge branch 'tmp-update-tlsfuzzer' into 'master'
Nikos Mavrogiannopoulos [Fri, 19 Oct 2018 08:37:34 +0000 (08:37 +0000)] 
Merge branch 'tmp-update-tlsfuzzer' into 'master'

update tlsfuzzer scripts to latest version

Closes #591

See merge request gnutls/gnutls!774

7 years agoRenamed CHECK_AUTH macro to CHECK_AUTH_TYPE to be more clear what it checks.
Tom Vrancken [Thu, 11 Oct 2018 19:25:11 +0000 (21:25 +0200)] 
Renamed CHECK_AUTH macro to CHECK_AUTH_TYPE to be more clear what it checks.

Signed-off-by: Tom Vrancken <dev@tomvrancken.nl>
7 years agoRenamed _gnutls_server_select_cert() to _gnutls_select_server_cert() for consistency...
Tom Vrancken [Thu, 11 Oct 2018 19:13:45 +0000 (21:13 +0200)] 
Renamed _gnutls_server_select_cert() to _gnutls_select_server_cert() for consistency reasons with its client couterpart.

Signed-off-by: Tom Vrancken <dev@tomvrancken.nl>
7 years agoRenamed certificate_credential_append_crt_list() to certificate_credential_append_key...
Tom Vrancken [Thu, 11 Oct 2018 19:05:33 +0000 (21:05 +0200)] 
Renamed certificate_credential_append_crt_list() to certificate_credential_append_keypair().

Signed-off-by: Tom Vrancken <dev@tomvrancken.nl>
7 years agoRenamed _gnutls_auth_info_set() to _gnutls_auth_info_init().
Tom Vrancken [Thu, 11 Oct 2018 19:01:25 +0000 (21:01 +0200)] 
Renamed _gnutls_auth_info_set() to _gnutls_auth_info_init().

Signed-off-by: Tom Vrancken <dev@tomvrancken.nl>
7 years agoRenamed fields in priority_st to improve code readability. Fixes #453.
Tom Vrancken [Wed, 23 May 2018 08:16:00 +0000 (10:16 +0200)] 
Renamed fields in priority_st to improve code readability. Fixes #453.

Signed-off-by: Tom Vrancken <dev@tomvrancken.nl>
7 years agoAdded NULL pointer check in gnutls_certificate_free_credentials for safety.
Tom Vrancken [Tue, 22 May 2018 10:35:31 +0000 (12:35 +0200)] 
Added NULL pointer check in gnutls_certificate_free_credentials for safety.

Signed-off-by: Tom Vrancken <dev@tomvrancken.nl>
7 years agoRenamed _gnutls_proc_x509_server_crt to _gnutls_proc_x509_crt.
Tom Vrancken [Mon, 21 May 2018 08:11:28 +0000 (10:11 +0200)] 
Renamed _gnutls_proc_x509_server_crt to _gnutls_proc_x509_crt.

Signed-off-by: Tom Vrancken <dev@tomvrancken.nl>
7 years agoSmall fixes for comments and log strings.
Tom Vrancken [Sat, 19 May 2018 14:01:01 +0000 (16:01 +0200)] 
Small fixes for comments and log strings.

Signed-off-by: Tom Vrancken <dev@tomvrancken.nl>
7 years agoMerge branch 'tmp-uris' into 'master'
Nikos Mavrogiannopoulos [Thu, 18 Oct 2018 19:14:49 +0000 (19:14 +0000)] 
Merge branch 'tmp-uris' into 'master'

pkcs11 uris: the scheme is case insensitive

Closes #590

See merge request gnutls/gnutls!616

7 years agoMerge branch 'tmp-fix-global-init-override' into 'master'
Nikos Mavrogiannopoulos [Thu, 18 Oct 2018 12:45:49 +0000 (12:45 +0000)] 
Merge branch 'tmp-fix-global-init-override' into 'master'

SKIP tests/global-init-override if weak symbols don't work

Closes #592

See merge request gnutls/gnutls!778

7 years agoSKIP tests/global-init-override if weak symbols don't work
Tim Rühsen [Thu, 18 Oct 2018 09:09:09 +0000 (11:09 +0200)] 
SKIP tests/global-init-override if weak symbols don't work

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agotests: eagain-auto-auth: only compiled in systems with cmocka available
Nikos Mavrogiannopoulos [Tue, 16 Oct 2018 13:06:04 +0000 (15:06 +0200)] 
tests: eagain-auto-auth: only compiled in systems with cmocka available

This fixes build issue at MacOSX CI.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agotlsfuzzer: updated to latest upstream and enabled new tests
Nikos Mavrogiannopoulos [Fri, 12 Oct 2018 14:36:12 +0000 (16:36 +0200)] 
tlsfuzzer: updated to latest upstream and enabled new tests

Resolves: #591

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agohandshake: send missing extension alert
Nikos Mavrogiannopoulos [Fri, 12 Oct 2018 15:08:15 +0000 (17:08 +0200)] 
handshake: send missing extension alert

When a key share extension is not seen under TLS1.3, send
the missing extension alert.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-auto-reauth' into 'master'
Nikos Mavrogiannopoulos [Tue, 16 Oct 2018 10:50:19 +0000 (10:50 +0000)] 
Merge branch 'tmp-auto-reauth' into 'master'

gnutls_init: added flag for automatic re-authentication

Closes #571

See merge request gnutls/gnutls!766

7 years ago_gnutls_server_select_cert: return error when no server cert is selected
Nikos Mavrogiannopoulos [Thu, 4 Oct 2018 06:27:10 +0000 (08:27 +0200)] 
_gnutls_server_select_cert: return error when no server cert is selected

When a certificate callback is used and no certificate is provided
by it, return an error rather than trying to use it (and crashing)
later. Note that this affects only an "illegal" code path when
a server would have provided no certificate, something which must
not happen on a real-world server.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agognutls_init: added flag for automatic re-authentication
Nikos Mavrogiannopoulos [Mon, 1 Oct 2018 09:58:15 +0000 (11:58 +0200)] 
gnutls_init: added flag for automatic re-authentication

This introduces the GNUTLS_AUTO_REAUTH gnutls_init() flag and makes
re-authentication under TLS simpler to enable and use.

Resolves #571

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agopkcs11 uris: the URI scheme is case insensitive
Nikos Mavrogiannopoulos [Thu, 29 Mar 2018 12:21:59 +0000 (14:21 +0200)] 
pkcs11 uris: the URI scheme is case insensitive

Makes the comparisons of the URI scheme to use c_strcasecmp
from gnulib. It also replaces various straw strcasecmp with
the gnulib variant. This ensures that comparison will be
reliable irrespective of the locale.

Resolves #590

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years ago.gitlab-ci.yml: cross CI requires privileged systems
Nikos Mavrogiannopoulos [Thu, 11 Oct 2018 19:49:11 +0000 (21:49 +0200)] 
.gitlab-ci.yml: cross CI requires privileged systems

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-fix-eina-cpu-on-solaris' into 'master'
Nikos Mavrogiannopoulos [Wed, 10 Oct 2018 04:59:28 +0000 (04:59 +0000)] 
Merge branch 'tmp-fix-eina-cpu-on-solaris' into 'master'

Fix check for GNU C compiler in eina_cpu.c

See merge request gnutls/gnutls!772

7 years agoMerge branch 'tmp-fix-gen-mech-list-on-solaris' into 'master'
Tim Rühsen [Tue, 9 Oct 2018 14:10:23 +0000 (14:10 +0000)] 
Merge branch 'tmp-fix-gen-mech-list-on-solaris' into 'master'

Fix gen-mech-list.sh on Solaris / Bourne Shell

See merge request gnutls/gnutls!771

7 years agoFix check for GNU C compiler in eina_cpu.c
Tim Rühsen [Tue, 9 Oct 2018 10:46:12 +0000 (12:46 +0200)] 
Fix check for GNU C compiler in eina_cpu.c

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoFix gen-mech-list.sh on Solaris / Bourne Shell
Tim Rühsen [Tue, 9 Oct 2018 10:34:26 +0000 (12:34 +0200)] 
Fix gen-mech-list.sh on Solaris / Bourne Shell

`cmd` is more compatible than $(cmd).

The shell is "sh (Schily Bourne Shell) version 2013/01/14 a+ (i386-pc-solaris2.9)"

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-check-prereqs' into 'master'
Nikos Mavrogiannopoulos [Mon, 8 Oct 2018 18:36:41 +0000 (18:36 +0000)] 
Merge branch 'tmp-check-prereqs' into 'master'

Let bootstrap check for gperf, makeinfo, rsync, autopoint

Closes #582

See merge request gnutls/gnutls!769

7 years agoMerge branch 'tmp-fix-584' into 'master'
Nikos Mavrogiannopoulos [Mon, 8 Oct 2018 18:35:52 +0000 (18:35 +0000)] 
Merge branch 'tmp-fix-584' into 'master'

Skip tests/tls13/prf.c if visibility 'protected' doesn't work

Closes #584

See merge request gnutls/gnutls!770

7 years agoLet bootstrap check for gperf and autopoint
Tim Rühsen [Fri, 5 Oct 2018 17:41:15 +0000 (19:41 +0200)] 
Let bootstrap check for gperf and autopoint

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoSkip tests/tls13/prf.c if visibility 'protected' doesn't work
Tim Rühsen [Mon, 8 Oct 2018 09:25:23 +0000 (11:25 +0200)] 
Skip tests/tls13/prf.c if visibility 'protected' doesn't work

Overriding gnutls_rnd() with visibility 'protected' doesn't always work.
E.g. LDFLAGS="-Wl,-Bsymbolic-functions" seems to have priority on
Debian derived systems.

Fixes #584

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agotests: added unit test for gnutls_session_set_id
Nikos Mavrogiannopoulos [Sat, 6 Oct 2018 14:43:33 +0000 (16:43 +0200)] 
tests: added unit test for gnutls_session_set_id

This adds a unit and a negative test which ensures that
a client will not be tricked in performing resumption when
this function is used.

Resolves #585

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agodoc: fix use of gnutls_ext_raw_parse callback [ci skip]
Nikos Mavrogiannopoulos [Thu, 4 Oct 2018 06:29:41 +0000 (08:29 +0200)] 
doc: fix use of gnutls_ext_raw_parse callback [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-fix-priority-set-call' into 'master'
Nikos Mavrogiannopoulos [Thu, 4 Oct 2018 06:09:09 +0000 (06:09 +0000)] 
Merge branch 'tmp-fix-priority-set-call' into 'master'

gnutls_priority_set: do not override version on handshake

Closes #580

See merge request gnutls/gnutls!765

7 years agognutls_priority_set: do not override version on handshake
Nikos Mavrogiannopoulos [Sun, 30 Sep 2018 20:05:59 +0000 (22:05 +0200)] 
gnutls_priority_set: do not override version on handshake

When handshake is in progress, do not override the default TLS
version in the session. This allows gnutls_priority_set to be called
in the post_client_hello function without breaking the handshake.

Resolves #580

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-check-iv-size' into 'master'
Nikos Mavrogiannopoulos [Wed, 3 Oct 2018 09:13:25 +0000 (09:13 +0000)] 
Merge branch 'tmp-check-iv-size' into 'master'

encrypt_packet_tls13: added explicit check on iv_size bounds

See merge request gnutls/gnutls!767

7 years agoencrypt_packet_tls13: added explicit check on iv_size bounds
Nikos Mavrogiannopoulos [Tue, 2 Oct 2018 09:57:31 +0000 (11:57 +0200)] 
encrypt_packet_tls13: added explicit check on iv_size bounds

Although there are no ciphers defined for TLS1.3 which would overflow
the assumed bound, an explicit check is necessary to avoid that code
be a liability in future updates.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoprivkey_pkcs8: added reference for validation parameters OID [ci skip]
Nikos Mavrogiannopoulos [Mon, 1 Oct 2018 07:18:46 +0000 (09:18 +0200)] 
privkey_pkcs8: added reference for validation parameters OID [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoNEWS: corrected typo [ci skip]
Nikos Mavrogiannopoulos [Mon, 1 Oct 2018 06:31:16 +0000 (08:31 +0200)] 
NEWS: corrected typo [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-lib-c-strcase' into 'master'
Nikos Mavrogiannopoulos [Sat, 29 Sep 2018 10:46:40 +0000 (10:46 +0000)] 
Merge branch 'tmp-lib-c-strcase' into 'master'

Use ASCII version of strcasecmp() in library code

Closes #570

See merge request gnutls/gnutls!764

7 years agoMerge branch 'tlsfuzzer-ssl3' into 'master'
Nikos Mavrogiannopoulos [Sat, 29 Sep 2018 03:41:39 +0000 (03:41 +0000)] 
Merge branch 'tlsfuzzer-ssl3' into 'master'

tlsfuzzer: add missing script

See merge request gnutls/gnutls!759

7 years agoMerge branch 'tmp-fix-buffer-t' into 'master'
Nikos Mavrogiannopoulos [Fri, 28 Sep 2018 16:17:01 +0000 (16:17 +0000)] 
Merge branch 'tmp-fix-buffer-t' into 'master'

Make tlsproxy/buffer.c compilable by gcc 4.4.7

Closes #577

See merge request gnutls/gnutls!763

7 years agoMerge branch 'tmp-cleanup-in-docs' into 'master'
Tim Rühsen [Fri, 28 Sep 2018 07:10:55 +0000 (07:10 +0000)] 
Merge branch 'tmp-cleanup-in-docs' into 'master'

manpage generation cleanup

See merge request gnutls/gnutls!760

7 years agoUse ASCII version of strcasecmp() in library code
Tim Rühsen [Thu, 27 Sep 2018 19:11:21 +0000 (21:11 +0200)] 
Use ASCII version of strcasecmp() in library code

strcasecmp() has side effects in some locales.
What we really need is c_strcasecmp() from Gnulib for comparing
ASCII strings.

Fixes #570

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years ago.gitlab-ci.yml: reenable SSLv2 hello support for SSL-3.0.Fedora.x86_64
Dmitry Eremin-Solenikov [Thu, 27 Sep 2018 08:02:33 +0000 (11:02 +0300)] 
.gitlab-ci.yml: reenable SSLv2 hello support for SSL-3.0.Fedora.x86_64

Reenable SSLv2 hello support to let several SSL-3.0 tls-fuzzer tests
pass.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agotlsfuzzer: disable SSL3.0 in export-ciphers-rejected test
Dmitry Eremin-Solenikov [Wed, 26 Sep 2018 22:05:09 +0000 (01:05 +0300)] 
tlsfuzzer: disable SSL3.0 in export-ciphers-rejected test

These tests will fail with SSL3.0-enabled gnutls-serv unless --ssl3
option was passed. We will run these tests anyway from
gnutls-nocert-ssl3.json, so disable them here.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agotlsfuzzer: support running from separate build dir
Dmitry Eremin-Solenikov [Wed, 26 Sep 2018 21:42:21 +0000 (00:42 +0300)] 
tlsfuzzer: support running from separate build dir

Adapt tls-fuzzer-common.sh script to be able to run tests in case
srcdir != builddir.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years ago.gitlab-ci.yml: reenable full test suite in SSL-3.0/SHA-1 case
Dmitry Eremin-Solenikov [Tue, 25 Sep 2018 14:00:14 +0000 (17:00 +0300)] 
.gitlab-ci.yml: reenable full test suite in SSL-3.0/SHA-1 case

Reenable full test suite run in SSL-3.0/SHA-1 CI test case to let us
catch issues in legacy code.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agotlsfuzzer: add missing script
Dmitry Eremin-Solenikov [Mon, 24 Sep 2018 13:07:19 +0000 (16:07 +0300)] 
tlsfuzzer: add missing script

Makefile.am refers tls-fuzzer-nocert-ssl3.sh script, which is missing
in the source tree. Add it back.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agotlsfuzzer: move common code to separate file
Dmitry Eremin-Solenikov [Wed, 26 Sep 2018 21:35:20 +0000 (00:35 +0300)] 
tlsfuzzer: move common code to separate file

Move common code to tls-fuzzer-common.sh to ease further adjustments.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agotlsfuzzer: use random port for tls-fuzzer-nocert test
Dmitry Eremin-Solenikov [Wed, 26 Sep 2018 20:34:16 +0000 (23:34 +0300)] 
tlsfuzzer: use random port for tls-fuzzer-nocert test

Like the rest of tls-fuzzer tests, pass "-p PORT" to subtests, allowing
usage of random port for server.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agotlsfuzzer: use random port for tls-fuzzer-cert test
Dmitry Eremin-Solenikov [Wed, 26 Sep 2018 20:34:16 +0000 (23:34 +0300)] 
tlsfuzzer: use random port for tls-fuzzer-cert test

Like the rest of tls-fuzzer tests, pass "-p PORT" to subtests, allowing
usage of random port for server.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agoMerge branch 'tmp-eliminate-dead-code' into 'master'
Nikos Mavrogiannopoulos [Wed, 26 Sep 2018 18:16:54 +0000 (18:16 +0000)] 
Merge branch 'tmp-eliminate-dead-code' into 'master'

_gnutls_check_key_purpose: eliminated dead code

Closes #573

See merge request gnutls/gnutls!762