]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
8 years agoserv: increase cache size used for resumption
Nikos Mavrogiannopoulos [Fri, 2 Feb 2018 14:49:48 +0000 (15:49 +0100)] 
serv: increase cache size used for resumption

That allows sessions with longer parameters to be able
to be resumed.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoCONTRIBUTING.md: check the issue closing as part of review [ci skip]
Nikos Mavrogiannopoulos [Fri, 2 Feb 2018 10:09:22 +0000 (11:09 +0100)] 
CONTRIBUTING.md: check the issue closing as part of review [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-cli: no longer print certificate types or compression methods
Nikos Mavrogiannopoulos [Fri, 2 Feb 2018 09:35:11 +0000 (10:35 +0100)] 
gnutls-cli: no longer print certificate types or compression methods

We don't support any other compression methods than the null compression,
nor any other certificate types.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoInline version macros into its users.
Jay Foad [Sat, 27 Jan 2018 08:13:17 +0000 (09:13 +0100)] 
Inline version macros into its users.

This fixes a problem in _gnutls_version_is_supported() where we want to
use preprocessing directives in the loop body. Doing this within a macro
argument is undefined behaviour according to the C standard, and not
supported by the system compiler on AIX.

Signed-off-by: Jay Foad <jay.foad@gmail.com>
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Fri, 26 Jan 2018 14:49:53 +0000 (15:49 +0100)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agocerttool: deprecated the --certificate-pubkey option
Nikos Mavrogiannopoulos [Fri, 26 Jan 2018 14:48:52 +0000 (15:48 +0100)] 
certtool: deprecated the --certificate-pubkey option

That option is duplicate since --pubkey-info can provide the same
information.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agocerttool: avoid duplicate deinitialization on --certificate-pubkey
Nikos Mavrogiannopoulos [Fri, 26 Jan 2018 14:44:21 +0000 (15:44 +0100)] 
certtool: avoid duplicate deinitialization on --certificate-pubkey

Resolves #368

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodh: document why BER decoding rules are allows
Nikos Mavrogiannopoulos [Sun, 21 Jan 2018 11:25:10 +0000 (12:25 +0100)] 
dh: document why BER decoding rules are allows

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agopubkey: use the strict DER decoder for SubjectPublicKeyInfo
Nikos Mavrogiannopoulos [Sun, 21 Jan 2018 11:19:12 +0000 (12:19 +0100)] 
pubkey: use the strict DER decoder for SubjectPublicKeyInfo

Although there is no explicit RFC mentioning the SubjectPublicKeyInfo
encoding, this structure is a subset of the X.509 certificate's structure
and as such it is expected to be in DER form.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agopk: document need for the generic BER decoder
Nikos Mavrogiannopoulos [Sun, 21 Jan 2018 10:36:20 +0000 (11:36 +0100)] 
pk: document need for the generic BER decoder

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodoc update
Nikos Mavrogiannopoulos [Wed, 17 Jan 2018 18:26:12 +0000 (19:26 +0100)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: check whether deletion of a certificate object works
Nikos Mavrogiannopoulos [Wed, 17 Jan 2018 18:25:36 +0000 (19:25 +0100)] 
tests: check whether deletion of a certificate object works

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agop11tool: corrected issue preventing the deletion of objects in batch mode
Nikos Mavrogiannopoulos [Wed, 17 Jan 2018 18:15:46 +0000 (19:15 +0100)] 
p11tool: corrected issue preventing the deletion of objects in batch mode

Previously initialization of PIN callbacks would only happen during listing
of objects, which happened only in non-batch mode.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agop11tool: corrected type affecting use of --only-urls
Nikos Mavrogiannopoulos [Wed, 17 Jan 2018 18:10:52 +0000 (19:10 +0100)] 
p11tool: corrected type affecting use of --only-urls

It would enable batch mode accidentally.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: pkcs11/tls-neg-pkcs11-key: updated for softhsm with PKCS#11 support
Nikos Mavrogiannopoulos [Fri, 19 Jan 2018 10:42:02 +0000 (11:42 +0100)] 
tests: pkcs11/tls-neg-pkcs11-key: updated for softhsm with PKCS#11 support

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoadded sub-section on selecting the right return value [ci skip]
Nikos Mavrogiannopoulos [Mon, 22 Jan 2018 08:06:25 +0000 (09:06 +0100)] 
added sub-section on selecting the right return value [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update [ci skip]
Nikos Mavrogiannopoulos [Wed, 17 Jan 2018 16:35:54 +0000 (17:35 +0100)] 
doc update [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoexamples: use gnutls_certificate_set_x509_system_trust
Nikos Mavrogiannopoulos [Wed, 17 Jan 2018 07:38:13 +0000 (08:38 +0100)] 
examples: use gnutls_certificate_set_x509_system_trust

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodoc update
Nikos Mavrogiannopoulos [Fri, 12 Jan 2018 15:14:23 +0000 (16:14 +0100)] 
doc update

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: privkey-verify-broken: addressed uninitialized var use
Nikos Mavrogiannopoulos [Fri, 12 Jan 2018 12:23:03 +0000 (13:23 +0100)] 
tests: privkey-verify-broken: addressed uninitialized var use

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: check whether get_mtu() functions relate to the set values
Nikos Mavrogiannopoulos [Wed, 10 Jan 2018 14:41:50 +0000 (15:41 +0100)] 
tests: check whether get_mtu() functions relate to the set values

That is, verify that gnutls_dtls_set_data_mtu() value would be
reflected into gnutls_dtls_get_data_mtu(), as well as the
gnutls_dtls_set_mtu() to gnutls_dtls_get_mtu().

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added unit test for _gnutls_record_overhead()
Nikos Mavrogiannopoulos [Wed, 10 Jan 2018 14:35:36 +0000 (15:35 +0100)] 
tests: added unit test for _gnutls_record_overhead()

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agoDTLS: improved data MTU calculation under CBC ciphersuites
Nikos Mavrogiannopoulos [Fri, 12 Jan 2018 08:01:54 +0000 (09:01 +0100)] 
DTLS: improved data MTU calculation under CBC ciphersuites

The data MTU calculation under CBC ciphersuites takes into
account that the overhead of these ciphersuites is constant (IV +
hash + 1 byte padding), though the capacity varies due to the padding
block. That is, on 16-byte padding block, one padding byte is the
overhead but the rest 15 bytes are accounted for data MTU.

That also has the side effect that setting a data MTU using
gnutls_dtls_set_data_mtu(), is not definite, and the actual
MTU may be larger for these ciphersuites --i.e., the
return value of gnutls_dtls_get_data_mtu().

Resolves #360

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agofuzz: added reproducer for leak in gnutls_x509_crl_list_import
Nikos Mavrogiannopoulos [Wed, 10 Jan 2018 09:58:30 +0000 (10:58 +0100)] 
fuzz: added reproducer for leak in gnutls_x509_crl_list_import

That was detected by oss-fuzz in:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4930

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_x509_crt_list_import: eliminated memory leak
Nikos Mavrogiannopoulos [Wed, 10 Jan 2018 09:56:28 +0000 (10:56 +0100)] 
gnutls_x509_crt_list_import: eliminated memory leak

That leak would be triggered if GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED
flag was used and the input data would exceed the maximum limit.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agolibtasn1: updated to latest libtasn1 master branch
Nikos Mavrogiannopoulos [Tue, 9 Jan 2018 10:31:45 +0000 (11:31 +0100)] 
libtasn1: updated to latest libtasn1 master branch

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls_pkcs12_key_parser_fuzzer.in: added reproducer for oss-fuzz #4890
Nikos Mavrogiannopoulos [Wed, 3 Jan 2018 15:41:36 +0000 (16:41 +0100)] 
gnutls_pkcs12_key_parser_fuzzer.in: added reproducer for oss-fuzz #4890

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc update [ci skip]
Nikos Mavrogiannopoulos [Sun, 7 Jan 2018 08:55:37 +0000 (09:55 +0100)] 
doc update [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agodoc: updated copyright year for manual
Nikos Mavrogiannopoulos [Wed, 3 Jan 2018 15:27:03 +0000 (16:27 +0100)] 
doc: updated copyright year for manual

That eliminates the 'make syntax-check' error.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: added reproducer for self-signed verification error
Nikos Mavrogiannopoulos [Sat, 30 Dec 2017 19:12:36 +0000 (20:12 +0100)] 
tests: added reproducer for self-signed verification error

Relates #347

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agox509/verify: when verifying against a self signed certificate ignore issuer
Nikos Mavrogiannopoulos [Sat, 30 Dec 2017 18:57:08 +0000 (19:57 +0100)] 
x509/verify: when verifying against a self signed certificate ignore issuer

That is, ignore issuer when checking the issuer's parameters strength. That
resolves the issue of marking self-signed certificates as with insecure
parameters during verification.

Resolves #347

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agognutls_pk_self_test: include ECDSA tests on GNUTLS_PK_EC
Nikos Mavrogiannopoulos [Wed, 20 Dec 2017 07:16:29 +0000 (08:16 +0100)] 
gnutls_pk_self_test: include ECDSA tests on GNUTLS_PK_EC

Previously when a request for a specific self check on GNUTLS_PK_EC
was done, only ECDH tests would be run. This change includes the ECDSA
tests as well (GNUTLS_PK_EC and GNUTLS_PK_ECDSA are an alias to each other).

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: hash-large: increase parallelism to allow fast run in CI
Nikos Mavrogiannopoulos [Tue, 19 Dec 2017 15:40:59 +0000 (16:40 +0100)] 
tests: hash-large: increase parallelism to allow fast run in CI

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: reference gnutls_prf_rfc5705 instead of gnutls_prf
Nikos Mavrogiannopoulos [Fri, 8 Dec 2017 10:14:58 +0000 (11:14 +0100)] 
doc: reference gnutls_prf_rfc5705 instead of gnutls_prf

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: utils.h: forbid compilation with NDEBUG
Nikos Mavrogiannopoulos [Sun, 3 Dec 2017 10:34:32 +0000 (11:34 +0100)] 
tests: utils.h: forbid compilation with NDEBUG

This allows to rely on the assert() macro being functional on
the test suite.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: p11-kit-load.sh: verify that all modules are loaded after a private key operation
Nikos Mavrogiannopoulos [Sun, 3 Dec 2017 09:49:12 +0000 (10:49 +0100)] 
tests: p11-kit-load.sh: verify that all modules are loaded after a private key operation

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: enhanced pkcs11/list-tokens
Nikos Mavrogiannopoulos [Thu, 30 Nov 2017 14:08:22 +0000 (15:08 +0100)] 
tests: enhanced pkcs11/list-tokens

This not only creates a trust list with the system certificates, but
also attempts to verify a certificate, increasing the number of calls
to PKCS#11 verification API (and thus ensuring there are no calls
which may trigger the load of other modules).

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopkcs11 verification: always use the GNUTLS_PKCS11_OBJ_FLAG_PRESENT_IN_TRUSTED_MODULE
Nikos Mavrogiannopoulos [Thu, 30 Nov 2017 13:31:07 +0000 (14:31 +0100)] 
pkcs11 verification: always use the GNUTLS_PKCS11_OBJ_FLAG_PRESENT_IN_TRUSTED_MODULE

That is, make sure that all our calls to PKCS#11 subsystem for verification
will only trigger the trust module initialization, and not the generic
PKCS#11 initialization.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopkcs11: simplify trusted module loading state
Nikos Mavrogiannopoulos [Thu, 30 Nov 2017 13:28:46 +0000 (14:28 +0100)] 
pkcs11: simplify trusted module loading state

That is always utilize the same flags (GNUTLS_PKCS11_OBJ_FLAG_PRESENT_IN_TRUSTED_MODULE)
to determine whether to initialize trusted modules only or
proceed with general initialization.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_pkcs11_check_init: improved transition between states
Nikos Mavrogiannopoulos [Thu, 30 Nov 2017 11:52:57 +0000 (12:52 +0100)] 
_gnutls_pkcs11_check_init: improved transition between states

The init_level_t for PKCS#11 modules, was incorrectly handled as a
linear state transition, causing few cases in the transition to be
incorrectly handled. Define precisely the state transitions and
enforce them in _gnutls_pkcs11_check_init.

That addresses a regression introduced by the previous state handling
addition, which made impossible to switch from the trusted state to
the all modules.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: corrected destructive/p11-kit-load.sh error checking
Nikos Mavrogiannopoulos [Thu, 30 Nov 2017 10:44:14 +0000 (11:44 +0100)] 
tests: corrected destructive/p11-kit-load.sh error checking

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agognutls-serv: fix double-free on inactivity timeout
Daiki Ueno [Fri, 1 Dec 2017 10:13:29 +0000 (11:13 +0100)] 
gnutls-serv: fix double-free on inactivity timeout

Previously, gnutls-serv --echo segfaulted when closing client
connection after inactivity timeout.  Here is the valgrind output:

==20246== Invalid free() / delete / delete[] / realloc()
==20246==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==20246==    by 0x405310: listener_free (serv.c:154)
==20246==    by 0x408B57: tcp_server (serv.c:1568)
==20246==    by 0x407DA6: main (serv.c:1231)
==20246==  Address 0x6ed4fe0 is 0 bytes inside a block of size 3 free'd
==20246==    at 0x4C2FD18: free (vg_replace_malloc.c:530)
==20246==    by 0x408A1D: tcp_server (serv.c:1548)
==20246==    by 0x407DA6: main (serv.c:1231)
==20246==  Block was alloc'd at
==20246==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==20246==    by 0x6A64489: strdup (in /usr/lib64/libc-2.25.so)
==20246==    by 0x407310: get_response (serv.c:948)
==20246==    by 0x408840: tcp_server (serv.c:1492)
==20246==    by 0x407DA6: main (serv.c:1231)
==20246==

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years ago.dir-locals.el: new file
Daiki Ueno [Tue, 28 Nov 2017 14:45:59 +0000 (15:45 +0100)] 
.dir-locals.el: new file

This forces Emacs to use the Linux kernel coding style for all C code.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agobuild: remove m4 files pulled in by autopoint
Daiki Ueno [Tue, 28 Nov 2017 14:45:54 +0000 (15:45 +0100)] 
build: remove m4 files pulled in by autopoint

Having these files in the git repository causes unnecessary changes
after "make bootstrap".

Signed-off-by: Daiki Ueno <dueno@redhat.com>
8 years agognutls_aead_cipher_init: corrected potential memory leak
Nikos Mavrogiannopoulos [Wed, 29 Nov 2017 16:16:41 +0000 (17:16 +0100)] 
gnutls_aead_cipher_init: corrected potential memory leak

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agodoc: provided basic documentation of the FIPS140-2 mode [ci skip]
Nikos Mavrogiannopoulos [Tue, 28 Nov 2017 13:28:46 +0000 (14:28 +0100)] 
doc: provided basic documentation of the FIPS140-2 mode [ci skip]

Resolves #332

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: verify whether group remains the same after resumption
Nikos Mavrogiannopoulos [Mon, 27 Nov 2017 08:42:26 +0000 (09:42 +0100)] 
tests: verify whether group remains the same after resumption

Resolves #331

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years ago_gnutls_set_resumed_parameters: restore the group from resumed parameters
Nikos Mavrogiannopoulos [Mon, 27 Nov 2017 08:31:52 +0000 (09:31 +0100)] 
_gnutls_set_resumed_parameters: restore the group from resumed parameters

That allows resumed sessions to have the original group information such as
curve used for key exchange or FFDHE parameters.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: removed unnecessary assert
Nikos Mavrogiannopoulos [Wed, 27 Sep 2017 06:19:01 +0000 (08:19 +0200)] 
tests: removed unnecessary assert

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: delete temporary files
Nikos Mavrogiannopoulos [Tue, 10 Oct 2017 12:23:20 +0000 (14:23 +0200)] 
tests: delete temporary files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agosession state: use the right type for send_cert_req variable
Nikos Mavrogiannopoulos [Wed, 8 Nov 2017 10:47:22 +0000 (11:47 +0100)] 
session state: use the right type for send_cert_req variable

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agotests: client-fastopen: introduce child signal handler and delay prior to starting
Nikos Mavrogiannopoulos [Fri, 24 Nov 2017 07:17:40 +0000 (08:17 +0100)] 
tests: client-fastopen: introduce child signal handler and delay prior to starting

This addresses a hang issue on freebsd builds.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agopsktool: allow up to 512-byte keys
Nikos Mavrogiannopoulos [Wed, 22 Nov 2017 16:36:30 +0000 (17:36 +0100)] 
psktool: allow up to 512-byte keys

This aligns the psktool --help output with the psktool operation.

Suggested by Jack Lloyd.

Resolves #327

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
8 years agogetfuncs-map.pl: added gnutls_srp_8192_group* symbols to ignore list
Nikos Mavrogiannopoulos [Tue, 21 Nov 2017 19:26:43 +0000 (20:26 +0100)] 
getfuncs-map.pl: added gnutls_srp_8192_group* symbols to ignore list

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agoupdated auto-generated files
Nikos Mavrogiannopoulos [Tue, 21 Nov 2017 18:24:29 +0000 (19:24 +0100)] 
updated auto-generated files

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agosrptool: --create-conf no longer includes 1024-bit parameters
Nikos Mavrogiannopoulos [Tue, 21 Nov 2017 18:17:01 +0000 (19:17 +0100)] 
srptool: --create-conf no longer includes 1024-bit parameters

In addition it includes the 8192-bit parameters, and
the default params used for a new user are the 2k ones.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
8 years agotests: updated SRP checks
Nikos Mavrogiannopoulos [Tue, 21 Nov 2017 12:23:21 +0000 (13:23 +0100)] 
tests: updated SRP checks

Test 1024, 1536, 2048, 3072, 4096 and 8192 bit parameters.
In addition, verify that parameters not in the SRP spec are
rejected by a gnutls client.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
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>