]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
8 years ago.gitlab-ci.yml: move destructive tests after trust store tests
Nikos Mavrogiannopoulos [Tue, 21 Nov 2017 12:05:12 +0000 (13:05 +0100)] 
.gitlab-ci.yml: move destructive tests after trust store tests

That is, to ensure they are only run after the trust store
is complete and that it doesn't affect its output.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update
Nikos Mavrogiannopoulos [Mon, 20 Nov 2017 13:43:21 +0000 (14:43 +0100)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: include the 8192-bit SRP prime into param checks
Nikos Mavrogiannopoulos [Mon, 20 Nov 2017 13:34:20 +0000 (14:34 +0100)] 
tests: include the 8192-bit SRP prime into param checks

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agosrp: added the 8192-bit prime
Nikos Mavrogiannopoulos [Mon, 20 Nov 2017 13:33:33 +0000 (14:33 +0100)] 
srp: added the 8192-bit prime

As we now reject any primes not in the SRP spec, we include
that parameter to ensure we can handle clients within the
spec but with large parameters.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agosrp: reject any parameters not in the SRP draft
Nikos Mavrogiannopoulos [Mon, 20 Nov 2017 13:10:02 +0000 (14:10 +0100)] 
srp: reject any parameters not in the SRP draft

This implements the SHOULD requirement from RFC5054, i.e., to
only accept group parameters that come from a trusted source,
such as those listed in Appendix A.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agofuzz: srp-client: decreased acceptable prime bits to 1024 [ci skip]
Nikos Mavrogiannopoulos [Mon, 20 Nov 2017 13:07:12 +0000 (14:07 +0100)] 
fuzz: srp-client: decreased acceptable prime bits to 1024 [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: combined key and cert tests
Nikos Mavrogiannopoulos [Thu, 9 Nov 2017 08:47:10 +0000 (09:47 +0100)] 
tests: combined key and cert tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: windows subdir is only included on windows builds
Nikos Mavrogiannopoulos [Thu, 9 Nov 2017 08:40:23 +0000 (09:40 +0100)] 
tests: windows subdir is only included on windows builds

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: dtls subdir was merged into main tests
Nikos Mavrogiannopoulos [Wed, 8 Nov 2017 15:32:48 +0000 (16:32 +0100)] 
tests: dtls subdir was merged into main tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agofuzz: srp-client: restrict prime bits to 1537 [ci skip]
Nikos Mavrogiannopoulos [Mon, 20 Nov 2017 12:49:55 +0000 (13:49 +0100)] 
fuzz: srp-client: restrict prime bits to 1537 [ci skip]

That avoids timeouts in the oss-fuzz infrastructure:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3277

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: corrected typo
Nikos Mavrogiannopoulos [Sun, 19 Nov 2017 15:39:16 +0000 (16:39 +0100)] 
doc: corrected typo

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodoc: better detect acronym keyword on latex output
Nikos Mavrogiannopoulos [Thu, 16 Nov 2017 15:57:29 +0000 (16:57 +0100)] 
doc: better detect acronym keyword on latex output

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: latex: resolve all citation issues
Nikos Mavrogiannopoulos [Thu, 16 Nov 2017 15:53:46 +0000 (16:53 +0100)] 
doc: latex: resolve all citation issues

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: citations translate into references in texinfo
Nikos Mavrogiannopoulos [Thu, 16 Nov 2017 15:43:21 +0000 (16:43 +0100)] 
doc: citations translate into references in texinfo

That makes the citations to be links in the generated html manual.

Resolves: #321

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agop11tool: renamed pkcs11_set_pin() to allow static linking
Nikos Mavrogiannopoulos [Mon, 13 Nov 2017 10:03:35 +0000 (11:03 +0100)] 
p11tool: renamed pkcs11_set_pin() to allow static linking

Resolves #322

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agocfg.mk: do not include reproducer files into syntax checks
Nikos Mavrogiannopoulos [Wed, 15 Nov 2017 10:47:31 +0000 (11:47 +0100)] 
cfg.mk: do not include reproducer files into syntax checks

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_x509_ext_import_proxy: corrected memory leak
Nikos Mavrogiannopoulos [Wed, 15 Nov 2017 09:31:00 +0000 (10:31 +0100)] 
gnutls_x509_ext_import_proxy: corrected memory leak

Also added reproducer for the memory leak found.

Issue found using oss-fuzz:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3159

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotools: do not access unused variables
Nikos Mavrogiannopoulos [Wed, 8 Nov 2017 12:56:56 +0000 (13:56 +0100)] 
tools: do not access unused variables

This avoids warnings by static analyzers.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago.gitlab-ci.yml: disabled gcc warnings on CI builds and use dash
Nikos Mavrogiannopoulos [Wed, 8 Nov 2017 09:51:51 +0000 (10:51 +0100)] 
.gitlab-ci.yml: disabled gcc warnings on CI builds and use dash

That should decrease the time spent in configure. Based on suggestions
by Tim Ruehsen.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago.gitlab-ci.yml: use configure cache file and ccache
Nikos Mavrogiannopoulos [Sun, 5 Nov 2017 19:46:47 +0000 (20:46 +0100)] 
.gitlab-ci.yml: use configure cache file and ccache

That reduces the total time spent per build by caching configure
checks, and compilation artifacts.

Also that patch set no longer uploads coverage files as artifacts.
These files are not generally useful, and removing that "feature"
will reduce CI running time.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agodoc: corrected typo [ci skip]
Nikos Mavrogiannopoulos [Sat, 4 Nov 2017 16:18:23 +0000 (17:18 +0100)] 
doc: corrected typo [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: list-tokens: not only list but also verify whether module is operational
Nikos Mavrogiannopoulos [Fri, 3 Nov 2017 14:10:03 +0000 (15:10 +0100)] 
tests: list-tokens: not only list but also verify whether module is operational

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopkcs11: refuse to load modules with duplicate information
Nikos Mavrogiannopoulos [Fri, 3 Nov 2017 14:03:35 +0000 (15:03 +0100)] 
pkcs11: refuse to load modules with duplicate information

That is, when ck_info matches, we soft fail loading the module.
That is, because in several cases the pointers got by p11-kit
may differ for the same modules.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: enhanced PKCS#11 loading test
Nikos Mavrogiannopoulos [Fri, 3 Nov 2017 13:33:24 +0000 (14:33 +0100)] 
tests: enhanced PKCS#11 loading test

Test whether implicit initialization in trusted module (e.g.,
via verification), would result to proper initialization of additional
modules once a PCKS#11 function is called.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added PKCS#11 module loading test
Nikos Mavrogiannopoulos [Mon, 30 Oct 2017 12:51:33 +0000 (13:51 +0100)] 
tests: added PKCS#11 module loading test

This checks:
 1. Whether all modules are loaded from p11-kit when
    no explicit gnutls_pkcs11_init() is called and
    pkcs11 calls are accessed.
 2. Whether only the trusted modules are loaded from
    p11-kit and no other PKCS#11 calls than PKCS#11
    cert validation is performed.
 3. Whether the trusted modules are loaded when
    gnutls_pkcs11_init() is called with manual
    flag.

Resolves #315
Resolves #316

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopkcs11: allow loading trusted modules when pkcs11 was initialized in manual mode
Nikos Mavrogiannopoulos [Mon, 30 Oct 2017 10:29:38 +0000 (11:29 +0100)] 
pkcs11: allow loading trusted modules when pkcs11 was initialized in manual mode

When a PKCS#11 trust module is used in the system, but gnutls_pkcs11_init()
is explicitly called with GNUTLS_PKCS11_FLAG_MANUAL flag, then the PKCS#11
trust store was not loaded, and thus prevent any certificate validation.

This change allows initializing the trust modules only even if generic
PKCS#11 support is disabled by the application.

Relates #316

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopkcs11: introduce multiple levels of loading
Nikos Mavrogiannopoulos [Mon, 30 Oct 2017 08:57:09 +0000 (09:57 +0100)] 
pkcs11: introduce multiple levels of loading

That allows to load the PKCS#11 trusted modules (on systems which use them)
without loading all the potentially present PKCS#11 modules.

Relates #315

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoCONTRIBUTING.md: added a short text on reviewing code [ci skip]
Nikos Mavrogiannopoulos [Tue, 31 Oct 2017 08:18:15 +0000 (09:18 +0100)] 
CONTRIBUTING.md: added a short text on reviewing code [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoFix non-null warning
Roberto Newmon [Sun, 29 Oct 2017 08:30:02 +0000 (08:30 +0000)] 
Fix non-null warning

Help the compiler understand the control flow in the MATCH_FUNC and
INVALID_MATCH_FUNC macros.

Because we are using macros, the compiler is not able to correlate the
replaced values of the macro variables to each other yielding non-null
warnings. Introduce a C variable to mimic the macro variable helping
the compiler understanding the control flow.

8 years agotests: test whether PKCS#11 generation works without login
Nikos Mavrogiannopoulos [Sat, 21 Oct 2017 13:17:22 +0000 (15:17 +0200)] 
tests: test whether PKCS#11 generation works without login

Resolves #147

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agop11tool: attempt to auto-login when the token requires it
Nikos Mavrogiannopoulos [Sat, 21 Oct 2017 13:10:03 +0000 (15:10 +0200)] 
p11tool: attempt to auto-login when the token requires it

In operations like generation or writing objects, run as if --login
was given if the token is marked to require login.

Relates #147

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agop11tool: print PKCS#11 token flags in --list-tokens
Nikos Mavrogiannopoulos [Sat, 21 Oct 2017 13:01:53 +0000 (15:01 +0200)] 
p11tool: print PKCS#11 token flags in --list-tokens

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agopkcs11: forward token flags to applications
Nikos Mavrogiannopoulos [Sat, 21 Oct 2017 12:53:37 +0000 (14:53 +0200)] 
pkcs11: forward token flags to applications

That is, gnutls_pkcs11_token_get_flags() will not return the
most common/useful PKCS#11 token flags, in addition to trusted and HW
flags.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodoc update [ci skip] gnutls_3_6_1
Nikos Mavrogiannopoulos [Sat, 21 Oct 2017 07:44:37 +0000 (09:44 +0200)] 
doc update [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodoc update
Nikos Mavrogiannopoulos [Sat, 21 Oct 2017 00:18:07 +0000 (02:18 +0200)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodoc update [ci skip]
Nikos Mavrogiannopoulos [Thu, 19 Oct 2017 08:14:33 +0000 (10:14 +0200)] 
doc update [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_server_name_set: Clarify meaning of the name_length parameter [ci skip]
Thomas Klute [Wed, 18 Oct 2017 17:50:57 +0000 (19:50 +0200)] 
gnutls_server_name_set: Clarify meaning of the name_length parameter [ci skip]

Signed-off-by: Thomas Klute <thomas2.klute@uni-dortmund.de>
8 years agodoc: mention SHA224 removal in upgrade guide
Nikos Mavrogiannopoulos [Wed, 18 Oct 2017 13:57:53 +0000 (15:57 +0200)] 
doc: mention SHA224 removal in upgrade guide

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agobumped version
Nikos Mavrogiannopoulos [Wed, 18 Oct 2017 13:55:57 +0000 (15:55 +0200)] 
bumped version

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-serv: print the right error code on OCSP request setting
Nikos Mavrogiannopoulos [Wed, 18 Oct 2017 08:18:33 +0000 (10:18 +0200)] 
gnutls-serv: print the right error code on OCSP request setting

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoocsptool: doc update
Nikos Mavrogiannopoulos [Wed, 18 Oct 2017 11:42:21 +0000 (13:42 +0200)] 
ocsptool: doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update [ci skip]
Nikos Mavrogiannopoulos [Mon, 16 Oct 2017 09:41:36 +0000 (11:41 +0200)] 
doc update [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agocmp_hsk_types: fixed check for SSLv2 hello
Nikos Mavrogiannopoulos [Wed, 27 Sep 2017 11:25:02 +0000 (13:25 +0200)] 
cmp_hsk_types: fixed check for SSLv2 hello

Previously, if SSLv2 hello support was disabled, the check for
the expected TLS message was incorrect.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: improve documentation on provable private keys
Nikos Mavrogiannopoulos [Sat, 7 Oct 2017 08:06:09 +0000 (10:06 +0200)] 
doc: improve documentation on provable private keys

Resolves #301

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodoc: enhanced text on PKCS#7 and public keys
Nikos Mavrogiannopoulos [Sat, 7 Oct 2017 07:44:54 +0000 (09:44 +0200)] 
doc: enhanced text on PKCS#7 and public keys

Resolves #302

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: check whether key IDs with SHA512 are corrected calculated
Nikos Mavrogiannopoulos [Sun, 1 Oct 2017 10:20:18 +0000 (12:20 +0200)] 
tests: check whether key IDs with SHA512 are corrected calculated

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agocerttool: allow using SHA512 for key IDs
Nikos Mavrogiannopoulos [Sun, 1 Oct 2017 10:18:54 +0000 (12:18 +0200)] 
certtool: allow using SHA512 for key IDs

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years ago_gnutls_get_key_id: introduce flag GNUTLS_KEYID_USE_SHA512
Nikos Mavrogiannopoulos [Sun, 1 Oct 2017 10:17:26 +0000 (12:17 +0200)] 
_gnutls_get_key_id: introduce flag GNUTLS_KEYID_USE_SHA512

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: check fingerprint generation with SHA512
Nikos Mavrogiannopoulos [Sun, 1 Oct 2017 10:14:11 +0000 (12:14 +0200)] 
tests: check fingerprint generation with SHA512

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agocerttool: allow using --fingerprint with sha384 or sha512
Nikos Mavrogiannopoulos [Sun, 1 Oct 2017 10:12:25 +0000 (12:12 +0200)] 
certtool: allow using --fingerprint with sha384 or sha512

Resolves #295

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoModernize gtk-doc support
Andreas Metzler [Wed, 27 Sep 2017 17:21:59 +0000 (19:21 +0200)] 
Modernize gtk-doc support

Update gtk-doc.make, m4/gtk-doc.m4 and doc/reference/Makefile.am from
gtk-doc git head (that is 1.26 +
c08cc78562c59082fc83b55b58747177510b7a70).
Disable gtkdoc-check.

Signed-off-by: Andreas Metzler <ametzler@bebt.de>
8 years agoFix autoreconf invocation to actually run autopoint
Rowan Thorpe [Wed, 27 Sep 2017 18:41:43 +0000 (21:41 +0300)] 
Fix autoreconf invocation to actually run autopoint

Signed-off-by: Rowan Thorpe <rowan@rowanthorpe.com>
8 years agoCONTRIBUTING.md: added some text on introducing new APIs [ci skip]
Nikos Mavrogiannopoulos [Mon, 25 Sep 2017 14:57:31 +0000 (16:57 +0200)] 
CONTRIBUTING.md: added some text on introducing new APIs [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: re-purposed client_dsa_key test to match new behavior of the library
Nikos Mavrogiannopoulos [Sun, 24 Sep 2017 08:52:08 +0000 (10:52 +0200)] 
tests: re-purposed client_dsa_key test to match new behavior of the library

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: update TLS 1.2 tests to account for RSA-PSS client signatures
Nikos Mavrogiannopoulos [Sun, 24 Sep 2017 08:47:05 +0000 (10:47 +0200)] 
tests: update TLS 1.2 tests to account for RSA-PSS client signatures

On commit de4f55b4dcf4bbe8f788e1f8f5bd59cd596f7d36:
"signature: on client side, refuse to negotiate non-enabled signature schemes"

the behavior of allowing a client to utilize disabled for the session
signatures, and thus the negotiated signatures now match the ones
in the session's priority string.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agosignature: on client side, refuse to negotiate non-enabled signature schemes
Nikos Mavrogiannopoulos [Sat, 23 Sep 2017 06:37:50 +0000 (08:37 +0200)] 
signature: on client side, refuse to negotiate non-enabled signature schemes

That amends/reverts commit 6aa8c390b08a25b18c0799fbd42bd0eec703fae4:
"On client side allow signing with the signature algorithm of our cert"

Previously, when we initially disabled DSA, we allowed client certificates
which can do DSA-SHA1 to be utilized to ease migration from these certificates.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years ago_gnutls_epoch_gc: ensure there are no stray epochs after gc
Nikos Mavrogiannopoulos [Fri, 15 Sep 2017 07:53:01 +0000 (09:53 +0200)] 
_gnutls_epoch_gc: ensure there are no stray epochs after gc

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoconstate: simplified allocation of epochs
Nikos Mavrogiannopoulos [Fri, 15 Sep 2017 07:29:30 +0000 (09:29 +0200)] 
constate: simplified allocation of epochs

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_epoch_get(): simplified use
Nikos Mavrogiannopoulos [Fri, 15 Sep 2017 06:26:22 +0000 (08:26 +0200)] 
_gnutls_epoch_get(): simplified use

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_x509_crt/q_set_spki: always initialize the spki structure
Nikos Mavrogiannopoulos [Sun, 24 Sep 2017 15:42:01 +0000 (17:42 +0200)] 
gnutls_x509_crt/q_set_spki: always initialize the spki structure

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agognutls-cli: always initialize the inline commands struct
Nikos Mavrogiannopoulos [Sat, 23 Sep 2017 09:17:21 +0000 (11:17 +0200)] 
gnutls-cli: always initialize the inline commands struct

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agognutls-cli-debug: eliminated memory leaks
Nikos Mavrogiannopoulos [Sat, 23 Sep 2017 09:13:31 +0000 (11:13 +0200)] 
gnutls-cli-debug: eliminated memory leaks

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoocsptool: eliminate memory leaks
Nikos Mavrogiannopoulos [Sat, 23 Sep 2017 09:11:27 +0000 (11:11 +0200)] 
ocsptool: eliminate memory leaks

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agocerttool: use assert to protect var access
Nikos Mavrogiannopoulos [Sat, 23 Sep 2017 09:09:00 +0000 (11:09 +0200)] 
certtool: use assert to protect var access

The code correctly uses the variables, but the assert ensures
that static analyzers follow the intended paths too.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agosrptool: removed unused variables
Nikos Mavrogiannopoulos [Sat, 23 Sep 2017 09:06:53 +0000 (11:06 +0200)] 
srptool: removed unused variables

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agopsktool: remove unused variables
Nikos Mavrogiannopoulos [Sat, 23 Sep 2017 09:06:24 +0000 (11:06 +0200)] 
psktool: remove unused variables

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agognutls-cli: fix memory leak
Nikos Mavrogiannopoulos [Sat, 23 Sep 2017 09:05:18 +0000 (11:05 +0200)] 
gnutls-cli: fix memory leak

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotools: eliminated dead assignments
Nikos Mavrogiannopoulos [Sat, 23 Sep 2017 09:04:21 +0000 (11:04 +0200)] 
tools: eliminated dead assignments

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoocsptool: check chain size on verification
Nikos Mavrogiannopoulos [Sat, 23 Sep 2017 08:59:58 +0000 (10:59 +0200)] 
ocsptool: check chain size on verification

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years ago.gitlab-ci.yml: use static analyzer and Werror build in src
Nikos Mavrogiannopoulos [Tue, 19 Sep 2017 09:08:19 +0000 (11:08 +0200)] 
.gitlab-ci.yml: use static analyzer and Werror build in src

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: enhanced resumption checks with same and different SNI
Nikos Mavrogiannopoulos [Sat, 23 Sep 2017 06:29:17 +0000 (08:29 +0200)] 
tests: enhanced resumption checks with same and different SNI

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoserver name: refuse to resume a session which server name doesn't match
Nikos Mavrogiannopoulos [Sat, 23 Sep 2017 06:19:21 +0000 (08:19 +0200)] 
server name: refuse to resume a session which server name doesn't match

That is, follow the RFC6066 requirement that server:
"MUST NOT accept the request to resume the session if the
server_name extension contains a different name."

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agognutls-cli: eliminate few memory leaks
Nikos Mavrogiannopoulos [Sat, 23 Sep 2017 08:47:15 +0000 (10:47 +0200)] 
gnutls-cli: eliminate few memory leaks

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: New test for SNI parsing during cache-based session resumption
Thomas Klute [Thu, 21 Sep 2017 09:00:33 +0000 (11:00 +0200)] 
tests: New test for SNI parsing during cache-based session resumption

Signed-off-by: Thomas Klute <thomas2.klute@uni-dortmund.de>
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoEnsure the SNI extension is parsed during cache-based resumption
Thomas Klute [Thu, 21 Sep 2017 08:45:05 +0000 (10:45 +0200)] 
Ensure the SNI extension is parsed during cache-based resumption

This patch changes the parse_type of the SNI extension to
GNUTLS_EXT_MANDATORY to ensure it is parsed during every handshake.

With SNI previously classified as GNUTLS_EXT_APPLICATION, GnuTLS
servers ignored the SNI extension when resuming a TLS session from
cache, because "application" level extensions are skipped during
resumption. As a result, gnutls_server_name_get() always returned
GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE when called on the resumed
session, breaking virtual server systems.

According to RFC 6066, Section 3 the SNI extension must be parsed on
session resumption if implemented at all:

  "A server that implements this extension MUST NOT accept the request
  to resume the session if the server_name extension contains a
  different name."

This change allows applications using GnuTLS to match SNI data on
resumed sessions.

Signed-off-by: Thomas Klute <thomas2.klute@uni-dortmund.de>
8 years agotests: explicitly check for gnutls.pc in pkgconfig.sh
Dmitry Eremin-Solenikov [Mon, 18 Sep 2017 14:06:15 +0000 (17:06 +0300)] 
tests: explicitly check for gnutls.pc in pkgconfig.sh

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agotest: use proper library name in pkgconfig.sh error message
Dmitry Eremin-Solenikov [Mon, 18 Sep 2017 10:33:53 +0000 (13:33 +0300)] 
test: use proper library name in pkgconfig.sh error message

If there is a -R flag in p11-kit-1.pc file, pkgconfig.sh test will still
reference libidn2.pc, rather than proper source of the message. Also
move the test for library flags before updating PKG_CONFIG_PATH.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agotests: use libidn2 in pkgconfig.sh
Dmitry Eremin-Solenikov [Mon, 18 Sep 2017 10:32:40 +0000 (13:32 +0300)] 
tests: use libidn2 in pkgconfig.sh

Since abe6a12b9766219163f99d7807a0b07fbe5f590c GnuTLS does not support
libidn1. Switch pkgconfig.sh test to use libidn2.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
8 years agoparse-datetime: Fix buffer overflow
Tim Rühsen [Tue, 19 Sep 2017 18:36:22 +0000 (20:36 +0200)] 
parse-datetime: Fix buffer overflow

8 years agotlsfuzzer: document the reason of failure of few fragmentation tests
Nikos Mavrogiannopoulos [Mon, 18 Sep 2017 13:35:32 +0000 (15:35 +0200)] 
tlsfuzzer: document the reason of failure of few fragmentation tests

It seems that gnutls does not accept records carrying handshake messages
that contain less bytes than necessary to recover the handshake header.
The TLS protocol allows that option, and other implementations seem to
accept that fragmentation.

Relates #272

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoparse_handshake_header: removed duplicate check
Nikos Mavrogiannopoulos [Sat, 16 Sep 2017 16:21:36 +0000 (18:21 +0200)] 
parse_handshake_header: removed duplicate check

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoecdh: return more appropriate error code on empty packet
Nikos Mavrogiannopoulos [Sat, 16 Sep 2017 12:03:54 +0000 (14:03 +0200)] 
ecdh: return more appropriate error code on empty packet

This makes tlsfuzzer's test-x25519 detect the right error
code on empty message. Previously this issue was masked by our
refusal to accept 1-byte sized fragments.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoparse_handshake_header: allow 1-byte sized fragments
Nikos Mavrogiannopoulos [Fri, 15 Sep 2017 14:34:02 +0000 (16:34 +0200)] 
parse_handshake_header: allow 1-byte sized fragments

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added reproducer for DTLS infinite loop
Nikos Mavrogiannopoulos [Fri, 15 Sep 2017 14:21:02 +0000 (16:21 +0200)] 
tests: added reproducer for DTLS infinite loop

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopkcs11/get_key_algo_type(): Always initialize bits variable
Tim Rühsen [Mon, 18 Sep 2017 18:55:25 +0000 (20:55 +0200)] 
pkcs11/get_key_algo_type(): Always initialize bits variable

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agotests/base64-raw: Remove unused variable
Tim Rühsen [Mon, 18 Sep 2017 18:53:23 +0000 (20:53 +0200)] 
tests/base64-raw: Remove unused variable

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agognutls.h: Remove redundant function declarations
Tim Rühsen [Mon, 18 Sep 2017 13:54:19 +0000 (15:54 +0200)] 
gnutls.h: Remove redundant function declarations

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
8 years agox509: removed debugging code [ci skip]
Nikos Mavrogiannopoulos [Thu, 14 Sep 2017 09:56:27 +0000 (11:56 +0200)] 
x509: removed debugging code [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: modified the MD5 signature algorithm negotiation tests
Nikos Mavrogiannopoulos [Tue, 27 Jun 2017 11:58:58 +0000 (13:58 +0200)] 
tests: modified the MD5 signature algorithm negotiation tests

Since GnuTLS can no longer negotiate MD5, we utilize a byte stream
of a connection which advertises MD5, and we make sure we detect the
right error code for the rejection of MD5 signature.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update
Nikos Mavrogiannopoulos [Tue, 27 Jun 2017 06:42:10 +0000 (08:42 +0200)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotlsfuzzer: no longer include tests involving SHA224 signatures
Nikos Mavrogiannopoulos [Tue, 27 Jun 2017 06:36:01 +0000 (08:36 +0200)] 
tlsfuzzer: no longer include tests involving SHA224 signatures

We no longer support them.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoalgorithms/sign: removed TLS identifiers for legacy algorithms
Nikos Mavrogiannopoulos [Mon, 26 Jun 2017 13:04:32 +0000 (15:04 +0200)] 
algorithms/sign: removed TLS identifiers for legacy algorithms

That is, for the MD5-using algorithms, as well as for the DSA2
signature algorithms that were never really used with TLS 1.2.

Kept DSA-SHA1 in order to be used by TLS 1.2 and legacy applications.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoalgorithms/sign: legacy signature algorithms were moved toward the end of the list
Nikos Mavrogiannopoulos [Mon, 26 Jun 2017 13:02:47 +0000 (15:02 +0200)] 
algorithms/sign: legacy signature algorithms were moved toward the end of the list

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoalgorithms/sign: no longer enable SHA224 hash in signatures
Nikos Mavrogiannopoulos [Mon, 26 Jun 2017 12:58:17 +0000 (14:58 +0200)] 
algorithms/sign: no longer enable SHA224 hash in signatures

TLS 1.3 requires that SHA224 MUST NOT be used, and given the
fact that SHA224 was never widespread used in TLS 1.2, there
is no reason to keep these algorithms at all.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotlsfuzzer: added large client hello tests
Nikos Mavrogiannopoulos [Fri, 8 Sep 2017 14:19:38 +0000 (16:19 +0200)] 
tlsfuzzer: added large client hello tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agowin32: removed no longer used subdir
Nikos Mavrogiannopoulos [Fri, 8 Sep 2017 13:16:55 +0000 (15:16 +0200)] 
win32: removed no longer used subdir

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago.gitlab-ci.yml: added warning cppcheck checks
Nikos Mavrogiannopoulos [Fri, 8 Sep 2017 12:01:09 +0000 (14:01 +0200)] 
.gitlab-ci.yml: added warning cppcheck checks

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago.gitlab-ci.yml: removed initialization step
Nikos Mavrogiannopoulos [Thu, 7 Sep 2017 14:54:24 +0000 (16:54 +0200)] 
.gitlab-ci.yml: removed initialization step

That is, combine syntax-check with the static analyzers run. That
provides more parallelism per build and reduces the overall time
spent on a successful run.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: added README on FreeBSD CI setup
Nikos Mavrogiannopoulos [Thu, 7 Sep 2017 14:20:01 +0000 (16:20 +0200)] 
doc: added README on FreeBSD CI setup

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago.gitlab-ci.yml: added FreeBSD build
Nikos Mavrogiannopoulos [Thu, 7 Sep 2017 14:21:44 +0000 (16:21 +0200)] 
.gitlab-ci.yml: added FreeBSD build

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