]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
6 years agokeylogfile: generalize with a callback
Daiki Ueno [Sun, 2 Feb 2020 07:13:50 +0000 (08:13 +0100)] 
keylogfile: generalize with a callback

This refactors the keylogfile mechanism by adding a callback to get
notified when a new secret is derived and installed.  That way,
consumers can implement custom logging feature per session, which is
particularly useful in QUIC implementation.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agoMerge branch 'tmp-kdf-api' into 'master'
Daiki Ueno [Tue, 4 Feb 2020 10:43:48 +0000 (10:43 +0000)] 
Merge branch 'tmp-kdf-api' into 'master'

crypto-api: add generic crypto functions for KDF

Closes #851 and #813

See merge request gnutls/gnutls!1186

6 years agotests: skip pkcs12-gost under GNUTLS_FORCE_FIPS_MODE
Daiki Ueno [Mon, 3 Feb 2020 04:18:29 +0000 (05:18 +0100)] 
tests: skip pkcs12-gost under GNUTLS_FORCE_FIPS_MODE

The MAC algorithm used in the PBKDF2 is actually prohibited in the
FIPS mode and previously there wasn't a check for that.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agoprivkey_pkcs8: remove unused #include <nettle/pbkdf2.h>
Daiki Ueno [Sun, 2 Feb 2020 16:58:56 +0000 (17:58 +0100)] 
privkey_pkcs8: remove unused #include <nettle/pbkdf2.h>

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agopkcs7-crypt: refactor using gnutls_pbkdf2
Daiki Ueno [Sun, 2 Feb 2020 16:57:37 +0000 (17:57 +0100)] 
pkcs7-crypt: refactor using gnutls_pbkdf2

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agopkcs12: refactor using gnutls_pbkdf2
Daiki Ueno [Sun, 2 Feb 2020 15:15:51 +0000 (16:15 +0100)] 
pkcs12: refactor using gnutls_pbkdf2

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agosecrets: refactor using gnutls_hkdf_{extract,expand}
Daiki Ueno [Sun, 2 Feb 2020 15:00:56 +0000 (16:00 +0100)] 
secrets: refactor using gnutls_hkdf_{extract,expand}

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agocrypto-api: add generic crypto functions for KDF
Daiki Ueno [Sun, 2 Feb 2020 13:44:05 +0000 (14:44 +0100)] 
crypto-api: add generic crypto functions for KDF

This exposes HKDF and PBKDF2 functions from the library.  Instead of
defining a single KDF interface as in PKCS #11, this patch defines 3
distinct functions for HKDF-Extract, HKDF-Expand, and PBKDF2
derivation, so that we can take advantage of compile time checking of
necesssary parameters.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agoMerge branch 'mcatanzaro/session-pack-leak' into 'master'
Daiki Ueno [Sun, 2 Feb 2020 18:16:14 +0000 (18:16 +0000)] 
Merge branch 'mcatanzaro/session-pack-leak' into 'master'

session_pack: fix leak in error path

See merge request gnutls/gnutls!1185

6 years agosession_pack: fix leak in error path
Michael Catanzaro [Sun, 2 Feb 2020 15:47:25 +0000 (09:47 -0600)] 
session_pack: fix leak in error path

If called at the wrong time, it allocates the buffer sb and forgets to
clear it.

Signed-off-by: Michael Catanzaro <mcatanzaro@gnome.org>
6 years ago.mailmap: map Dmitry's email to a single name [ci skip]
Nikos Mavrogiannopoulos [Sat, 1 Feb 2020 22:09:01 +0000 (23:09 +0100)] 
.mailmap: map Dmitry's email to a single name [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agoNEWS: fixed issue number for 448 3.6.12 gnutls_3_6_12
Nikos Mavrogiannopoulos [Sat, 1 Feb 2020 22:02:55 +0000 (23:02 +0100)] 
NEWS: fixed issue number for 448

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agoNEWS: refactored for release
Nikos Mavrogiannopoulos [Sat, 1 Feb 2020 21:54:13 +0000 (22:54 +0100)] 
NEWS: refactored for release

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agohooks.m4: bumped so-version
Nikos Mavrogiannopoulos [Sat, 1 Feb 2020 21:44:41 +0000 (22:44 +0100)] 
hooks.m4: bumped so-version

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agoMerge branch 'nettle-master-gostdsa' into 'master'
Nikos Mavrogiannopoulos [Fri, 31 Jan 2020 07:49:09 +0000 (07:49 +0000)] 
Merge branch 'nettle-master-gostdsa' into 'master'

nettle/gost: support use GOST DSA support from master branch

See merge request gnutls/gnutls!1183

6 years agonettle/gost: support use GOST DSA support from master branch
Dmitry Baryshkov [Wed, 29 Jan 2020 17:00:53 +0000 (20:00 +0300)] 
nettle/gost: support use GOST DSA support from master branch

Use GOST DSA and GOST curves provided by Nettle's master branch.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
6 years agoMerge branch 'fix-pkcs12-iter' into 'master'
Dmitry Baryshkov [Tue, 28 Jan 2020 14:39:57 +0000 (14:39 +0000)] 
Merge branch 'fix-pkcs12-iter' into 'master'

pkcs12: do not go try calculating pbkdf2 with 0 iterations

See merge request gnutls/gnutls!1182

6 years agopkcs12: do not go try calculating pbkdf2 with 0 iterations
Dmitry Baryshkov [Tue, 28 Jan 2020 10:05:14 +0000 (13:05 +0300)] 
pkcs12: do not go try calculating pbkdf2 with 0 iterations

Nettle will abort on a call to pbkdf2 if iterations is 0. Add check to
GnuTLS PKCS12 GOST code to check that iter is not 0.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
6 years agoMerge branch 'localthreads' into 'master'
Tim Rühsen [Tue, 28 Jan 2020 09:47:06 +0000 (09:47 +0000)] 
Merge branch 'localthreads' into 'master'

add support for local threads with studio and ibm compilers

See merge request gnutls/gnutls!1181

6 years agoadd support for local threads with studio and ibm compilers
Bjoern Jacke [Mon, 27 Jan 2020 18:40:53 +0000 (19:40 +0100)] 
add support for local threads with studio and ibm compilers

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
6 years agoMerge branch 'tmp-20200126-bashismintest' into 'master'
Tim Rühsen [Mon, 27 Jan 2020 08:39:22 +0000 (08:39 +0000)] 
Merge branch 'tmp-20200126-bashismintest' into 'master'

Avoid pushd/popd bashism in testsuite

See merge request gnutls/gnutls!1180

6 years agotlsfuzzer: optimized tests for CI and enabled x448
Nikos Mavrogiannopoulos [Sun, 26 Jan 2020 20:45:29 +0000 (21:45 +0100)] 
tlsfuzzer: optimized tests for CI and enabled x448

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agotlsfuzzer: fix test-tls13-large-number-of-extensions.py
Nikos Mavrogiannopoulos [Sun, 26 Jan 2020 20:32:18 +0000 (21:32 +0100)] 
tlsfuzzer: fix test-tls13-large-number-of-extensions.py

This test requires a TLS-1.3-only server as its tests clash with
extensions supported by a TLS-1.2 server. Ensure that the extensions
that overlap with TLS-1.2 are not manipulated as we don't have
a pure TLS-1.3-only implementation.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agoAvoid pushd/popd bashism in testsuite
Andreas Metzler [Sun, 26 Jan 2020 17:39:18 +0000 (18:39 +0100)] 
Avoid pushd/popd bashism in testsuite

Signed-off-by: Andreas Metzler <ametzler@bebt.de>
6 years agoMerge branch 'tmp-ci-make-j' into 'master'
Tim Rühsen [Sun, 26 Jan 2020 15:22:51 +0000 (15:22 +0000)] 
Merge branch 'tmp-ci-make-j' into 'master'

Use 'make -j' with higher values for CI builds and tests

Closes #897

See merge request gnutls/gnutls!1154

6 years agotests/key-material-dtls.c: Try again on GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED
Tim Rühsen [Mon, 20 Jan 2020 10:48:50 +0000 (11:48 +0100)] 
tests/key-material-dtls.c: Try again on GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED

This fixes issues on the CI cross-runners with 'make -jN', N > 1.

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agoUse make with crafted -j for CI builds and tests
Tim Rühsen [Sat, 4 Jan 2020 13:37:46 +0000 (14:37 +0100)] 
Use make with crafted -j for CI builds and tests

This speeds up the Gitlab CI runners. E.g. measured timings of the
Debian.x86_64 runner show ~40% speedup (down from 38 to 23 minutes).

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agoMerge branch 'tmp-update-tlsfuzzer' into 'master'
Nikos Mavrogiannopoulos [Sun, 26 Jan 2020 12:37:38 +0000 (12:37 +0000)] 
Merge branch 'tmp-update-tlsfuzzer' into 'master'

tlsfuzzer: updated to latest upstream

Closes #907

See merge request gnutls/gnutls!1179

6 years agotests: updated tlsfuzzer tests to latest version
Nikos Mavrogiannopoulos [Sat, 25 Jan 2020 21:28:32 +0000 (22:28 +0100)] 
tests: updated tlsfuzzer tests to latest version

This adds new tests, reduces running time, and removes test-tls13-obsolete-curves.py.
The latter introduced too pendantic tests on curves we don't implement,
and requires significant changes to passing with limited benefit. For example
it requires the server to error on mismatching entries (and we simply ignore
them). As its value is low (we do not target to be a reference implementation
for testing broken clients), it was removed.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agokey shares: avoid using internal errors
Nikos Mavrogiannopoulos [Sat, 25 Jan 2020 21:02:48 +0000 (22:02 +0100)] 
key shares: avoid using internal errors

On unknown curves or illegal parameters, make sure we return the
right error code which will translate to the appropriate alert.

Resolves: #907

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agoMerge branch 'tmp-fuzzers-update' into 'master'
Nikos Mavrogiannopoulos [Sat, 25 Jan 2020 12:34:04 +0000 (12:34 +0000)] 
Merge branch 'tmp-fuzzers-update' into 'master'

fuzz: update ed448 fuzzer traces and other fuzz improvements

See merge request gnutls/gnutls!1177

6 years agoMerge branch 'tmp-gl-lgpl2' into 'master'
Tim Rühsen [Sat, 25 Jan 2020 12:06:36 +0000 (12:06 +0000)] 
Merge branch 'tmp-gl-lgpl2' into 'master'

Create files in gl/ licenced lgpl2+ instead of lgpl3+

See merge request gnutls/gnutls!1178

6 years agofuzz: fixed Ed448 fuzzer traces
Nikos Mavrogiannopoulos [Fri, 24 Jan 2020 22:12:07 +0000 (23:12 +0100)] 
fuzz: fixed Ed448 fuzzer traces

The fuzzer files for ed448 were the reverse for client and server.
Enhanced the fuzzer tools to run a single fuzzer, and added more
clear documentation on how to generate and manually test the fuzzer
outputs.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agoREADME-adding-traces.md: updated with more precise information
Nikos Mavrogiannopoulos [Fri, 24 Jan 2020 22:11:34 +0000 (23:11 +0100)] 
README-adding-traces.md: updated with more precise information

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agofuzzers: added ed448 keys
Nikos Mavrogiannopoulos [Fri, 24 Jan 2020 21:57:49 +0000 (22:57 +0100)] 
fuzzers: added ed448 keys

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agoCreate files in gl/ licenced lgpl2+ instead of lgpl3+
Tim Rühsen [Sat, 25 Jan 2020 10:18:09 +0000 (11:18 +0100)] 
Create files in gl/ licenced lgpl2+ instead of lgpl3+

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agofuzzers: when provided with a parameter they will run on a single file
Nikos Mavrogiannopoulos [Fri, 24 Jan 2020 21:53:50 +0000 (22:53 +0100)] 
fuzzers: when provided with a parameter they will run on a single file

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agoMerge branch 'fix-gost-nettle-master' into 'master'
Dmitry Baryshkov [Sat, 25 Jan 2020 05:08:06 +0000 (05:08 +0000)] 
Merge branch 'fix-gost-nettle-master' into 'master'

lib/nettle/gost: restore compatibility with nettle master

See merge request gnutls/gnutls!1176

6 years ago.gitlab-ci.yml: remove --disable-gost from nettle-master test
Dmitry Baryshkov [Fri, 24 Jan 2020 19:04:41 +0000 (22:04 +0300)] 
.gitlab-ci.yml: remove --disable-gost from nettle-master test

Remove --disable-gost switch from the test using Nettle's master branch
as GnuTLS is now compatible again with nettle/master.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
6 years agolib/nettle/gost: restore compatibility with nettle master
Dmitry Baryshkov [Thu, 23 Jan 2020 10:07:23 +0000 (13:07 +0300)] 
lib/nettle/gost: restore compatibility with nettle master

Use newer format of ecc curve data if curve448 support is detected.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
6 years ago.gitlab-ci.yml: force running jobs on linux runners
Nikos Mavrogiannopoulos [Fri, 24 Jan 2020 15:38:15 +0000 (16:38 +0100)] 
.gitlab-ci.yml: force running jobs on linux runners

There are shared windows runners in gitlab, that will fail
running our jobs.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agoMerge branch 'legacy-gost-512' into 'master'
Nikos Mavrogiannopoulos [Fri, 24 Jan 2020 13:46:20 +0000 (13:46 +0000)] 
Merge branch 'legacy-gost-512' into 'master'

x509: include digestParamSet into GOST 512-bit curves A and B params

See merge request gnutls/gnutls!1173

6 years agoMerge branch 'tmp-ed448' into 'master'
Daiki Ueno [Fri, 24 Jan 2020 07:31:54 +0000 (07:31 +0000)] 
Merge branch 'tmp-ed448' into 'master'

algorithms: implement X448 key exchange and Ed448 signature scheme

See merge request gnutls/gnutls!984

6 years agofuzz: import key, certificate, and traces using Ed448
Daiki Ueno [Thu, 23 Jan 2020 15:25:43 +0000 (16:25 +0100)] 
fuzz: import key, certificate, and traces using Ed448

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agotlsfuzzer: enable tests for X448
Daiki Ueno [Wed, 22 Jan 2020 04:25:19 +0000 (05:25 +0100)] 
tlsfuzzer: enable tests for X448

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years ago.gitlab-ci.yml: set WINEPATH to allow eccdata run under Wine
Daiki Ueno [Mon, 20 Jan 2020 10:17:51 +0000 (11:17 +0100)] 
.gitlab-ci.yml: set WINEPATH to allow eccdata run under Wine

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years ago.gitlab-ci.yml: export LDFLAGS throughout the FreeBSD build
Daiki Ueno [Sun, 19 Jan 2020 11:13:48 +0000 (12:13 +0100)] 
.gitlab-ci.yml: export LDFLAGS throughout the FreeBSD build

Otherwise the build process wouldn't be able to find -lgmp.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years ago.gitlab-ci.yml: add target to build against nettle master
Daiki Ueno [Mon, 13 Jan 2020 10:35:15 +0000 (11:35 +0100)] 
.gitlab-ci.yml: add target to build against nettle master

This is similar to the build/gnutls target in nettle's own gitlab CI.
The only difference is that this will build/test all branches of
GnuTLS against the master branch of nettle.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agoalgorithms: implement X448 key exchange and Ed448 signature scheme
Daiki Ueno [Mon, 22 Apr 2019 06:27:43 +0000 (08:27 +0200)] 
algorithms: implement X448 key exchange and Ed448 signature scheme

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agonettle: vendor in Curve448 and Ed448 implementation
Daiki Ueno [Sun, 21 Apr 2019 19:13:30 +0000 (21:13 +0200)] 
nettle: vendor in Curve448 and Ed448 implementation

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agoMerge branch 'fix-gost-pkcs12' into 'master'
Dmitry Baryshkov [Mon, 20 Jan 2020 21:41:47 +0000 (21:41 +0000)] 
Merge branch 'fix-gost-pkcs12' into 'master'

pkcs12: use correct key length when using STREEBOG-512

See merge request gnutls/gnutls!1171

6 years agoMerge branch 'tmp-tls13-ocsp' into 'master'
Nikos Mavrogiannopoulos [Mon, 20 Jan 2020 17:44:59 +0000 (17:44 +0000)] 
Merge branch 'tmp-tls13-ocsp' into 'master'

tls13: fix issues with client OCSP responses

Closes #876

See merge request gnutls/gnutls!1169

6 years agoMerge branch 'ogrnip' into 'master'
Dmitry Baryshkov [Mon, 20 Jan 2020 17:00:23 +0000 (17:00 +0000)] 
Merge branch 'ogrnip' into 'master'

x509: add OGRNIP DN entry definition used by qualified GOST certificates

See merge request gnutls/gnutls!1174

6 years agotls13: request OCSP responses as a server
Nikos Mavrogiannopoulos [Wed, 15 Jan 2020 10:05:31 +0000 (11:05 +0100)] 
tls13: request OCSP responses as a server

The TLS1.3 protocol requires the server to advertise an empty
OCSP status request extension on its certificate verify message
for an OCSP response to be sent by the client. We now always
send this extension to allow clients attaching those responses.

Resolves: #876

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agox509: add OGRNIP DN entry definition used by qualified GOST certificates
Dmitry Baryshkov [Mon, 20 Jan 2020 12:08:04 +0000 (15:08 +0300)] 
x509: add OGRNIP DN entry definition used by qualified GOST certificates

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
6 years agoMerge branch 'gost-fuzz-1' into 'master'
Dmitry Baryshkov [Mon, 20 Jan 2020 12:03:31 +0000 (12:03 +0000)] 
Merge branch 'gost-fuzz-1' into 'master'

fuzz in gost pkcs7/8/12 files

See merge request gnutls/gnutls!1172

6 years agoMerge branch 'tmp-fix-gnutls-cli-debug' into 'master'
Dmitry Baryshkov [Mon, 20 Jan 2020 12:03:06 +0000 (12:03 +0000)] 
Merge branch 'tmp-fix-gnutls-cli-debug' into 'master'

gnutls-cli-debug: ignore tests when algorithms are unavailable

See merge request gnutls/gnutls!1170

6 years agox509: include digestParamSet into GOST 512-bit curves A and B params
Dmitry Eremin-Solenikov [Wed, 6 Nov 2019 12:14:48 +0000 (15:14 +0300)] 
x509: include digestParamSet into GOST 512-bit curves A and B params

Old implementations do not understand PublicKeyParams with omitted
digestParamSet. So include the field for old 512-bit curves to improve
compatibility with old implementations.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agofuzz in gost pkcs7/8/12 files
Dmitry Baryshkov [Mon, 20 Jan 2020 00:16:56 +0000 (03:16 +0300)] 
fuzz in gost pkcs7/8/12 files

Add several examples of PKCS#7/#8/#12 files using GOST keys, ciphers and
digest functions.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
6 years agopkcs12: use correct key length when using STREEBOG-512
Dmitry Baryshkov [Mon, 20 Jan 2020 00:11:08 +0000 (03:11 +0300)] 
pkcs12: use correct key length when using STREEBOG-512

PKCS#12 files using GOST HMAC (GOST R 34.11-94 and Streebog) use special
function to generate MAC key. Pass correct key length (fixed to be 32)
when generating PKCS#12 files protected with Streebog (currently it
incorrectly uses 64 there).

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
6 years agognutls-cli-debug: ignore tests when algorithms are unavailable
Nikos Mavrogiannopoulos [Fri, 17 Jan 2020 20:34:45 +0000 (21:34 +0100)] 
gnutls-cli-debug: ignore tests when algorithms are unavailable

When gnutls-cli-debug is run on systems where a particular algorithm
is disabled, ensure that we don't stop the testing; in that case
we ignore the test.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agodoc update [ci skip]
Nikos Mavrogiannopoulos [Wed, 15 Jan 2020 13:44:22 +0000 (14:44 +0100)] 
doc update [ci skip]

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agotls13: do not send OCSP responses as client without server requesting
Nikos Mavrogiannopoulos [Wed, 15 Jan 2020 08:46:38 +0000 (09:46 +0100)] 
tls13: do not send OCSP responses as client without server requesting

In client side ensure we see a request for OCSP from servers before
sending one.

Relates: #876

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agoMerge branch 'override-default-priority' into 'master'
Nikos Mavrogiannopoulos [Mon, 13 Jan 2020 22:42:17 +0000 (22:42 +0000)] 
Merge branch 'override-default-priority' into 'master'

libgnutls: Add system-wide default-priority-string override.

See merge request gnutls/gnutls!1158

6 years agolibgnutls: Add system-wide default-priority-string override.
Dimitri John Ledkov [Tue, 7 Jan 2020 11:32:37 +0000 (11:32 +0000)] 
libgnutls: Add system-wide default-priority-string override.

Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
6 years agoMerge branch 'tmp-oid-fix' into 'master'
Nikos Mavrogiannopoulos [Mon, 13 Jan 2020 13:55:06 +0000 (13:55 +0000)] 
Merge branch 'tmp-oid-fix' into 'master'

tests: replace invalid extension OIDs with valid ones

See merge request gnutls/gnutls!1153

6 years agoMerge branch 'tmp-cli-multi-staple' into 'master'
Dmitry Baryshkov [Mon, 13 Jan 2020 13:50:42 +0000 (13:50 +0000)] 
Merge branch 'tmp-cli-multi-staple' into 'master'

gnutls-cli: Log all stapled OCSP responses when running with --verbose

See merge request gnutls/gnutls!1165

6 years agoMerge branch 'gost-prio-tests' into 'master'
Dmitry Baryshkov [Mon, 13 Jan 2020 12:15:38 +0000 (12:15 +0000)] 
Merge branch 'gost-prio-tests' into 'master'

tests/priorities: add tests for GOST ciphersuites enablement

See merge request gnutls/gnutls!1166

6 years agolib: fix _kx_priority_gost termination item
Dmitry Eremin-Solenikov [Sun, 12 Jan 2020 22:20:28 +0000 (01:20 +0300)] 
lib: fix _kx_priority_gost termination item

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agotests/priorities: add tests for GOST ciphersuites enablement
Dmitry Eremin-Solenikov [Sun, 12 Jan 2020 16:24:51 +0000 (19:24 +0300)] 
tests/priorities: add tests for GOST ciphersuites enablement

Add test counting GOST ciphersuites and ciphers available.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoMerge branch 'gost-priorities' into 'master'
Dmitry Eremin-Solenikov [Sun, 12 Jan 2020 12:38:20 +0000 (12:38 +0000)] 
Merge branch 'gost-priorities' into 'master'

Extend GOST priority settings and documentation

See merge request gnutls/gnutls!1160

6 years agoMerge branch 'fix-fips-gost' into 'master'
Dmitry Eremin-Solenikov [Sun, 12 Jan 2020 12:02:16 +0000 (12:02 +0000)] 
Merge branch 'fix-fips-gost' into 'master'

Fix tests execution when FIPS mode is compiled but not enforced.

See merge request gnutls/gnutls!1164

6 years agognutls-cli: Log all stapled OCSP responses when running with --verbose
Fiona Klute [Sat, 11 Jan 2020 20:16:50 +0000 (21:16 +0100)] 
gnutls-cli: Log all stapled OCSP responses when running with --verbose

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
6 years agoMerge branch 'tmp-ocsp-revocation' into 'master'
Daiki Ueno [Fri, 10 Jan 2020 12:16:43 +0000 (12:16 +0000)] 
Merge branch 'tmp-ocsp-revocation' into 'master'

ocsp: set GNUTLS_CERT_INVALID if OCSP response indicates revocation

See merge request gnutls/gnutls!1159

6 years agopk: set generated key algo before calling pct_test
Dmitry Eremin-Solenikov [Fri, 10 Jan 2020 11:17:44 +0000 (14:17 +0300)] 
pk: set generated key algo before calling pct_test

In wrap_nettle_pk_generate_keys() set params->algo before calling
pct_test() as GOST sign/verify use that field.

Reported-by: Daiki Ueno
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoCI: FIPS140-2 run make check without enforcing FIPS mode
Dmitry Eremin-Solenikov [Fri, 10 Jan 2020 11:16:56 +0000 (14:16 +0300)] 
CI: FIPS140-2 run make check without enforcing FIPS mode

Some distributions might enable --enable-fips140-mode, without actually
enabling/enforcing FIPS at runtime. Catch issues in such configurations
(reported by Daiki Ueno).

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agotests: add test for revoked OCSP response
Daiki Ueno [Tue, 7 Jan 2020 10:24:01 +0000 (11:24 +0100)] 
tests: add test for revoked OCSP response

This adds a test that exercises a failed handshake upon receipt of an
OCSP response with the "revoked" status.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agoocsp: set GNUTLS_CERT_INVALID if OCSP response indicates revocation
Daiki Ueno [Wed, 8 Jan 2020 15:01:38 +0000 (16:01 +0100)] 
ocsp: set GNUTLS_CERT_INVALID if OCSP response indicates revocation

This makes the OCSP based certificate verification adhere to the
convention used throughout the library: "The 'GNUTLS_CERT_INVALID'
flag is always set on a verification error and more detailed flags
will also be set when appropriate."

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agoNEWS: expand documentation for GOST priority strings
Dmitry Eremin-Solenikov [Wed, 8 Jan 2020 19:17:55 +0000 (22:17 +0300)] 
NEWS: expand documentation for GOST priority strings

Use +GOST-ALL shortcut to enable GOST ciphersuites. Also document newly
added GOST shortcuts.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agopriority: make priority matching less error-prone
Dmitry Eremin-Solenikov [Wed, 8 Jan 2020 19:11:51 +0000 (22:11 +0300)] 
priority: make priority matching less error-prone

To remove possibility of using wrong length or using strncasecmp()
instead of c_strncasecmp() define PRIO_MATCH(name) macro taking care
about all details.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agopriority: add new GOST-ALL shortcut
Dmitry Eremin-Solenikov [Wed, 8 Jan 2020 19:07:19 +0000 (22:07 +0300)] 
priority: add new GOST-ALL shortcut

Add GOST-ALL as an alias for CIPHER-GOST-ALL, MAC-GOST-ALL, KX-GOST-ALL,
SIGN-GOST-ALL and GROUP-GOST-ALL.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agopriority: add more GOST shortcuts
Dmitry Eremin-Solenikov [Wed, 8 Jan 2020 19:03:44 +0000 (22:03 +0300)] 
priority: add more GOST shortcuts

Add shortcuts for GOST ciphers, MACs and KXes. For now they contain only
one item, but this list will be expanded as support for GOST-CTR-ACPKM
ciphersuites will be added.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agolib/priority: add SIGN-GOST-ALL keyword
Dmitry Eremin-Solenikov [Wed, 8 Jan 2020 18:10:55 +0000 (21:10 +0300)] 
lib/priority: add SIGN-GOST-ALL keyword

Add SIGN-GOST-ALL keyword containing all defined GOST signature
algorithms.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoMerge branch 'tmp-fix-doc' into 'master'
Tim Rühsen [Thu, 9 Jan 2020 15:21:14 +0000 (15:21 +0000)] 
Merge branch 'tmp-fix-doc' into 'master'

doc: clarify thread safeness in gnutls_global_init() [ci skip]

Closes #900

See merge request gnutls/gnutls!1162

6 years agoMerge branch 'tmp-ocsp-check' into 'master' 903-add-crl-and-crq-fuzzers 1163/head
Nikos Mavrogiannopoulos [Thu, 9 Jan 2020 13:38:09 +0000 (13:38 +0000)] 
Merge branch 'tmp-ocsp-check' into 'master'

Provide flag to identify sessions that an OCSP response was requested

Closes #829

See merge request gnutls/gnutls!1131

6 years agodoc: clarify thread safeness in gnutls_global_init()
Nikos Mavrogiannopoulos [Thu, 9 Jan 2020 12:03:10 +0000 (13:03 +0100)] 
doc: clarify thread safeness in gnutls_global_init()

This documents and clarifies the thread safeness of gnutls_global_init()
and its constraints.

Resolves: #900

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agoMerge branch 'tmp-check-dup-extensions' into 'master'
Nikos Mavrogiannopoulos [Thu, 9 Jan 2020 06:50:24 +0000 (06:50 +0000)] 
Merge branch 'tmp-check-dup-extensions' into 'master'

x509: reject certificates having duplicate extensions

Closes #887

See merge request gnutls/gnutls!1145

6 years agolib/priority: use c_strncasecmp() for string comparison
Dmitry Eremin-Solenikov [Wed, 8 Jan 2020 17:22:11 +0000 (20:22 +0300)] 
lib/priority: use c_strncasecmp() for string comparison

Use c_strncasecmp() instead of just strncasecmp() which can be affected
by locale.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agodoc: document GOST priority options
Dmitry Eremin-Solenikov [Wed, 8 Jan 2020 18:31:32 +0000 (21:31 +0300)] 
doc: document GOST priority options

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agodoc: document GOST cipher and MAC algorithms
Dmitry Eremin-Solenikov [Wed, 8 Jan 2020 18:37:28 +0000 (21:37 +0300)] 
doc: document GOST cipher and MAC algorithms

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agopriority: fix GROUP-GOST-ALL comparison length
Dmitry Eremin-Solenikov [Wed, 8 Jan 2020 19:08:14 +0000 (22:08 +0300)] 
priority: fix GROUP-GOST-ALL comparison length

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agotests: replace invalid extension OIDs with valid ones
Nikos Mavrogiannopoulos [Sat, 4 Jan 2020 12:38:01 +0000 (13:38 +0100)] 
tests: replace invalid extension OIDs with valid ones

libtasn1 4.15.0 or earlier allow encoding and decoding
of invalid OIDs, but more recent versions may stop
accepting them. Ensure that our test suite includes
OIDs which can be decoded by all versions of libtasn1.

Relates:
https://gitlab.com/gnutls/libtasn1/issues/25

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years agoMerge branch 'topsrcdir' into 'master'
Tim Rühsen [Mon, 6 Jan 2020 16:23:32 +0000 (16:23 +0000)] 
Merge branch 'topsrcdir' into 'master'

tests/Makefile.am: use absolute top_srcdir for GNUTLS_PRIORITY_FILE

See merge request gnutls/gnutls!1156

6 years agotests/Makefile.am: use absolute top_srcdir for GNUTLS_PRIORITY_FILE
Dimitri John Ledkov [Mon, 6 Jan 2020 09:41:27 +0000 (09:41 +0000)] 
tests/Makefile.am: use absolute top_srcdir for GNUTLS_PRIORITY_FILE

Some tests, e.g. in suite/tls-fuzzer execute scripts from
sub-directories, making the relative path to system.prio in the
environment pointing to a non-existent file. Export system.prio
testsuite file as an absolute path to avoid this issue.

Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
6 years agoMerge branch 'estanglerbm-getrandom' into 'master'
Nikos Mavrogiannopoulos [Sun, 5 Jan 2020 05:33:18 +0000 (05:33 +0000)] 
Merge branch 'estanglerbm-getrandom' into 'master'

Fixes dummy getrandom() when errno = EAGAIN.

Closes #892

See merge request gnutls/gnutls!1150

6 years agoMerge branch 'tmp-ci-remove-command-concat' into 'master'
Nikos Mavrogiannopoulos [Fri, 3 Jan 2020 23:26:54 +0000 (23:26 +0000)] 
Merge branch 'tmp-ci-remove-command-concat' into 'master'

Remove && command concatenation in .gitlab-ci.yml

Closes #896

See merge request gnutls/gnutls!1152

6 years agodoc: updated epub.texi from gnutls.texi
Nikos Mavrogiannopoulos [Fri, 3 Jan 2020 19:21:07 +0000 (20:21 +0100)] 
doc: updated epub.texi from gnutls.texi

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
6 years ago.gitlab-ci.yml: identify on runtime to db2epub directory
Nikos Mavrogiannopoulos [Fri, 3 Jan 2020 15:58:04 +0000 (16:58 +0100)] 
.gitlab-ci.yml: identify on runtime to db2epub directory

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
6 years agoRemove && command concatenation in .gitlab-ci.yml
Tim Rühsen [Fri, 3 Jan 2020 12:17:28 +0000 (13:17 +0100)] 
Remove && command concatenation in .gitlab-ci.yml

As it turns out, `set -e` doesn't work if one of the commands fail,
maybe except the last command.
Seen, tested and reproduced on Fedora28 image.

Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
6 years agoMerge branch 'tmp-check-fuzz' into 'master'
Tim Rühsen [Fri, 3 Jan 2020 15:43:55 +0000 (15:43 +0000)] 
Merge branch 'tmp-check-fuzz' into 'master'

UB+ASAN: Fail tests if UB detected

Closes #882 and #878

See merge request gnutls/gnutls!1136