]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
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

7 years agoMake tlsproxy/buffer.c compilable by gcc 4.4.7
Tim Rühsen [Wed, 26 Sep 2018 10:54:37 +0000 (12:54 +0200)] 
Make tlsproxy/buffer.c compilable by gcc 4.4.7

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

Resolves #573

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

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

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

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

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

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

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

mech-list.h: generate unique entries

See merge request gnutls/gnutls!761

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

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

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

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

Resolves #544

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

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

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

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

Provide a less restrictive PKCS#11 search of certificates

Closes #569

See merge request gnutls/gnutls!757

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

gnutls-cli enables CRL validation on startup

Closes #564

See merge request gnutls/gnutls!752

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

Session ticket key rotation with TOTP

Closes #184

See merge request gnutls/gnutls!695

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

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

Resolves #564

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

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

Resolves #569

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

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

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

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

See merge request gnutls/gnutls!753

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

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

Fix issue introduced in 20886264fe

See merge request gnutls/gnutls!756

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

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

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

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

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

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

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

GOST endianness

See merge request gnutls/gnutls!755

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

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

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

Resolves #184

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

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

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

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

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

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

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

Add little endian counterpart to _gnutls_mpi_dprint and
_gnutls_mpi_dprint_le.

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

gnutls.h: correct GOST R number references

See merge request gnutls/gnutls!750

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

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

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

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

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

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

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

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

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

Relates #552

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>