]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
6 years agoMerge branch 'minimal-check' into 'master'
Dmitry Eremin-Solenikov [Sat, 23 Nov 2019 23:18:37 +0000 (23:18 +0000)] 
Merge branch 'minimal-check' into 'master'

Run tests under minimal configuration

See merge request gnutls/gnutls!1122

6 years agotests: make tests pass with disabled GOST algorithms
Dmitry Eremin-Solenikov [Fri, 22 Nov 2019 14:21:19 +0000 (17:21 +0300)] 
tests: make tests pass with disabled GOST  algorithms

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agogitlab-ci: enable running make check on minimal build
Dmitry Eremin-Solenikov [Fri, 22 Nov 2019 13:43:49 +0000 (16:43 +0300)] 
gitlab-ci: enable running make check on minimal build

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoMerge branch 'wip-cross-compilation' into 'master'
Tim Rühsen [Fri, 15 Nov 2019 11:27:55 +0000 (11:27 +0000)] 
Merge branch 'wip-cross-compilation' into 'master'

Fix cross-compilation of the Guile bindings

See merge request gnutls/gnutls!1120

6 years agoMerge branch 'fix-coverity' into 'master'
Nikos Mavrogiannopoulos [Tue, 12 Nov 2019 10:49:54 +0000 (10:49 +0000)] 
Merge branch 'fix-coverity' into 'master'

vko: fix possible unitilized scalar access

See merge request gnutls/gnutls!1118

6 years agoguile: Silence auto-compilation warning for 'guild'.
Ludovic Courtès [Mon, 11 Nov 2019 20:36:22 +0000 (21:36 +0100)] 
guile: Silence auto-compilation warning for 'guild'.

Reported by Helmut Grohne <helmut@subdivi.de>
and Andreas Metzler <ametzler@bebt.de>
at <https://bugs.debian.org/943905>.

* guile/Makefile.am (%.go): Pass "GUILE_AUTO_COMPILE=0" to avoid
warnings about 'guild' needing to be compiled.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
6 years agovko: fix possible unitilized scalar access
Dmitry Eremin-Solenikov [Sun, 10 Nov 2019 11:06:58 +0000 (14:06 +0300)] 
vko: fix possible unitilized scalar access

Fix error path in _gnutls_gost_keytrans_decrypt. If
_asn1_strict_der_decode() fails, cleanup path will try to
gnutls_pk_params_release(&pub), which will access unitialized pub
variable. Fix by deleting asn1 sctructure directly.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoguile: Do not attempt to load shared object when cross-compiling.
Ludovic Courtès [Mon, 11 Nov 2019 20:30:48 +0000 (21:30 +0100)] 
guile: Do not attempt to load shared object when cross-compiling.

Reported by Helmut Grohne <helmut@subdivi.de>
and Andreas Metzler <ametzler@bebt.de>
at <https://bugs.debian.org/943905>.

* configure.ac: Add 'CROSS_COMPILING' conditional.
* guile/Makefile.am (CROSS_COMPILING_VARIABLE): New variable.
(%.go): Use it.
* guile/modules/gnutls.in <top level>: Do not call 'load-extension'
when "GNUTLS_GUILE_CROSS_COMPILING" is defined.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
6 years agoMerge branch 'gost-split-2' into 'master'
Dmitry Eremin-Solenikov [Fri, 8 Nov 2019 23:03:16 +0000 (23:03 +0000)] 
Merge branch 'gost-split-2' into 'master'

GOST key exchange support

See merge request gnutls/gnutls!1097

6 years agoMerge branch 'tmp-cfb8-fixes' into 'master'
Daiki Ueno [Fri, 8 Nov 2019 12:38:54 +0000 (12:38 +0000)] 
Merge branch 'tmp-cfb8-fixes' into 'master'

nettle: backport fixes to cfb8_decrypt

See merge request gnutls/gnutls!1117

6 years agoAdd support for VKO GOST key exchange
Dmitry Eremin-Solenikov [Thu, 27 Oct 2016 00:30:34 +0000 (03:30 +0300)] 
Add support for VKO GOST key exchange

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years ago.gitlab-ci.yml: bump configure cache version
Daiki Ueno [Thu, 7 Nov 2019 17:25:01 +0000 (18:25 +0100)] 
.gitlab-ci.yml: bump configure cache version

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agocrypto-selftests: test CFB8 ciphers with different chunksizes
Günther Deschner [Wed, 6 Nov 2019 12:17:57 +0000 (13:17 +0100)] 
crypto-selftests: test CFB8 ciphers with different chunksizes

Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agonettle: use included CFB8 implementation if nettle is 3.5
Daiki Ueno [Fri, 8 Nov 2019 09:10:09 +0000 (10:10 +0100)] 
nettle: use included CFB8 implementation if nettle is 3.5

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agoMerge branch 'prf-crash' into 'master'
Dmitry Eremin-Solenikov [Thu, 7 Nov 2019 22:12:43 +0000 (22:12 +0000)] 
Merge branch 'prf-crash' into 'master'

prf: don't crash when called before handshake completion

See merge request gnutls/gnutls!1116

6 years agogroups: add function to return group by curve
Dmitry Eremin-Solenikov [Sat, 9 Feb 2019 23:38:43 +0000 (02:38 +0300)] 
groups: add function to return group by curve

Two GOST groups will have two curves attached. Add function to retrieve
group by curve, rather than by group id.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoecc: define curve->group relationship
Dmitry Eremin-Solenikov [Tue, 7 May 2019 15:01:33 +0000 (18:01 +0300)] 
ecc: define curve->group relationship

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoDeclare groups corresponding to GOST curves
Dmitry Eremin-Solenikov [Tue, 29 Aug 2017 08:09:31 +0000 (11:09 +0300)] 
Declare groups corresponding to GOST curves

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoAdd GOST key transport support
Dmitry Eremin-Solenikov [Fri, 2 Dec 2016 03:26:55 +0000 (06:26 +0300)] 
Add GOST key transport support

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agonettle: add support for GOST key derivation
Dmitry Eremin-Solenikov [Thu, 7 Jun 2018 10:19:55 +0000 (13:19 +0300)] 
nettle: add support for GOST key derivation

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years ago_gnutls_pk_derive: add argument for nonce
Dmitry Eremin-Solenikov [Thu, 27 Oct 2016 15:58:12 +0000 (18:58 +0300)] 
_gnutls_pk_derive: add argument for nonce

GOST VKO key derivation needs another opaque argument (called UKM).
Add an argument to _gnutls_pk_derive to accomodate that keying material.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agonettle/gost: add support for GOST VKO algorithm
Dmitry Eremin-Solenikov [Thu, 14 Jun 2018 12:39:39 +0000 (15:39 +0300)] 
nettle/gost: add support for GOST VKO algorithm

GOST VKO is a variant of ECDHE algorithm.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agonettle/gost: provide GOST keywrapping support
Dmitry Eremin-Solenikov [Thu, 14 Jun 2018 12:39:19 +0000 (15:39 +0300)] 
nettle/gost: provide GOST keywrapping support

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoprf: don't crash when called before handshake completion
Miroslav Lichvar [Wed, 6 Nov 2019 10:37:10 +0000 (11:37 +0100)] 
prf: don't crash when called before handshake completion

If a gnutls_prf*() function is called before the handshake is completed,
return GNUTLS_E_INVALID_REQUEST instead of crashing.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
6 years agonettle: backport fixes to cfb8_decrypt
Daiki Ueno [Wed, 6 Nov 2019 11:07:24 +0000 (12:07 +0100)] 
nettle: backport fixes to cfb8_decrypt

cfb8: don't truncate output IV if input is shorter than block size:
https://git.lysator.liu.se/nettle/nettle/commit/f4a9c842621baf5d71aa9cc3989851f44dc46861

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agognutls_privkey_sign_data2: removed unnecessary text [ci skip]
Nikos Mavrogiannopoulos [Tue, 5 Nov 2019 15:47:17 +0000 (16:47 +0100)] 
gnutls_privkey_sign_data2: removed unnecessary text [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agoMerge branch 'crt-vrfy-final' into 'master'
Dmitry Eremin-Solenikov [Sat, 2 Nov 2019 20:26:42 +0000 (20:26 +0000)] 
Merge branch 'crt-vrfy-final' into 'master'

tls-sig: reverse bytes in TLS signatures for GOST signatures

See merge request gnutls/gnutls!1114

6 years agoMerge branch 'tmp-update-ci-to-f31' into 'master'
Nikos Mavrogiannopoulos [Sat, 2 Nov 2019 09:15:48 +0000 (09:15 +0000)] 
Merge branch 'tmp-update-ci-to-f31' into 'master'

Update CI to F31

See merge request gnutls/gnutls!1113

6 years ago.gitlab-ci.yml: do not inline strcmp in valgrind build
Nikos Mavrogiannopoulos [Fri, 1 Nov 2019 13:04:27 +0000 (14:04 +0100)] 
.gitlab-ci.yml: do not inline strcmp in valgrind build

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years ago.gitlab-ci.yml: removed unnecessary use of --enable-valgrind-tests
Nikos Mavrogiannopoulos [Fri, 1 Nov 2019 09:24:24 +0000 (10:24 +0100)] 
.gitlab-ci.yml: removed unnecessary use of --enable-valgrind-tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agoMerge branch 'master' into 'master'
Nikos Mavrogiannopoulos [Fri, 1 Nov 2019 08:59:40 +0000 (08:59 +0000)] 
Merge branch 'master' into 'master'

nettle: Support sysctl(KERN_ARND) for random number generation on NetBSD.

See merge request gnutls/gnutls!1109

6 years agoAdd NEWS entry for the NetBSD KERN_ARND change.
nia [Thu, 31 Oct 2019 18:36:49 +0000 (18:36 +0000)] 
Add NEWS entry for the NetBSD KERN_ARND change.

Signed-off-by: Nia Alarie <nia@NetBSD.org>
6 years agotls-sig: reverse bytes in TLS signatures for GOST signatures
Dmitry Eremin-Solenikov [Thu, 18 May 2017 02:36:49 +0000 (05:36 +0300)] 
tls-sig: reverse bytes in TLS signatures for GOST signatures

GOST TLS suites have one peculiarity: CertificateVerify message uses
byte order opposite to the rest of GOST signature usage (BE instead of
LE). So, reverse byte order in signatures in TLS code. For now this
applies only to TLS 1.2 code. GOST TLS 1.3 ciphersuites will also follow
this approach. Legacy TLS 1.0 ciphersuites also had this peculiarity.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoMerge branch 'logfile-doc-improvement' into 'master'
Nikos Mavrogiannopoulos [Thu, 31 Oct 2019 10:47:57 +0000 (10:47 +0000)] 
Merge branch 'logfile-doc-improvement' into 'master'

doc: describe how to make gnutls-cli quiet for pipe usage

Closes #845

See merge request gnutls/gnutls!1108

6 years agoMerge branch 'remove-uint24' into 'master'
Dmitry Eremin-Solenikov [Wed, 30 Oct 2019 14:20:23 +0000 (14:20 +0000)] 
Merge branch 'remove-uint24' into 'master'

lib: simplify uint24 handling

See merge request gnutls/gnutls!1107

6 years ago.gitlab-ci.yml: updated CI environment to F31
Nikos Mavrogiannopoulos [Wed, 30 Oct 2019 09:39:49 +0000 (10:39 +0100)] 
.gitlab-ci.yml: updated CI environment to F31

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agotests: include config.h in rawpk-api.c
Nikos Mavrogiannopoulos [Fri, 11 Oct 2019 18:46:41 +0000 (20:46 +0200)] 
tests: include config.h in rawpk-api.c

This seems to have impacted windows compilation.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agotests: global-init-override do not run in windows
Nikos Mavrogiannopoulos [Fri, 11 Oct 2019 13:57:43 +0000 (15:57 +0200)] 
tests: global-init-override do not run in windows

It cannot be compiled in f30.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agoupdated to libopts 5.18.16
Nikos Mavrogiannopoulos [Fri, 11 Oct 2019 12:44:39 +0000 (14:44 +0200)] 
updated to libopts 5.18.16

This fixes compilation in Fedora 30 which ships with this
version of autogen.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agoMerge branch 'fix-gost-curves' into 'master'
Dmitry Eremin-Solenikov [Tue, 29 Oct 2019 13:07:14 +0000 (13:07 +0000)] 
Merge branch 'fix-gost-curves' into 'master'

ecc: fix curve sizes for TC26-256 gost curves

See merge request gnutls/gnutls!1110

6 years agoMerge branch 'serv-fix-table' into 'master'
Nikos Mavrogiannopoulos [Tue, 29 Oct 2019 07:35:15 +0000 (07:35 +0000)] 
Merge branch 'serv-fix-table' into 'master'

serv: move closing TABLE tag after actual table end

See merge request gnutls/gnutls!1111

6 years agoserv: move closing TABLE tag after actual table end
Dmitry Eremin-Solenikov [Sun, 27 Oct 2019 00:12:45 +0000 (03:12 +0300)] 
serv: move closing TABLE tag after actual table end

Move closing TABLE tag after printing information on cipher and MAC.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoecc: fix curve sizes for TC26-256 gost curves
Dmitry Eremin-Solenikov [Sun, 27 Oct 2019 00:08:33 +0000 (03:08 +0300)] 
ecc: fix curve sizes for TC26-256 gost curves

Fix curve size being incorrectly set to 64 instead of 32 for several
GOST curves.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agonettle: Support sysctl(KERN_ARND) for RNG on NetBSD.
nia [Sat, 26 Oct 2019 19:58:49 +0000 (20:58 +0100)] 
nettle: Support sysctl(KERN_ARND) for RNG on NetBSD.

This system call will never block and does not require a file
descriptor to be opened. It provides an endless stream of random
numbers from the kernel's ChaCha20-based random number generator.

Signed-off-by: Nia Alarie <nia@NetBSD.org>
6 years agodoc: describe how to make gnutls-cli quiet for pipe usage
Björn Jacke [Fri, 25 Oct 2019 15:25:39 +0000 (17:25 +0200)] 
doc: describe how to make gnutls-cli quiet for pipe usage

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
6 years agoMerge branch 'remove-guint64' into 'master'
Dmitry Eremin-Solenikov [Thu, 24 Oct 2019 21:10:46 +0000 (21:10 +0000)] 
Merge branch 'remove-guint64' into 'master'

lib: drop gnutls_uint64 usage as sequence number

See merge request gnutls/gnutls!1102

6 years agolib: simplify uint24 handling
Dmitry Eremin-Solenikov [Thu, 24 Oct 2019 15:01:55 +0000 (18:01 +0300)] 
lib: simplify uint24 handling

Drop separate uint24 type and functions to convert between it and
uint32_t. This makes _gnutls_read/_write_uint24 simpler and easier to
understand. And with faster assembly code.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agolib: drop gnutls_uint64 usage as sequence number
Dmitry Eremin-Solenikov [Sun, 20 Oct 2019 15:49:41 +0000 (18:49 +0300)] 
lib: drop gnutls_uint64 usage as sequence number

GnuTLS is depending already on uint64_t being a properly defined type.
So there is no need to have a special byte-array type for 8-byte
integers. Use uint64_t instead, thus simplifying a code quite heavily.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoMerge branch 'tls-continuous-mac' into 'master'
Dmitry Eremin-Solenikov [Wed, 23 Oct 2019 15:31:05 +0000 (15:31 +0000)] 
Merge branch 'tls-continuous-mac' into 'master'

Support GOST cipher suite MAC calculation

See merge request gnutls/gnutls!1098

6 years agoMerge branch 'new-crt-vrfy' into 'master'
Dmitry Eremin-Solenikov [Wed, 23 Oct 2019 15:04:58 +0000 (15:04 +0000)] 
Merge branch 'new-crt-vrfy' into 'master'

Split CertVerify code. Switch sign_entry_st to use flags

See merge request gnutls/gnutls!1103

6 years agoMerge branch 'key-compat' into 'master'
Dmitry Eremin-Solenikov [Wed, 23 Oct 2019 12:22:57 +0000 (12:22 +0000)] 
Merge branch 'key-compat' into 'master'

lib: pubkey vs TLS signature compatibility for GOST algorithms

See merge request gnutls/gnutls!1101

6 years agosign: convert tls13_ok to flags field
Dmitry Eremin-Solenikov [Mon, 21 Oct 2019 12:55:47 +0000 (15:55 +0300)] 
sign: convert tls13_ok to flags field

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agotls-sig: split TLS 1.0/1.1 CertificateVerify code
Dmitry Eremin-Solenikov [Mon, 21 Oct 2019 15:55:26 +0000 (18:55 +0300)] 
tls-sig: split TLS 1.0/1.1 CertificateVerify code

For the symmetry split the TLS 1.[01] CertificateVerify code, so that
main functions work as pure multiplexors.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agomac: mark GOST28147-TC26Z-IMIT as using CONTINUOUS_MAC
Dmitry Eremin-Solenikov [Mon, 21 Oct 2019 11:08:00 +0000 (14:08 +0300)] 
mac: mark GOST28147-TC26Z-IMIT as using CONTINUOUS_MAC

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoSupport GOST cipher suite MAC calculation
Dmitry Eremin-Solenikov [Thu, 18 May 2017 01:09:51 +0000 (04:09 +0300)] 
Support GOST cipher suite MAC calculation

GOST ciphersuites require that MAC is calculated over _all_ packets,
rather than just current packet. Add flag to auth_cipher_hd_st
controlling this behaviour.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agomac: change preimage_insecure to be a flag
Dmitry Eremin-Solenikov [Mon, 21 Oct 2019 10:57:55 +0000 (13:57 +0300)] 
mac: change preimage_insecure to be a flag

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agocipher: replace several bools with single flags instance
Dmitry Eremin-Solenikov [Fri, 18 Oct 2019 10:19:04 +0000 (13:19 +0300)] 
cipher: replace several bools with single flags instance

Replace bools in cipher_entry_st with flags field.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoMerge branch 'fix-noreturn' into 'master'
Dmitry Eremin-Solenikov [Fri, 18 Oct 2019 14:17:21 +0000 (14:17 +0000)] 
Merge branch 'fix-noreturn' into 'master'

src: fix noreturn-related warning

See merge request gnutls/gnutls!1100

6 years agolib: pubkey vs TLS signature compatibility for GOST algorithms
Dmitry Eremin-Solenikov [Thu, 21 Jun 2018 16:34:45 +0000 (19:34 +0300)] 
lib: pubkey vs TLS signature compatibility for GOST algorithms

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agosrc: fix noreturn-related warning
Dmitry Eremin-Solenikov [Fri, 18 Oct 2019 10:22:06 +0000 (13:22 +0300)] 
src: fix noreturn-related warning

Recent autogen started adding '#include <stdnoreturn.h>' into -args.h
files. However in GnuTLS tools code this results in the following
warnings, because stdnoreturn.h unconditionally redefines 'noreturn' to
_Noreturn:

warning: '_Noreturn' attribute directive ignored

Use __noreturn__ attribute instead as does Gnulib.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoMerge branch 'stream-iv' into 'master'
Dmitry Eremin-Solenikov [Thu, 17 Oct 2019 16:55:30 +0000 (16:55 +0000)] 
Merge branch 'stream-iv' into 'master'

Allow using implicit IV for stream ciphers with TLS

See merge request gnutls/gnutls!1099

6 years agoAllow using implicit IV for stream ciphers with TLS
Dmitry Eremin-Solenikov [Fri, 2 Dec 2016 05:28:34 +0000 (08:28 +0300)] 
Allow using implicit IV for stream ciphers with TLS

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoMerge branch 'gost-prf' into 'master'
Nikos Mavrogiannopoulos [Thu, 17 Oct 2019 13:09:15 +0000 (13:09 +0000)] 
Merge branch 'gost-prf' into 'master'

prf: add Streebog PRF support

See merge request gnutls/gnutls!1088

6 years agoMerge branch 'tmp-fix-coverity' into 'master'
Nikos Mavrogiannopoulos [Thu, 17 Oct 2019 13:07:41 +0000 (13:07 +0000)] 
Merge branch 'tmp-fix-coverity' into 'master'

Fix coverity in lib/

See merge request gnutls/gnutls!1092

6 years agoprf: add Streebog (GOST R 34.11-2012) PRF support
Dmitry Eremin-Solenikov [Tue, 29 Aug 2017 08:10:33 +0000 (11:10 +0300)] 
prf: add Streebog (GOST R 34.11-2012) PRF support

Add support and tests for PRF generated using both Streebog versions.
This is necessary for adding GOST TLS ciphersuites support.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoAdd const to several read-only packet sequence params
Tim Rühsen [Sat, 12 Oct 2019 18:59:22 +0000 (20:59 +0200)] 
Add const to several read-only packet sequence params

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agotests/buffer.c: Add unit test for _gnutls_buffer_unescape()
Tim Rühsen [Sun, 13 Oct 2019 10:04:20 +0000 (12:04 +0200)] 
tests/buffer.c: Add unit test for _gnutls_buffer_unescape()

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agolib/x509/x509.c: Check before pointer dereference in get_alt_name()
Tim Rühsen [Wed, 9 Oct 2019 16:54:12 +0000 (18:54 +0200)] 
lib/x509/x509.c: Check before pointer dereference in get_alt_name()

Fixes Coverity issue 1361513

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agocipher: Let _gnutls_auth_cipher_setiv() return int
Tim Rühsen [Wed, 9 Oct 2019 16:44:35 +0000 (18:44 +0200)] 
cipher: Let _gnutls_auth_cipher_setiv() return int

Fixes Coverity issue 1454646

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agolib/record.c: Use assignment instead of memcpy()
Tim Rühsen [Wed, 9 Oct 2019 16:34:22 +0000 (18:34 +0200)] 
lib/record.c: Use assignment instead of memcpy()

Fixes Coverity issue 1454647

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agolib/sslv2_compat.c: Check return value of _gnutls_generate_session_id()
Tim Rühsen [Wed, 9 Oct 2019 16:27:11 +0000 (18:27 +0200)] 
lib/sslv2_compat.c: Check return value of _gnutls_generate_session_id()

Fixes Coverity issue 1454649

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agolib/x509/output.c: Remove unneeded NULL check in print_crt_pubkey()
Tim Rühsen [Wed, 9 Oct 2019 16:11:10 +0000 (18:11 +0200)] 
lib/x509/output.c: Remove unneeded NULL check in print_crt_pubkey()

Fixes Coverity issue 1454670

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agolib/auth/srp_passwd.c: Fix NULL dereference in _gnutls_srp_pwd_read_entry()
Tim Rühsen [Wed, 9 Oct 2019 16:04:44 +0000 (18:04 +0200)] 
lib/auth/srp_passwd.c: Fix NULL dereference in _gnutls_srp_pwd_read_entry()

Fixes Coverity issue 1454652

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agolib/str.c: Replace sscanf() in _gnutls_buffer_unescape()
Tim Rühsen [Wed, 9 Oct 2019 15:53:54 +0000 (17:53 +0200)] 
lib/str.c: Replace sscanf() in _gnutls_buffer_unescape()

Fixes Coverity issue 1454651

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agolib/handshake.c: Check return value of _gnutls_version_max()
Tim Rühsen [Wed, 9 Oct 2019 15:39:24 +0000 (17:39 +0200)] 
lib/handshake.c: Check return value of _gnutls_version_max()

Fixes Coverity issue 1454674
Fixes Coverity issue 1454658

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agoRemove trailing spaces in several files
Tim Rühsen [Wed, 9 Oct 2019 15:37:42 +0000 (17:37 +0200)] 
Remove trailing spaces in several files

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agoMerge branch 'tmp-remove-coverity' into 'master'
Nikos Mavrogiannopoulos [Fri, 11 Oct 2019 12:47:30 +0000 (12:47 +0000)] 
Merge branch 'tmp-remove-coverity' into 'master'

.gitlab-ci.yml: removed coverity build [ci skip]

See merge request gnutls/gnutls!1095

6 years ago.gitlab-ci.yml: removed coverity build [ci skip]
Nikos Mavrogiannopoulos [Thu, 10 Oct 2019 15:49:01 +0000 (17:49 +0200)] 
.gitlab-ci.yml: removed coverity build [ci skip]

The coverity run is subject to several restrictions by the service,
and thus it is not really useful in the main CI runs as it cannot reasonably
be run on MRs or master. As such we simplify the main CI file by moving the
coverity to the coverage sub-project and running it weekly.

The new location is at:
https://gitlab.com/gnutls/coverage

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agoMerge branch 'tmp-ext-mandatory' into 'master'
Nikos Mavrogiannopoulos [Thu, 10 Oct 2019 12:55:37 +0000 (12:55 +0000)] 
Merge branch 'tmp-ext-mandatory' into 'master'

session tickets: parse extension during session resumption

Closes #841

See merge request gnutls/gnutls!1087

6 years agoMerge branch 'doc-lscpu' into 'master'
Nikos Mavrogiannopoulos [Thu, 10 Oct 2019 06:40:09 +0000 (06:40 +0000)] 
Merge branch 'doc-lscpu' into 'master'

README.md: document lscpu/util-linux dependency for make check

Closes #764

See merge request gnutls/gnutls!1093

6 years agoMerge branch 'gost-pkcs11' into 'master'
Dmitry Eremin-Solenikov [Thu, 10 Oct 2019 00:14:10 +0000 (00:14 +0000)] 
Merge branch 'gost-pkcs11' into 'master'

P11tool improvements

See merge request gnutls/gnutls!1071

6 years agoMerge branch 'psk-file-fix' into 'master' 1090/merge
Dmitry Eremin-Solenikov [Thu, 10 Oct 2019 00:13:27 +0000 (00:13 +0000)] 
Merge branch 'psk-file-fix' into 'master'

tests/psk-file: fix heizenbug in last test

See merge request gnutls/gnutls!1090

6 years agoMerge branch 'groups-non-ec' into 'master'
Dmitry Eremin-Solenikov [Thu, 10 Oct 2019 00:13:16 +0000 (00:13 +0000)] 
Merge branch 'groups-non-ec' into 'master'

ext/supported_groups: don't consider non-EC groups for EC

See merge request gnutls/gnutls!1089

6 years agoMerge branch 'tmp-fix-doc3' into 'master'
Dmitry Eremin-Solenikov [Thu, 10 Oct 2019 00:12:41 +0000 (00:12 +0000)] 
Merge branch 'tmp-fix-doc3' into 'master'

documentation updates

Closes #842

See merge request gnutls/gnutls!1069

6 years agocrq APIs: fix typos [ci skip]
Nikos Mavrogiannopoulos [Sat, 5 Oct 2019 01:30:32 +0000 (03:30 +0200)] 
crq APIs: fix typos [ci skip]

Resolves: #842

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agodocument limitations of gnutls_record_discard_queued() [ci skip]
Nikos Mavrogiannopoulos [Wed, 25 Sep 2019 05:04:04 +0000 (07:04 +0200)] 
document limitations of gnutls_record_discard_queued() [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agoREADME.md: document lscpu/util-linux dependency for make check
Ricardo M. Correia [Wed, 9 Oct 2019 15:37:22 +0000 (17:37 +0200)] 
README.md: document lscpu/util-linux dependency for make check

Closes #764

Signed-off-by: Ricardo M. Correia <rcorreia@wizy.org>
6 years agotestpkcs11.sh: test that we output mechanism flags correctly
Dmitry Eremin-Solenikov [Tue, 8 Oct 2019 22:29:07 +0000 (01:29 +0300)] 
testpkcs11.sh: test that we output mechanism flags correctly

Verify some of PKCS#11 mechanism flags.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agop11tool: print mechanism info in list-mechanisms
Dmitry Eremin-Solenikov [Wed, 25 Sep 2019 18:11:09 +0000 (21:11 +0300)] 
p11tool: print mechanism info in list-mechanisms

Print key size range and flags in mechanisms list.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoMerge branch 'fix-cert-keys' into 'master'
Dmitry Eremin-Solenikov [Tue, 8 Oct 2019 22:31:15 +0000 (22:31 +0000)] 
Merge branch 'fix-cert-keys' into 'master'

tests: correct gost server certificates

See merge request gnutls/gnutls!1080

6 years agotests/psk-file: fix heizenbug in last test 1090/head
Dmitry Eremin-Solenikov [Tue, 8 Oct 2019 21:10:09 +0000 (00:10 +0300)] 
tests/psk-file: fix heizenbug in last test

Currently last test case in psk-file expects that the server will
terminate connection with fatal error and close connection. Client will
receive GNUTLS_E_PUSH_ERROR error. However on slow boxes (or under qemu)
client is able to receive server's fatal alert thus returning unexpected
error. To make this behaviour predictable make server wait for client to
read all data and actually close connection on it's own.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agosession tickets: parse extension during session resumption on client side
Nikos Mavrogiannopoulos [Tue, 8 Oct 2019 05:23:31 +0000 (07:23 +0200)] 
session tickets: parse extension during session resumption on client side

It is possible for a server to send a new session ticket during
TLS1.2 resumption. To be able to parse it as client we need to
check the extension during resumption as well.

Resolves: #841

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agoext/supported_groups: don't consider non-EC groups for EC
Dmitry Eremin-Solenikov [Sun, 23 Jun 2019 22:37:31 +0000 (01:37 +0300)] 
ext/supported_groups: don't consider non-EC groups for EC

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agotests: correct gost server certificates
Dmitry Eremin-Solenikov [Thu, 1 Aug 2019 23:08:00 +0000 (02:08 +0300)] 
tests: correct gost server certificates

Correct GOST server certificates:
 - use only Digital Signature Key Usage,
 - use new format for 512-bit curve key and certificate.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoMerge branch 'new-gost-x509' into 'master'
Dmitry Eremin-Solenikov [Tue, 8 Oct 2019 09:30:31 +0000 (09:30 +0000)] 
Merge branch 'new-gost-x509' into 'master'

Implement new requirements for GOST PublicKeyParameters

See merge request gnutls/gnutls!1070

6 years ago.gitlab-ci.yml: only run coverity task on 3_6_x tags [ci skip]
Nikos Mavrogiannopoulos [Tue, 8 Oct 2019 04:48:44 +0000 (06:48 +0200)] 
.gitlab-ci.yml: only run coverity task on 3_6_x tags [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agocert-tests/gost: add certificate with new GOSTParameters struct
Dmitry Eremin-Solenikov [Wed, 2 Oct 2019 14:05:10 +0000 (17:05 +0300)] 
cert-tests/gost: add certificate with new GOSTParameters struct

Add certificate example using simplified (new) GOSTParameters structure.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years ago.gitlab-ci.yml: include an automated coverity build on tags
Nikos Mavrogiannopoulos [Mon, 7 Oct 2019 18:59:34 +0000 (20:59 +0200)] 
.gitlab-ci.yml: include an automated coverity build on tags

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agolib: implement support for updated GOST PublicKeyParameters
Dmitry Eremin-Solenikov [Wed, 25 Sep 2019 15:13:37 +0000 (18:13 +0300)] 
lib: implement support for updated GOST PublicKeyParameters

Recomendation for standardization R 1323565.1.023-2018 has made changes
to PublicKeyParameters for GOST R 34.10-2012 keys. It has removed
encryptionParamSet (since now S-BOX is basically fixed as TC26-Z) and
made digestParamSet OPTIONAL (as it can be concluded from public key
OID). Implement these requirements.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agonettle/pk: add support for "new" TC26 256 B curve
Dmitry Eremin-Solenikov [Thu, 25 Apr 2019 12:06:58 +0000 (15:06 +0300)] 
nettle/pk: add support for "new" TC26 256 B curve

TC26 likes aliases. Thus "new" TC26 256 B curve is the same as old
CryptoPro-256-A curve (but with limitation to use GOST R 34.10-2012).

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>