]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
7 years agoext/record_size_limit: reject too large extension payload
Daiki Ueno [Thu, 17 Jan 2019 10:52:50 +0000 (11:52 +0100)] 
ext/record_size_limit: reject too large extension payload

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agognutls-serv: improvements in UDP server
Nikos Mavrogiannopoulos [Sat, 5 Jan 2019 13:12:46 +0000 (14:12 +0100)] 
gnutls-serv: improvements in UDP server

This modifies the server to deinitialize the session after use
(avoiding leaks), and to only send the hello verify request when
a client hello is seen.

This also adds a basic unit test of gnutls-serv with the --udp option.

Resolves #632

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-key-rsa-pss' into 'master'
Dmitry Eremin-Solenikov [Wed, 23 Jan 2019 15:17:00 +0000 (15:17 +0000)] 
Merge branch 'tmp-key-rsa-pss' into 'master'

gnutls_pkcs11_privkey_import_url: enable RSA-PSS only when an RSA key can sign

Closes #667

See merge request gnutls/gnutls!884

7 years agoconfigure.ac: add comment for -latomic
Fabrice Fontaine [Wed, 23 Jan 2019 12:36:23 +0000 (13:36 +0100)] 
configure.ac: add comment for -latomic

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
7 years agotests: added tests for multiple ticket reception
Nikos Mavrogiannopoulos [Wed, 23 Jan 2019 07:42:54 +0000 (08:42 +0100)] 
tests: added tests for multiple ticket reception

This introduces tests for the reception (parsing) of multiple tickets
by a gnutls client. It uses the tlslite-ng server because unlike a gnutls
server, tlslite-ng does send multiple tickets in a single record. That
way we test that we can parse both ways of sending tickets.

Resolves: #511

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-update-gnulib' into 'master'
Nikos Mavrogiannopoulos [Wed, 23 Jan 2019 12:21:07 +0000 (12:21 +0000)] 
Merge branch 'tmp-update-gnulib' into 'master'

Update gnulib

Closes #653

See merge request gnutls/gnutls!888

7 years agoMerge branch 'tmp-alerts-fix' into 'master'
Nikos Mavrogiannopoulos [Wed, 23 Jan 2019 12:06:34 +0000 (12:06 +0000)] 
Merge branch 'tmp-alerts-fix' into 'master'

Various alert-related fixes

Closes #672

See merge request gnutls/gnutls!885

7 years agoUpdate gnulib
Tim Rühsen [Wed, 23 Jan 2019 10:45:39 +0000 (11:45 +0100)] 
Update gnulib

Closes #653 (printf %n crashes on Android)

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agognutls_alert_send_appropriate: do not send alert to peer on all errors
Nikos Mavrogiannopoulos [Mon, 21 Jan 2019 19:53:06 +0000 (20:53 +0100)] 
gnutls_alert_send_appropriate: do not send alert to peer on all errors

That is, do not send alerts for success, or for errors indicating that
an alert has been received. This changes the documented function behavior
but does not break any existing caller expectations.

Relates: #672

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-fix-libs-private' into 'master'
Tim Rühsen [Tue, 22 Jan 2019 21:28:38 +0000 (21:28 +0000)] 
Merge branch 'tmp-fix-libs-private' into 'master'

Fix libs.private in gnutls.pc for multiarch builds

Closes #675

See merge request gnutls/gnutls!877

7 years agognutls_pkcs11_privkey_import_url: enable RSA-PSS only when an RSA key can sign
Nikos Mavrogiannopoulos [Mon, 21 Jan 2019 19:33:00 +0000 (20:33 +0100)] 
gnutls_pkcs11_privkey_import_url: enable RSA-PSS only when an RSA key can sign

In gnutls_pkcs11_privkey_import_url() we only enabled RSA-PSS functionality to
the key if the CKM_RSA_PKCS_PSS mechanism is available to the token. However,
if the specific key is not marked for use with digital signatures (CKA_SIGN
set), then we may have still ended-up using it and fail when using it. We
now test whether CKA_SIGN is set prior to enabling such keys for PSS.

Resolves: #667

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-fix-fuzzer-timeout' into 'master'
Tim Rühsen [Tue, 22 Jan 2019 08:02:32 +0000 (08:02 +0000)] 
Merge branch 'tmp-fix-fuzzer-timeout' into 'master'

Avoid excessive CPU usage in gnutls_idna_map()

See merge request gnutls/gnutls!881

7 years agoalert: associate unsupported curve alerts with handshake failure
Nikos Mavrogiannopoulos [Mon, 21 Jan 2019 19:56:10 +0000 (20:56 +0100)] 
alert: associate unsupported curve alerts with handshake failure

Resolves: #672

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-check-if-signed' into 'master'
Tim Rühsen [Sun, 20 Jan 2019 13:34:14 +0000 (13:34 +0000)] 
Merge branch 'tmp-check-if-signed' into 'master'

Check for Signed-off-by: in CI

Closes #668

See merge request gnutls/gnutls!874

7 years agoCheck for Signed-off-by: in CI
Tim Rühsen [Thu, 10 Jan 2019 13:53:32 +0000 (14:53 +0100)] 
Check for Signed-off-by: in CI

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoAvoid excessive CPU usage in gnutls_idna_map()
Tim Rühsen [Sun, 20 Jan 2019 11:00:07 +0000 (12:00 +0100)] 
Avoid excessive CPU usage in gnutls_idna_map()

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-fix-crypto-selftests' into 'master'
Tim Rühsen [Sat, 19 Jan 2019 19:46:42 +0000 (19:46 +0000)] 
Merge branch 'tmp-fix-crypto-selftests' into 'master'

crypto-selftests.c: Fix checking return value

See merge request gnutls/gnutls!880

7 years agoMerge branch 'tmp-init-var-x509dn' into 'master'
Nikos Mavrogiannopoulos [Sat, 19 Jan 2019 19:18:58 +0000 (19:18 +0000)] 
Merge branch 'tmp-init-var-x509dn' into 'master'

Fix uninitialized variable in tests/x509dn.c

See merge request gnutls/gnutls!882

7 years agoFix uninitialized variable in tests/x509dn.c
Tim Rühsen [Sat, 19 Jan 2019 17:19:42 +0000 (18:19 +0100)] 
Fix uninitialized variable in tests/x509dn.c

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agocrypto-selftests.c: Fix checking return value
Tim Rühsen [Sat, 19 Jan 2019 17:04:31 +0000 (18:04 +0100)] 
crypto-selftests.c: Fix checking return value

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-authors' into 'master'
Tim Rühsen [Sat, 19 Jan 2019 15:10:27 +0000 (15:10 +0000)] 
Merge branch 'tmp-authors' into 'master'

auto-generate the AUTHORS file

See merge request gnutls/gnutls!872

7 years agoauto-generate the AUTHORS file
Nikos Mavrogiannopoulos [Fri, 11 Jan 2019 06:23:40 +0000 (07:23 +0100)] 
auto-generate the AUTHORS file

The original file was unmaintained since long time. This is now
auto-generated from the git shortlog, at release time.

Relates: #606

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoconfigure.ac: check if libatomic is needed
Fabrice Fontaine [Thu, 17 Jan 2019 12:24:04 +0000 (13:24 +0100)] 
configure.ac: check if libatomic is needed

gnutls source code uses the C++11 <atomic> functionality since
https://github.com/gnutls/gnutls/commit/7978a733460f92b31033affd0e487c86d66c643d,
which internally is implemented using the __atomic_*() gcc built-ins

On certain architectures, the __atomic_*() built-ins are implemented in
the libatomic library that comes with the rest of the gcc runtime. Due
to this, code using <atomic> might need to link against libatomic,
otherwise one hits build issues such as:

../lib/.libs/libgnutls.so: undefined reference to `__atomic_fetch_sub_4'

on an architecture like SPARC.

To solve this, a configure.ac check is added to know if we need to
link against libatomic or not. The library is also added to gnutls.pc.

Fixes:
 - http://autobuild.buildroot.org/results/6c749bd592ceffeacadd2ab570d127936cce64b2
 - http://autobuild.buildroot.org/results/30aa83d3cf3482af8a59250c196c85f4a278d343

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
7 years agoFix gnutls.pc for multiarch builds
Tim Rühsen [Thu, 17 Jan 2019 09:22:45 +0000 (10:22 +0100)] 
Fix gnutls.pc for multiarch builds

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-fix-certtools' into 'master'
Nikos Mavrogiannopoulos [Mon, 14 Jan 2019 11:50:02 +0000 (11:50 +0000)] 
Merge branch 'tmp-fix-certtools' into 'master'

certtool: data encipherment is disabled by default

See merge request gnutls/gnutls!875

7 years agocerttool: data encipherment is disabled by default
Nikos Mavrogiannopoulos [Mon, 14 Jan 2019 09:56:27 +0000 (10:56 +0100)] 
certtool: data encipherment is disabled by default

For the TLS protocol this option is not necessary, and if enabled
by mistake (as default) and no other option is set, then the
generated key will be unusable. Thus we disable it, to generate
working keys by default.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-autogen-bak-revert' into 'master'
Nikos Mavrogiannopoulos [Thu, 10 Jan 2019 18:39:19 +0000 (18:39 +0000)] 
Merge branch 'tmp-autogen-bak-revert' into 'master'

Revert "build: remove src/*.bak from distribution"

See merge request gnutls/gnutls!869

7 years ago.travis.yml: use ./bootstrap instead of make autoreconf
Nikos Mavrogiannopoulos [Thu, 10 Jan 2019 18:23:12 +0000 (19:23 +0100)] 
.travis.yml: use ./bootstrap instead of make autoreconf

The latter is no longer available after the removal of
GNUMakefile.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoThe flag %NO_EXTENSIONS is disabling extension support while being functional
Nikos Mavrogiannopoulos [Thu, 10 Jan 2019 06:56:17 +0000 (07:56 +0100)] 
The flag %NO_EXTENSIONS is disabling extension support while being functional

That is, the %NO_EXTENSIONS option is the only documented way to disable
extensions completely from a session. Clarify that message, mention that
its behavior is undefined when combine with TLS1.3, and make sure that it
is functional. The latter makes sure that safe renegotiation and extended
master secret extensions remain disabled when this flag is given.

That simplifies testing certain scenarios under TLS1.0 or TLS1.1 when
no extensions must be used.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-fix-regression-ext-size' into 'master'
Nikos Mavrogiannopoulos [Wed, 9 Jan 2019 17:35:29 +0000 (17:35 +0000)] 
Merge branch 'tmp-fix-regression-ext-size' into 'master'

When sending no extensions do not include a zero length

See merge request gnutls/gnutls!868

7 years agoMerge branch 'aclocal' into 'master'
Tim Rühsen [Wed, 9 Jan 2019 15:22:51 +0000 (15:22 +0000)] 
Merge branch 'aclocal' into 'master'

build: install all m4 macros

See merge request gnutls/gnutls!865

7 years agoWhen sending no extensions do not include a zero length 868/head
Nikos Mavrogiannopoulos [Tue, 8 Jan 2019 11:26:19 +0000 (12:26 +0100)] 
When sending no extensions do not include a zero length

According to RFC5246:
   The presence of extensions can be detected by determining whether
   there are bytes following the compression_method field at the end of
   the ServerHello.

and as such we correct our behavior to not send the zero length bytes.
This was our behavior in 3.5.x and 3.3.x branch, and thus this corrects
a regression of gnutls with these branches.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
7 years agoMerge branch 'tmp-rsa-pss-tls12' into 'master'
Daiki Ueno [Wed, 9 Jan 2019 06:47:05 +0000 (06:47 +0000)] 
Merge branch 'tmp-rsa-pss-tls12' into 'master'

tls-sig: check RSA-PSS signature key compatibility also in TLS 1.2

Closes #659 and #645

See merge request gnutls/gnutls!854

7 years agoAvoid calling sign_algorithm_get_name() when we already have pointer to the algorithm.
Nikos Mavrogiannopoulos [Tue, 8 Jan 2019 19:37:49 +0000 (19:37 +0000)] 
Avoid calling sign_algorithm_get_name() when we already have pointer to the algorithm.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agotls-sig: check RSA-PSS signature key compatibility also in TLS 1.2
Daiki Ueno [Wed, 2 Jan 2019 12:21:49 +0000 (13:21 +0100)] 
tls-sig: check RSA-PSS signature key compatibility also in TLS 1.2

This extends commit 51d21634 to cover the optional TLS 1.2 cases,
which RFC 8446 4.2.3 suggests: "Implementations that advertise support
for RSASSA-PSS (which is mandatory in TLS 1.3) MUST be prepared to
accept a signature using that scheme even when TLS 1.2 is negotiated".

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agotlsfuzzer: update to the latest upstream for the TLS 1.2 CV tests
Daiki Ueno [Tue, 8 Jan 2019 17:09:29 +0000 (18:09 +0100)] 
tlsfuzzer: update to the latest upstream for the TLS 1.2 CV tests

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoalert: map GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM to illegal_parameter
Daiki Ueno [Tue, 8 Jan 2019 17:06:17 +0000 (18:06 +0100)] 
alert: map GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM to illegal_parameter

This alert is more appropriate according to the tlsfuzzer test:
https://github.com/tomato42/tlsfuzzer/commit/4b6a4aa8b00cf3f3bcb2388d1bfdad985610ed1d

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoMerge branch 'gnutls_write_new_general_fix' into 'master'
Tim Rühsen [Tue, 8 Jan 2019 14:20:51 +0000 (14:20 +0000)] 
Merge branch 'gnutls_write_new_general_fix' into 'master'

Fix _gnutls_write_new_general_name() result checking

See merge request gnutls/gnutls!866

7 years agoRevert "build: remove src/*.bak from distribution" 869/head
Daiki Ueno [Tue, 8 Jan 2019 13:40:25 +0000 (14:40 +0100)] 
Revert "build: remove src/*.bak from distribution"

This reverts commit 9ba397aa841730e4824d2bf8537aa15e711ad9b3, as it
turned out to be not practical.  See !862 for the discussion.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years ago_gnutls_hello_ext_set_datum: removed unnecessary remark [ci skip]
Nikos Mavrogiannopoulos [Tue, 8 Jan 2019 11:07:00 +0000 (12:07 +0100)] 
_gnutls_hello_ext_set_datum: removed unnecessary remark [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoFix _gnutls_write_new_general_name() result checking
Maks Naumov [Mon, 7 Jan 2019 22:05:23 +0000 (00:05 +0200)] 
Fix _gnutls_write_new_general_name() result checking

7 years agobuild: install all m4 macros
Alon Bar-Lev [Mon, 7 Jan 2019 15:46:10 +0000 (17:46 +0200)] 
build: install all m4 macros

having all m4 macros in m4/ directory enables easier autoreconf process for
downstream as dependency programs that provide these macros are not required.

both gtk-doc and guile requires huge dependency list, and currently are
required per any change (patch) in autotools.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
7 years agoMerge branch 'tmp-fix-signing' into 'master'
Tim Rühsen [Fri, 4 Jan 2019 20:39:05 +0000 (20:39 +0000)] 
Merge branch 'tmp-fix-signing' into 'master'

_gnutls13_handshake_sign_data: properly fail on signing error

See merge request gnutls/gnutls!855

7 years agoMerge branch 'tmp-msvc-fixes' into 'master'
Daiki Ueno [Fri, 4 Jan 2019 20:32:18 +0000 (20:32 +0000)] 
Merge branch 'tmp-msvc-fixes' into 'master'

ext/pre_shared_key: avoid unnecessary use of VLA for MSVC

See merge request gnutls/gnutls!861

7 years agoMerge branch 'tmp-unroll-ci-commands' into 'master'
Dmitry Eremin-Solenikov [Fri, 4 Jan 2019 20:31:55 +0000 (20:31 +0000)] 
Merge branch 'tmp-unroll-ci-commands' into 'master'

Unroll MinGW CI runner commands

See merge request gnutls/gnutls!857

7 years agoMerge branch 'tmp-fix-typos-in-lib' into 'master'
Tim Rühsen [Fri, 4 Jan 2019 20:12:04 +0000 (20:12 +0000)] 
Merge branch 'tmp-fix-typos-in-lib' into 'master'

Fix typos in lib/

See merge request gnutls/gnutls!850

7 years agoMerge branch 'tmp-tests-fail-on-signals' into 'master'
Tim Rühsen [Fri, 4 Jan 2019 19:53:18 +0000 (19:53 +0000)] 
Merge branch 'tmp-tests-fail-on-signals' into 'master'

tests: treat all signals as error

Closes #623

See merge request gnutls/gnutls!856

7 years agoext/pre_shared_key: avoid unnecessary use of VLA for MSVC
Daiki Ueno [Wed, 2 Jan 2019 12:44:50 +0000 (13:44 +0100)] 
ext/pre_shared_key: avoid unnecessary use of VLA for MSVC

Suggested by Gisle Vanem in:
https://github.com/gnutls/gnutls/commit/fd8c1ec8fe155861dffa28811127f101b6697b4b#r31802648

Signed-off-by: Daiki Ueno <dueno@redhat.com>
7 years agoFix typos in lib/
Tim Rühsen [Fri, 4 Jan 2019 08:47:24 +0000 (09:47 +0100)] 
Fix typos in lib/

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoUnroll MinGW CI runner commands
Tim Rühsen [Thu, 3 Jan 2019 15:36:17 +0000 (16:36 +0100)] 
Unroll MinGW CI runner commands

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agotests: treat all signals as error
Nikos Mavrogiannopoulos [Thu, 3 Jan 2019 08:51:34 +0000 (09:51 +0100)] 
tests: treat all signals as error

Previously we were only treating SIGSEGV as error though there is
no reason to treat other signals as success and they may hide an
actual error case (e.g., when SIGPIPE is received). With this change we
treat any signals received by the child except SIGTERM as error, and
we ensure that SIGPIPE is ignored in all tests.

This also updates tests/slow/cipher-api-test.c to test failures with
SIGABRT or otherwise consistently.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-revert-835' into 'master'
Tim Rühsen [Fri, 4 Jan 2019 16:12:10 +0000 (16:12 +0000)] 
Merge branch 'tmp-revert-835' into 'master'

Revert "verify-high2: Fix cert dir iteration on Win32"

See merge request gnutls/gnutls!860

7 years agoRevert "verify-high2: Fix cert dir iteration on Win32"
Nikos Mavrogiannopoulos [Fri, 4 Jan 2019 13:48:26 +0000 (14:48 +0100)] 
Revert "verify-high2: Fix cert dir iteration on Win32"

This was failing CI (x509cert-tl) but was not detected due to
a bug.

This reverts commit 362a0c30b79ccede7e5bc3a7747c3e7f1d30889a.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-fix-typos-in-doc' into 'master'
Dmitry Eremin-Solenikov [Thu, 3 Jan 2019 23:51:54 +0000 (23:51 +0000)] 
Merge branch 'tmp-fix-typos-in-doc' into 'master'

Fix typos in doc/

See merge request gnutls/gnutls!849

7 years agoMerge branch 'master' into 'master'
Tim Rühsen [Thu, 3 Jan 2019 20:16:38 +0000 (20:16 +0000)] 
Merge branch 'master' into 'master'

Fix typo when checking for ed25519 support

See merge request gnutls/gnutls!858

7 years agoFix typo when checking for ed25519 support
Marga Manterola [Thu, 3 Jan 2019 17:57:29 +0000 (17:57 +0000)] 
Fix typo when checking for ed25519 support

7 years agoFix typos in doc/
Tim Rühsen [Tue, 1 Jan 2019 13:26:04 +0000 (14:26 +0100)] 
Fix typos in doc/

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years ago_gnutls13_handshake_sign_data: properly fail on signing error
Nikos Mavrogiannopoulos [Thu, 3 Jan 2019 08:13:56 +0000 (09:13 +0100)] 
_gnutls13_handshake_sign_data: properly fail on signing error

When signing failed, gnutls would return an invalid signed message
(with no data) instead of failing.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agoMerge branch 'tmp-update-gnulib' into 'master'
Dmitry Eremin-Solenikov [Wed, 2 Jan 2019 21:44:10 +0000 (21:44 +0000)] 
Merge branch 'tmp-update-gnulib' into 'master'

Update gnulib

See merge request gnutls/gnutls!851

7 years agoFix 'make distcheck'
Tim Rühsen [Wed, 2 Jan 2019 09:29:48 +0000 (10:29 +0100)] 
Fix 'make distcheck'

The following error will be fixed:

ERROR: files left in build directory after distclean:
./tests/softhsm-privkey-eddsa-test.config
make[1]: *** [Makefile:1833: distcleancheck] Error 1

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoRemove auto-generated gnulib files from repo
Tim Rühsen [Wed, 2 Jan 2019 09:22:26 +0000 (10:22 +0100)] 
Remove auto-generated gnulib files from repo

Bootstrapping with latest gnulib updated both files,
so they are obviously auto-generated files which do not
belong into the repository.

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoUpdate required autoconf version to 2.63
Tim Rühsen [Wed, 2 Jan 2019 09:02:11 +0000 (10:02 +0100)] 
Update required autoconf version to 2.63

This fixes the bootstrap error with the latest gnulib:

gnulib/gnulib-tool: *** minimum supported autoconf version is 2.63. Try adding AC_PREREQ([2.63]) to your configure.ac.
gnulib/gnulib-tool: *** Stop.
./bootstrap: gnulib-tool failed

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoUpdate gnulib
Tim Rühsen [Wed, 2 Jan 2019 08:56:42 +0000 (09:56 +0100)] 
Update gnulib

This fixes the following 'make syntax-check' failure:

maint.mk: out of date copyright in ./gnulib/lib/version-etc.c; update it
make: *** [maint.mk:1199: sc_copyright_check] Error 1

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoUpdate copyright year in doc/gnutls.texi
Tim Rühsen [Wed, 2 Jan 2019 08:49:19 +0000 (09:49 +0100)] 
Update copyright year in doc/gnutls.texi

This fixes the following error of 'make syntax-check':

maint.mk: out of date copyright in doc/gnutls.texi; update it
make: *** [maint.mk:1201: sc_copyright_check] Error 1

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-fix-examples' into 'master'
Nikos Mavrogiannopoulos [Tue, 1 Jan 2019 11:22:34 +0000 (11:22 +0000)] 
Merge branch 'tmp-fix-examples' into 'master'

examples: use a valid DNS name

Closes #663

See merge request gnutls/gnutls!848

7 years agoexamples: ignore GNUTLS_E_AGAIN or INTERRUPTED errors
Nikos Mavrogiannopoulos [Sun, 30 Dec 2018 15:25:08 +0000 (16:25 +0100)] 
examples: ignore GNUTLS_E_AGAIN or INTERRUPTED errors

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoexamples: use a valid DNS name
Nikos Mavrogiannopoulos [Sun, 30 Dec 2018 15:00:43 +0000 (16:00 +0100)] 
examples: use a valid DNS name

This prevents a gnutls server from sending an unexpected message
alert due to invalid DNS name encoding, if the example is not modified.

Resolves: #663

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-fix-ossfuzz' into 'master'
Dmitry Eremin-Solenikov [Sat, 29 Dec 2018 22:54:14 +0000 (22:54 +0000)] 
Merge branch 'tmp-fix-ossfuzz' into 'master'

Fix OSS-Fuzz build

See merge request gnutls/gnutls!847

7 years agoFix OSS-Fuzz build
Tim Rühsen [Sat, 29 Dec 2018 18:16:57 +0000 (19:16 +0100)] 
Fix OSS-Fuzz build

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'fix-libressl' into 'master'
Dmitry Eremin-Solenikov [Sat, 29 Dec 2018 13:15:12 +0000 (13:15 +0000)] 
Merge branch 'fix-libressl' into 'master'

Fix cipher-openssl-compat failing with LibreSSL

Closes #658

See merge request gnutls/gnutls!846

7 years agotests: cipher-openssl-compat: don't call EVP_CIPHER_CTX_init()
Dmitry Eremin-Solenikov [Tue, 25 Dec 2018 11:44:11 +0000 (14:44 +0300)] 
tests: cipher-openssl-compat: don't call EVP_CIPHER_CTX_init()

There is no need to call EVP_CIPHER_CTX_init() after
EVP_CIPHER_CTX_new().

Fixes #658

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agotests: cipher-openssl-compat: don't fail if OpenSSL doesn't provide cipher
Dmitry Eremin-Solenikov [Tue, 25 Dec 2018 11:43:56 +0000 (14:43 +0300)] 
tests: cipher-openssl-compat: don't fail if OpenSSL doesn't provide cipher

LibreSSL does not provide ChaCha20-Poly1305 through EVP_CIPHER
interface, so let's skip the test if cipher is not available.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
7 years agoMerge branch 'tmp-test-ecc' into 'master'
Dmitry Eremin-Solenikov [Mon, 24 Dec 2018 22:20:54 +0000 (22:20 +0000)] 
Merge branch 'tmp-test-ecc' into 'master'

gnutls_pubkey_import_ecc_raw: set the public key bits

Closes #640

See merge request gnutls/gnutls!843

7 years agognutls_pubkey_import_ecc_raw: set the public key bits
Nikos Mavrogiannopoulos [Thu, 20 Dec 2018 16:49:21 +0000 (17:49 +0100)] 
gnutls_pubkey_import_ecc_raw: set the public key bits

This sets the number of key bits once an ECC key is imported.

Resolves #640

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-no-well-defined' into 'master'
Tim Rühsen [Fri, 21 Dec 2018 10:31:22 +0000 (10:31 +0000)] 
Merge branch 'tmp-no-well-defined' into 'master'

GNUTLS_X509_NO_WELL_DEFINED_EXPIRATION: deprecated

See merge request gnutls/gnutls!844

7 years agoGNUTLS_X509_NO_WELL_DEFINED_EXPIRATION: deprecated
Nikos Mavrogiannopoulos [Fri, 21 Dec 2018 06:58:24 +0000 (07:58 +0100)] 
GNUTLS_X509_NO_WELL_DEFINED_EXPIRATION: deprecated

This removes the documented use of this macro. It was non-functional.
Given the nature of the definition of the non-well defined date for
certificates, it may be wise not to use a special macro at all. The
reason is that the no-well defined date is a real date (~year 9999),
and any approximation with seconds will be unstable due to irregular
leap seconds.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agognutls-cli-debug: removed unused variable
Nikos Mavrogiannopoulos [Fri, 21 Dec 2018 06:54:40 +0000 (07:54 +0100)] 
gnutls-cli-debug: removed unused variable

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
7 years agoMerge branch 'tmp-testrandom.sh' into 'master'
Nikos Mavrogiannopoulos [Fri, 21 Dec 2018 06:36:38 +0000 (06:36 +0000)] 
Merge branch 'tmp-testrandom.sh' into 'master'

testrandom.sh: Fix endless loop

Closes #656

See merge request gnutls/gnutls!842

7 years agoMerge branch 'use_CertOpenStore' into 'master'
Nikos Mavrogiannopoulos [Thu, 20 Dec 2018 19:40:48 +0000 (19:40 +0000)] 
Merge branch 'use_CertOpenStore' into 'master'

win32: Use CertOpenStore instead of CertOpenSystemStore

See merge request gnutls/gnutls!839

7 years agowin32: Check that CertOpenStore is behaving as CertOpenSystemStore 839/head
Hugo Beauzée-Luyssen [Mon, 17 Dec 2018 10:37:12 +0000 (11:37 +0100)] 
win32: Check that CertOpenStore is behaving as CertOpenSystemStore

The test isn't located in tests/windows since we need the actual
libcrypt32 implementations.

7 years agotestrandom.sh: Fix endless loop
Tim Rühsen [Thu, 20 Dec 2018 15:33:34 +0000 (16:33 +0100)] 
testrandom.sh: Fix endless loop

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agoMerge branch 'tmp-comment-style' into 'master'
Nikos Mavrogiannopoulos [Wed, 19 Dec 2018 14:02:41 +0000 (14:02 +0000)] 
Merge branch 'tmp-comment-style' into 'master'

CONTRIBUTING.md: added proposal on commenting style and new features

See merge request gnutls/gnutls!816

7 years agoMerge branch 'winstore_patches' into 'master'
Nikos Mavrogiannopoulos [Wed, 19 Dec 2018 11:43:57 +0000 (11:43 +0000)] 
Merge branch 'winstore_patches' into 'master'

Windows & Windows Store store patches

See merge request gnutls/gnutls!835

7 years agoMerge branch 'tmp-vasprintf' into 'master'
Nikos Mavrogiannopoulos [Wed, 19 Dec 2018 11:37:56 +0000 (11:37 +0000)] 
Merge branch 'tmp-vasprintf' into 'master'

vasprintf: use from gnulib; don't bundle twice

See merge request gnutls/gnutls!841

7 years agovasprintf: use from gnulib; don't bundle twice
Nikos Mavrogiannopoulos [Wed, 19 Dec 2018 08:41:41 +0000 (09:41 +0100)] 
vasprintf: use from gnulib; don't bundle twice

Relates #653

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
7 years agowin32: Use CertOpenStore instead of CertOpenSystemStore
Hugo Beauzée-Luyssen [Thu, 13 Dec 2018 16:31:29 +0000 (17:31 +0100)] 
win32: Use CertOpenStore instead of CertOpenSystemStore

CertOpenSystemStore is not available when building for windows store.
Both functions are available since windows XP, so there is no
compatibility change.
CertOpenSystemStore documentation states "Only current user certificates
are accessible using this method, not the local machine store." hence we
pass CERT_SYSTEM_STORE_CURRENT_USER.
We also use the wide chars variants, in the event the ansi ones are
silently rejected by windows store applications (which is not
documented, but which I strongly suspect)
This is equivalent to Wine's implementation of CertOpenSystemStore:
https://github.com/wine-mirror/wine/blob/master/dlls/crypt32/store.c#L904

7 years agokeys-win: Disable private key import on windows store
Hugo Beauzée-Luyssen [Tue, 4 Dec 2018 14:18:36 +0000 (15:18 +0100)] 
keys-win: Disable private key import on windows store

Windows store drastically limits the available functions.
In this case, at least CryptSetProvParam and the NCrypt* functions
can't be used

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
7 years agoverify-high2: Fix cert dir iteration on Win32
Hugo Beauzée-Luyssen [Tue, 4 Dec 2018 12:22:52 +0000 (13:22 +0100)] 
verify-high2: Fix cert dir iteration on Win32

And especially when building for windows store, which only allows
unicode version of opendir & friends functions.

7 years agolib: Don't hardcode LoadLibraryA
Hugo Beauzée-Luyssen [Tue, 4 Dec 2018 10:53:48 +0000 (11:53 +0100)] 
lib: Don't hardcode LoadLibraryA

Those functions are forbidden when building for Windows Store

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
7 years agoMerge branch 'tmp-portable-tests' into 'master'
Tim Rühsen [Wed, 19 Dec 2018 07:52:12 +0000 (07:52 +0000)] 
Merge branch 'tmp-portable-tests' into 'master'

Make some tests more portable

See merge request gnutls/gnutls!819

7 years ago.gitlab-ci.yml: Remove assert in gl/tests/test-strerror.c
Tim Rühsen [Tue, 18 Dec 2018 15:27:29 +0000 (16:27 +0100)] 
.gitlab-ci.yml: Remove assert in gl/tests/test-strerror.c

A bug made our CI cross builds fail.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916779

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agotests/cert-tests/certtool-eddsa: Increase portability (fix for busybox)
Tim Rühsen [Fri, 16 Nov 2018 15:22:10 +0000 (16:22 +0100)] 
tests/cert-tests/certtool-eddsa: Increase portability (fix for busybox)

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agotests/cert-tests/certtool: SKIP if --disable-bash-tests was given
Tim Rühsen [Fri, 16 Nov 2018 15:20:17 +0000 (16:20 +0100)] 
tests/cert-tests/certtool: SKIP if --disable-bash-tests was given

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agotests/cert-tests/pkcs12-utf8: Use /bin/sh instead of bash
Tim Rühsen [Fri, 16 Nov 2018 15:13:31 +0000 (16:13 +0100)] 
tests/cert-tests/pkcs12-utf8: Use /bin/sh instead of bash

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agotests/cert-tests/pkcs12-corner-cases: Increase portability (fix for busybox)
Tim Rühsen [Fri, 16 Nov 2018 15:12:31 +0000 (16:12 +0100)] 
tests/cert-tests/pkcs12-corner-cases: Increase portability (fix for busybox)

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agotests/cert-tests/certtool-ecdsa: Increase portability (fix for busybox)
Tim Rühsen [Fri, 16 Nov 2018 15:11:53 +0000 (16:11 +0100)] 
tests/cert-tests/certtool-ecdsa: Increase portability (fix for busybox)

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agotests/cert-tests/pem-decoding: Increase portability (fix for busybox)
Tim Rühsen [Fri, 16 Nov 2018 15:06:18 +0000 (16:06 +0100)] 
tests/cert-tests/pem-decoding: Increase portability (fix for busybox)

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agotests/cert-tests/certtool-crl-decoding: Increase portability (fix for busybox)
Tim Rühsen [Fri, 16 Nov 2018 12:28:26 +0000 (13:28 +0100)] 
tests/cert-tests/certtool-crl-decoding: Increase portability (fix for busybox)

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agotests/long-crl.sh: Increase portability (fix for busybox)
Tim Rühsen [Fri, 16 Nov 2018 11:34:01 +0000 (12:34 +0100)] 
tests/long-crl.sh: Increase portability (fix for busybox)

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
7 years agotests/gnutls-cli-debug.sh: Remove bashisms
Tim Rühsen [Fri, 16 Nov 2018 11:14:27 +0000 (12:14 +0100)] 
tests/gnutls-cli-debug.sh: Remove bashisms

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>