]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
5 years agocert-session: fail hard if mandatory stapling is not honored
Daiki Ueno [Wed, 12 Aug 2020 05:27:17 +0000 (07:27 +0200)] 
cert-session: fail hard if mandatory stapling is not honored

According to the documentation, the GNUTLS_CERT_INVALID flag must
always be set in case of verification failure, together with the flag
indicating the actual error cause.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoMerge branch 'mcatanzaro/test-missingissuer' into 'master'
Daiki Ueno [Sat, 8 Aug 2020 15:48:32 +0000 (15:48 +0000)] 
Merge branch 'mcatanzaro/test-missingissuer' into 'master'

Fix invalid free in missing issuer test case error path

See merge request gnutls/gnutls!1303

6 years agoMerge branch 'mcatanzaro/typo' into 'master'
Daiki Ueno [Fri, 7 Aug 2020 19:29:28 +0000 (19:29 +0000)] 
Merge branch 'mcatanzaro/typo' into 'master'

Fix typo in API docs

See merge request gnutls/gnutls!1302

6 years agoFix invalid free in missing issuer test case error path
Michael Catanzaro [Fri, 7 Aug 2020 18:55:23 +0000 (13:55 -0500)] 
Fix invalid free in missing issuer test case error path

This variable is not initialized in this error path: it's only
initialized if gnutls_x509_crt_get_authority_info_access() succeeds.

Signed-off-by: Michael Catanzaro <mcatanzaro@gnome.org>
6 years agoFix typo in API docs
Michael Catanzaro [Fri, 7 Aug 2020 18:00:22 +0000 (13:00 -0500)] 
Fix typo in API docs

Signed-off-by: Michael Catanzaro <mcatanzaro@gnome.org>
6 years agoMerge branch 'sign-spurious-message' into 'master'
Daiki Ueno [Mon, 27 Jul 2020 10:37:11 +0000 (10:37 +0000)] 
Merge branch 'sign-spurious-message' into 'master'

pubkey: avoid spurious audit messages from _gnutls_pubkey_compatible_with_sig()

See merge request gnutls/gnutls!1301

6 years agopubkey: avoid spurious audit messages from _gnutls_pubkey_compatible_with_sig()
Petr Pavlu [Wed, 8 Jul 2020 08:12:30 +0000 (10:12 +0200)] 
pubkey: avoid spurious audit messages from _gnutls_pubkey_compatible_with_sig()

When checking in _gnutls_pubkey_compatible_with_sig() whether a public
key is compatible with a signature algorithm, run first
pubkey_supports_sig() before performing weaker checks that can accept
the given algorithm but with an audit-log warning. This avoids an issue
when a weaker check would log an audit message for some signature
algorithm that would then be determined as incompatible by the
pubkey_supports_sig() check anyway.

For instance, a GnuTLS server might have a certificate with a SECP384R1
public key and a client can report that it supports
ECDSA-SECP256R1-SHA256 and ECDSA-SECP384R1-SHA384. In such a case, the
GnuTLS server will eventually find that it must use
ECDSA-SECP384R1-SHA384 with this public key. However, the code would
first run _gnutls_pubkey_compatible_with_sig() to check if SECP384R1 is
compatible with ECDSA-SECP256R1-SHA256. The function would report the
audit warning "The hash size used in signature (32) is less than the
expected (48)" but then reject the signature algorithm in
pubkey_supports_sig() as incompatible because it has a different curve.
Since the algorithm gets rejected it is not necessary to inform about
its hash size difference in the audit log.

Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
6 years agoMerge branch 'tmp-dh-z' into 'master'
Daiki Ueno [Thu, 23 Jul 2020 04:43:24 +0000 (04:43 +0000)] 
Merge branch 'tmp-dh-z' into 'master'

nettle: check validity of (EC)DH shared secret before export

See merge request gnutls/gnutls!1299

6 years agoecdh: perform SP800-56A rev3 full pubkey validation on keygen
Daiki Ueno [Sat, 18 Jul 2020 06:26:48 +0000 (08:26 +0200)] 
ecdh: perform SP800-56A rev3 full pubkey validation on keygen

This implements full public key validation required in
SP800-56A rev3, section 5.6.2.3.3.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agodh: perform SP800-56A rev3 full pubkey validation on keygen
Daiki Ueno [Fri, 17 Jul 2020 15:47:06 +0000 (17:47 +0200)] 
dh: perform SP800-56A rev3 full pubkey validation on keygen

This implements full public key validation required in SP800-56A rev3,
section 5.6.2.3.1.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agodh-primes: make the FIPS approved check return Q value
Daiki Ueno [Fri, 17 Jul 2020 15:45:17 +0000 (17:45 +0200)] 
dh-primes: make the FIPS approved check return Q value

This is necessary for full public key validation in
SP800-56A (revision 3), section 5.6.2.3.1.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoecdh: check validity of P before export
Daiki Ueno [Fri, 10 Jul 2020 07:42:30 +0000 (09:42 +0200)] 
ecdh: check validity of P before export

SP800-56A rev3 section 5.7.1.2 step 2 mandates that the validity of
the calculated shared secret is verified before the data is returned
to the caller.  This patch adds the validation check.

Suggested by Stephan Mueller.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agodh: check validity of Z before export
Daiki Ueno [Fri, 10 Jul 2020 07:35:49 +0000 (09:35 +0200)] 
dh: check validity of Z before export

SP800-56A rev3 section 5.7.1.1 step 2 mandates that the validity of the
calculated shared secret is verified before the data is returned to the
caller.  This patch adds the validation check.

Suggested by Stephan Mueller.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoMerge branch 'tmp-doc-fixes' into 'master'
Dmitry Baryshkov [Sat, 4 Jul 2020 11:27:59 +0000 (11:27 +0000)] 
Merge branch 'tmp-doc-fixes' into 'master'

RELEASES.md: update for the 3.7.x releases

See merge request gnutls/gnutls!1283

6 years agoMerge branch 'tmp-pthread' into 'master'
Dmitry Baryshkov [Sat, 4 Jul 2020 11:27:14 +0000 (11:27 +0000)] 
Merge branch 'tmp-pthread' into 'master'

build: use $(LIBPTHREAD) rather than non-existent $(LTLIBPTHREAD)

See merge request gnutls/gnutls!1296

6 years agoMerge branch 'tmp-nettle-master' into 'master'
Dmitry Baryshkov [Sat, 4 Jul 2020 11:25:27 +0000 (11:25 +0000)] 
Merge branch 'tmp-nettle-master' into 'master'

.gitlab-ci: disable config.cache for nettle-master builds

See merge request gnutls/gnutls!1291

6 years agoMerge branch 'split-up-tests-s-o-sig-hash' into 'master'
Daiki Ueno [Fri, 3 Jul 2020 19:26:26 +0000 (19:26 +0000)] 
Merge branch 'split-up-tests-s-o-sig-hash' into 'master'

tests: split up system-override-sig-hash.sh

See merge request gnutls/gnutls!1298

6 years agotests: split up system-override-sig-hash.sh
Alexander Sosedkin [Fri, 3 Jul 2020 12:54:17 +0000 (14:54 +0200)] 
tests: split up system-override-sig-hash.sh

Split up system-override-sig-hash.sh
so that the errors won't get swallowed or conflated.
Also correct unused `srcdir` to `builddir`,
which I believe was meant to be set there.

Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
6 years agoMerge branch 'macos-connectx' into 'master'
Daiki Ueno [Thu, 2 Jul 2020 18:26:19 +0000 (18:26 +0000)] 
Merge branch 'macos-connectx' into 'master'

Detect the availability of connectx at runtime

See merge request gnutls/gnutls!1294

6 years agofix connectx not available on older macOS SDK
Steve Lhomme [Mon, 22 Jun 2020 07:09:05 +0000 (09:09 +0200)] 
fix connectx not available on older macOS SDK

Fixes this compilation error:
system/fastopen.c:134:9: error: 'connectx' is only available on macOS 10.11 or newer [-Werror,-Wunguarded-availability]
                ret = connectx(fd, &endpoints, SAE_ASSOCID_ANY, CONNECT_RESUME_ON_READ_WRITE | CONNECT_DATA_IDEMPOTENT, NULL, 0, NULL, NULL);
                      ^~~~~~~~
/Applications/Xcode9.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/socket.h:713:5: note: 'connectx' has been marked as being introduced in macOS 10.11 here, but the deployment target is macOS 10.7.0

The detection is the same as found in curl [1].

If HAVE_BUILTIN_AVAILABLE is not available we fallback to the code without
TCP_FASTOPEN_OSX.

The OS values match exactly the values found in
https://opensource.apple.com/source/xnu/xnu-4570.41.2/bsd/sys/socket.h

[1] https://github.com/curl/curl/commit/870d849d48a26b8eeb0d4bb1f4655367a4a191ca

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
6 years agoMerge branch 'tmp-safe-memcmp' into 'master'
Daiki Ueno [Mon, 29 Jun 2020 14:49:43 +0000 (14:49 +0000)] 
Merge branch 'tmp-safe-memcmp' into 'master'

safe_memcmp: remove in favor of gnutls_memcmp

Closes #1042

See merge request gnutls/gnutls!1297

6 years agobuild: use $(LIBPTHREAD) rather than non-existent $(LTLIBPTHREAD)
James Bottomley [Sun, 28 Jun 2020 19:33:09 +0000 (21:33 +0200)] 
build: use $(LIBPTHREAD) rather than non-existent $(LTLIBPTHREAD)

On a very recent openSUSE build, libgnutls is getting built without
libpthread. This caused a thread related error when trying to load a
pkcs11 module that uses threading. The reason is rather convoluted:
glibc actually controls all the pthread_ function calls, but it
returns success without doing anything unless -lpthread is in the link
list. What's happening is that gnutls_system_mutex_init() is being
called on _gnutls_pkcs11_mutex before library pthreading is
initialized, so the pthread_mutex_init ends up being a nop. Then, when
the pkcs11 module is loaded, pthreads get initialized and the call to
pthread_mutex_lock is real, but errors out on the uninitialized mutex.

The problem seems to be that nothing in the gnulib macros gnutls
relies on for threading support detection actually sets LTLIBPTHREAD,
they only set LIBPTHREAD. The fix is to use LIBPTHREAD in
lib/Makefile.in

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
6 years agosafe_memcmp: remove in favor of gnutls_memcmp
Daiki Ueno [Sun, 21 Jun 2020 14:03:54 +0000 (16:03 +0200)] 
safe_memcmp: remove in favor of gnutls_memcmp

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoMerge branch 'tmp-sp800-56ar3' into 'master'
Daiki Ueno [Mon, 29 Jun 2020 07:17:35 +0000 (07:17 +0000)] 
Merge branch 'tmp-sp800-56ar3' into 'master'

fips: tighten check on DH parameters according to SP800-56A (rev 3)

See merge request gnutls/gnutls!1295

6 years agodhe: check if DH params in SKE match the FIPS approved algorithms
Daiki Ueno [Fri, 26 Jun 2020 08:21:26 +0000 (10:21 +0200)] 
dhe: check if DH params in SKE match the FIPS approved algorithms

SP800-56A rev. 3 restricts the FIPS compliant clients to use only
approved DH parameters, defined in RFC 7919 and RFC 3526.  This adds a
check in the handling of ServerKeyExchange if DHE is negotiated.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agodh-primes: add MODP primes from RFC 3526
Daiki Ueno [Fri, 26 Jun 2020 07:43:02 +0000 (09:43 +0200)] 
dh-primes: add MODP primes from RFC 3526

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoMerge branch 'tmp-clear-session-ticket-keys' into 'master'
Daiki Ueno [Sun, 21 Jun 2020 08:16:43 +0000 (08:16 +0000)] 
Merge branch 'tmp-clear-session-ticket-keys' into 'master'

Wipe session ticket keys before releasing the session structure

See merge request gnutls/gnutls!1289

6 years agoMerge branch 'master' into 'master'
Daiki Ueno [Thu, 18 Jun 2020 07:05:48 +0000 (07:05 +0000)] 
Merge branch 'master' into 'master'

issues #1018- Modied the license to GPLv2.1+ to keep with LICENSE file.

See merge request gnutls/gnutls!1285

6 years agoMerge branch 'tmp-detect-python' into 'master'
Dmitry Baryshkov [Wed, 17 Jun 2020 17:43:28 +0000 (17:43 +0000)] 
Merge branch 'tmp-detect-python' into 'master'

Detect Python interpreter for tests instead of assuming "python"

Closes #1034

See merge request gnutls/gnutls!1292

6 years agoUpdate tlsfuzzer to get Python interpreter detection
Fiona Klute [Tue, 16 Jun 2020 19:23:14 +0000 (21:23 +0200)] 
Update tlsfuzzer to get Python interpreter detection

Tlsfuzzer also assumed the Python interpreter would be called
"python", this update is necessary to get a fixed version (see
https://github.com/tomato42/tlsfuzzer/pull/671).

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
6 years agoDetect Python interpreter instead of assuming "python"
Fiona Klute [Tue, 16 Jun 2020 18:48:44 +0000 (20:48 +0200)] 
Detect Python interpreter instead of assuming "python"

This makes the extended test suite work one Debian(-ish) systems
without Python 2, where the Python 3 interpreter is called "python3".

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
6 years agoMerge branch 'tmp-mark-gost94-as-broken' into 'master'
Dmitry Baryshkov [Tue, 16 Jun 2020 00:35:12 +0000 (00:35 +0000)] 
Merge branch 'tmp-mark-gost94-as-broken' into 'master'

GOSTR341194, RIPEMD160: mark as insecure for digital signatures

See merge request gnutls/gnutls!1175

6 years agoMerge branch 'master' into 'tmp-mark-gost94-as-broken'
Dmitry Baryshkov [Mon, 15 Jun 2020 20:55:39 +0000 (20:55 +0000)] 
Merge branch 'master' into 'tmp-mark-gost94-as-broken'

# Conflicts:
#   lib/crypto-selftests-pk.c

6 years agoMerge branch 'tmp-enum' into 'master'
Dmitry Baryshkov [Mon, 15 Jun 2020 09:26:49 +0000 (09:26 +0000)] 
Merge branch 'tmp-enum' into 'master'

build: minor fixes

See merge request gnutls/gnutls!1287

6 years ago.gitlab-ci.yml: bump configure cache version
Daiki Ueno [Fri, 12 Jun 2020 14:50:14 +0000 (16:50 +0200)] 
.gitlab-ci.yml: bump configure cache version

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years ago.gitignore: ignore more files
Daiki Ueno [Fri, 12 Jun 2020 09:34:38 +0000 (11:34 +0200)] 
.gitignore: ignore more files

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agobuild: avoid -Wenum-conversion warnings with GCC 10
Daiki Ueno [Fri, 12 Jun 2020 09:32:58 +0000 (11:32 +0200)] 
build: avoid -Wenum-conversion warnings with GCC 10

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoMerge branch 'better_SSL3.0_tests' into 'master'
Dmitry Baryshkov [Sun, 14 Jun 2020 21:26:31 +0000 (21:26 +0000)] 
Merge branch 'better_SSL3.0_tests' into 'master'

refine tests for ancient servers which support both SSL 3.0 and TLS 1.0, but both only with %NO_EXTENSIONS

See merge request gnutls/gnutls!1251

6 years agoMerge branch 'tmp-skip-datefudge' into 'master'
Dmitry Baryshkov [Sun, 14 Jun 2020 21:08:55 +0000 (21:08 +0000)] 
Merge branch 'tmp-skip-datefudge' into 'master'

tests: improve datefudge usage

Closes #1021

See merge request gnutls/gnutls!1288

6 years agoMerge branch 'tmp-gettext' into 'master'
Dmitry Baryshkov [Sun, 14 Jun 2020 21:05:51 +0000 (21:05 +0000)] 
Merge branch 'tmp-gettext' into 'master'

configure.ac: prefer the latest version of build infrastructure

See merge request gnutls/gnutls!1284

6 years ago.gitlab-ci: disable config.cache for nettle-master builds
Dmitry Baryshkov [Sun, 14 Jun 2020 20:31:27 +0000 (23:31 +0300)] 
.gitlab-ci: disable config.cache for nettle-master builds

Disable usage of config.cache for nettle-master builds. Such
config.cache files can easily become stale, thus resulting in build
failures.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
6 years agoWipe session ticket keys before releasing the session structure
Fiona Klute [Sun, 14 Jun 2020 10:52:46 +0000 (12:52 +0200)] 
Wipe session ticket keys before releasing the session structure

This includes both a copy of the master key and one or two derived
keys, all of which could be used to decrypt session tickets if
stolen. The derived keys could only be used for tickets issued within
a certain time frame (by default several hours).

The documentation for gnutls_session_ticket_enable_server() already
states that the master key should be wiped before releasing it, and
the same should apply to internal copies.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
6 years agotests/cert-test/invalid-sig: use datefudge to test expired certs
Daiki Ueno [Tue, 9 Jun 2020 08:44:57 +0000 (10:44 +0200)] 
tests/cert-test/invalid-sig: use datefudge to test expired certs

Suggested by Andreas Metzler in:
https://gitlab.com/gnutls/gnutls/-/issues/1021

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agotests: check_for_datefudge: don't exit the test programs
Daiki Ueno [Tue, 9 Jun 2020 08:41:18 +0000 (10:41 +0200)] 
tests: check_for_datefudge: don't exit the test programs

This makes check_for_datefudge not to immediately exit the program,
but to return non-zero to allow the tests by themselves to control the
behavior when "datefudge" is not found.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoMerge branch 'nettle_so' into 'master'
Anderson Sasaki [Tue, 9 Jun 2020 16:04:57 +0000 (16:04 +0000)] 
Merge branch 'nettle_so' into 'master'

configure: improve nettle, gmp, and hogweed soname detection

See merge request gnutls/gnutls!1286

6 years agoconfigure: improve nettle, gmp, and hogweed soname detection
Vitezslav Cizek [Tue, 9 Jun 2020 11:54:04 +0000 (13:54 +0200)] 
configure: improve nettle, gmp, and hogweed soname detection

Some linkers might optimize away the libraries passed on the
command line if they aren't actually needed, such as gnu ld with
--as-needed.
The ldd output then won't list the shared libraries and the
detection will fail.
Make sure nettle and others are really used.

Signed-off-by: Vitezslav Cizek <vcizek@suse.com>
6 years agoModied the license to GPLv2.1+ to keep with LICENSE file.
Lei Maohui [Mon, 8 Jun 2020 07:15:07 +0000 (16:15 +0900)] 
Modied the license to GPLv2.1+ to keep with LICENSE file.

Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
6 years agoconfigure.ac: prefer the latest version of build infrastructure
Daiki Ueno [Mon, 8 Jun 2020 04:45:24 +0000 (06:45 +0200)] 
configure.ac: prefer the latest version of build infrastructure

AM_GNU_GETTEXT_REQUIRE_VERSION tells autopoint to copy the latest
possible build infrastructure installed on the system, rather than the
fixed version from the archive.dir.tar.xz.  This makes the
bootstrapping slightly faster and allows us not to stick with the
ancient gettext version.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoMerge branch 'fix-vista-ci' into 'master'
Dmitry Baryshkov [Sun, 7 Jun 2020 17:41:21 +0000 (17:41 +0000)] 
Merge branch 'fix-vista-ci' into 'master'

Fix Vista CI and add a Vista DLL target

See merge request gnutls/gnutls!1279

6 years agoCI: fix typo in the Vista target
Steve Lhomme [Sun, 7 Jun 2020 17:41:21 +0000 (17:41 +0000)] 
CI: fix typo in the Vista target

This resulted in the MinGW64.Vista+ target doing the same thing as the MinGW64
target.

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
6 years agoMerge branch 'tmp-iov-memleak' into 'master'
Dmitry Baryshkov [Sun, 7 Jun 2020 14:34:43 +0000 (14:34 +0000)] 
Merge branch 'tmp-iov-memleak' into 'master'

crypto-api: always allocate memory when serializing iovec_t

Closes #1017

See merge request gnutls/gnutls!1278

6 years agoRELEASES.md: move the release steps to devel/ [ci skip]
Daiki Ueno [Sun, 7 Jun 2020 13:46:51 +0000 (15:46 +0200)] 
RELEASES.md: move the release steps to devel/ [ci skip]

As the information is only useful to developers, having it under
devel/ rather than in the tarball is more releavant.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoRELEASES.md: mention 3.7.x releases
Daiki Ueno [Sun, 7 Jun 2020 13:45:13 +0000 (15:45 +0200)] 
RELEASES.md: mention 3.7.x releases

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoRELEASES.md: fix typo in scp command line
Daiki Ueno [Sun, 7 Jun 2020 13:41:59 +0000 (15:41 +0200)] 
RELEASES.md: fix typo in scp command line

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoNEWS: add missing API modifications to 3.6.14 entry
Daiki Ueno [Sun, 7 Jun 2020 13:39:39 +0000 (15:39 +0200)] 
NEWS: add missing API modifications to 3.6.14 entry

Reported by Andreas Metzler in:
https://lists.gnupg.org/pipermail/gnutls-help/2020-June/004650.html

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoMerge branch 'gost-split-6' into 'master'
Dmitry Baryshkov [Sat, 6 Jun 2020 23:56:28 +0000 (23:56 +0000)] 
Merge branch 'gost-split-6' into 'master'

MAGMA/KUZNYECHIK CTR-ACPKM and CMAC support

See merge request gnutls/gnutls!1161

6 years agoMerge branch 'merge-mandatory-libs' into 'master'
Dmitry Baryshkov [Sat, 6 Jun 2020 22:03:14 +0000 (22:03 +0000)] 
Merge branch 'merge-mandatory-libs' into 'master'

Merge the extra libraries to link dynamically in GNUTLS_LIBS_PRIVATE

Closes #1020

See merge request gnutls/gnutls!1280

6 years agocrypto-selftest: add test vectors for MAGMA/KUZNYECHIK-CTR-ACPKM
Dmitry Eremin-Solenikov [Wed, 8 Jan 2020 22:42:22 +0000 (01:42 +0300)] 
crypto-selftest: add test vectors for MAGMA/KUZNYECHIK-CTR-ACPKM

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agocrypto-api: add _gnutls_cipher_set_key wrapper()
Dmitry Eremin-Solenikov [Wed, 8 Jan 2020 22:11:50 +0000 (01:11 +0300)] 
crypto-api: add _gnutls_cipher_set_key wrapper()

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agocipher/mac: enhance handlers with setkey callback
Dmitry Eremin-Solenikov [Thu, 17 Oct 2019 13:38:40 +0000 (16:38 +0300)] 
cipher/mac: enhance handlers with setkey callback

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoselftests: add test vectors for MAGMA/KUZNYECHIK-OMAC
Dmitry Eremin-Solenikov [Wed, 8 Jan 2020 21:58:50 +0000 (00:58 +0300)] 
selftests: add test vectors for MAGMA/KUZNYECHIK-OMAC

Add test vectors for newly added MAC algorithms.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agolib: add Magma/Kuznyechik OMAC support
Dmitry Eremin-Solenikov [Fri, 21 Sep 2018 19:11:51 +0000 (22:11 +0300)] 
lib: add Magma/Kuznyechik OMAC support

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agolib: add Magma/Kuznyechik ciphers support
Dmitry Eremin-Solenikov [Fri, 21 Sep 2018 19:11:14 +0000 (22:11 +0300)] 
lib: add Magma/Kuznyechik ciphers support

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agonettle/gost: add ACPKM rekeying code
Dmitry Eremin-Solenikov [Fri, 21 Sep 2018 19:10:30 +0000 (22:10 +0300)] 
nettle/gost: add ACPKM rekeying code

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agonettle/gost: add CMAC-64/Magma/Kuznyechik code
Dmitry Eremin-Solenikov [Fri, 21 Sep 2018 19:10:03 +0000 (22:10 +0300)] 
nettle/gost: add CMAC-64/Magma/Kuznyechik code

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agonettle/gost: add Kuznyechik code
Dmitry Eremin-Solenikov [Fri, 21 Sep 2018 19:09:36 +0000 (22:09 +0300)] 
nettle/gost: add Kuznyechik code

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agonettle/gost: add Magma code
Dmitry Eremin-Solenikov [Fri, 21 Sep 2018 19:09:11 +0000 (22:09 +0300)] 
nettle/gost: add Magma code

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agonettle/gost: export gost28147_decrypt_simple for magma cipher
Dmitry Eremin-Solenikov [Fri, 21 Sep 2018 19:08:44 +0000 (22:08 +0300)] 
nettle/gost: export gost28147_decrypt_simple for magma cipher

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
6 years agoMerge the extra libraries to link dynamically in GNUTLS_LIBS_PRIVATE
Steve Lhomme [Sat, 6 Jun 2020 12:05:16 +0000 (14:05 +0200)] 
Merge the extra libraries to link dynamically in GNUTLS_LIBS_PRIVATE

This should fix #1020 where bcrypt is missing from thirdparty_libadd.

Ultimately it would be good to add libraries that always need to be linked in
one variable that is shared between the Makefile and the pkg-config file.

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
6 years agocrypto-api: always allocate memory when serializing iovec_t 1278/head
Daiki Ueno [Fri, 5 Jun 2020 14:26:33 +0000 (16:26 +0200)] 
crypto-api: always allocate memory when serializing iovec_t

The AEAD iov interface falls back to serializing the input buffers if
the low-level cipher doesn't support scatter/gather encryption.
However, there was a bug in the functions used for the serialization,
which causes memory leaks under a certain condition (i.e. the number
of input buffers is 1).

This patch makes the logic of the functions simpler, by removing a
micro-optimization that tries to minimize the number of calls to
malloc/free.

The original problem was reported by Marius Steffen in:
https://bugzilla.samba.org/show_bug.cgi?id=14399
and the cause was investigated by Alexander Haase in:
https://gitlab.com/gnutls/gnutls/-/merge_requests/1277

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoMerge branch 'master' into 'master'
Daiki Ueno [Fri, 5 Jun 2020 16:38:58 +0000 (16:38 +0000)] 
Merge branch 'master' into 'master'

tests: updated tlsfuzzer tests to latest version

See merge request gnutls/gnutls!1276

6 years agoMerge branch 'tmp-aead-init-leak' into 'master'
Daiki Ueno [Fri, 5 Jun 2020 16:38:35 +0000 (16:38 +0000)] 
Merge branch 'tmp-aead-init-leak' into 'master'

gnutls_aead_cipher_init: fix potential memleak

Closes #1010

See merge request gnutls/gnutls!1274

6 years agoMerge branch 'aia' into 'master'
Sahana Prasad [Fri, 5 Jun 2020 11:45:32 +0000 (11:45 +0000)] 
Merge branch 'aia' into 'master'

AIA callback to retrieve missing chain certificates

See merge request gnutls/gnutls!1262

6 years agotests: updated tlsfuzzer tests to latest version
KrenzelokFrantisek [Thu, 4 Jun 2020 14:59:33 +0000 (16:59 +0200)] 
tests: updated tlsfuzzer tests to latest version
excluded some tests from test-certificate-malformed.py

Signed-off-by: KrenzelokFrantisek <krenzelok.frantisek@gmail.com>
6 years agoMerge branch 'tmp-autogen-int' into 'master'
Daiki Ueno [Thu, 4 Jun 2020 11:47:25 +0000 (11:47 +0000)] 
Merge branch 'tmp-autogen-int' into 'master'

serv: omit upper bound of --maxearlydata option definition

See merge request gnutls/gnutls!1273

6 years agodevel/libgnutls-latest-x86_64.abi, doc, NEWS, and manpage updates
Sahana Prasad [Wed, 27 May 2020 10:42:24 +0000 (12:42 +0200)] 
devel/libgnutls-latest-x86_64.abi, doc, NEWS, and manpage updates

Signed-off-by: Sahana Prasad <sahana@redhat.com>
6 years agotests: Adds new tests missingissuer and missingissuer_aia
Sahana Prasad [Fri, 22 May 2020 13:11:32 +0000 (15:11 +0200)] 
tests: Adds new tests missingissuer and missingissuer_aia

Signed-off-by: Sahana Prasad <sahana@redhat.com>
6 years agoImplements a callback function gnutls_x509_trust_list_set_getissuer_function()
Sahana Prasad [Fri, 22 May 2020 07:42:47 +0000 (09:42 +0200)] 
Implements a callback function gnutls_x509_trust_list_set_getissuer_function()

Signed-off-by: Sahana Prasad <sahana@redhat.com>
6 years agoMerge branch 'tmp-release-3.6.14' into 'master' 3.6.14
Daiki Ueno [Wed, 3 Jun 2020 12:52:17 +0000 (12:52 +0000)] 
Merge branch 'tmp-release-3.6.14' into 'master'

Release 3.6.14 [ci skip]

See merge request gnutls/gnutls!1272

6 years agoRelease 3.6.14 [ci skip]
Daiki Ueno [Mon, 1 Jun 2020 12:18:03 +0000 (14:18 +0200)] 
Release 3.6.14 [ci skip]

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoMerge branch 'tmp-totp-init' into 'master'
Daiki Ueno [Wed, 3 Jun 2020 11:49:18 +0000 (11:49 +0000)] 
Merge branch 'tmp-totp-init' into 'master'

stek: differentiate initial state from valid time window of TOTP

See merge request gnutls/gnutls!1275

6 years agovalgrind: check if session ticket key is used without initialization
Daiki Ueno [Tue, 2 Jun 2020 19:45:17 +0000 (21:45 +0200)] 
valgrind: check if session ticket key is used without initialization

This adds a valgrind client request for
session->key.session_ticket_key to make sure that it is not used
without initialization.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agostek: differentiate initial state from valid time window of TOTP
Daiki Ueno [Tue, 2 Jun 2020 18:53:11 +0000 (20:53 +0200)] 
stek: differentiate initial state from valid time window of TOTP

There was a confusion in the TOTP implementation in stek.c.  When the
mechanism is initialized at the first time, it records the timestamp
but doesn't initialize the key.  This removes the timestamp recording
at the initialization phase, so the key is properly set later.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agognutls_cipher_init: fix potential memleak
Daiki Ueno [Tue, 2 Jun 2020 03:38:28 +0000 (05:38 +0200)] 
gnutls_cipher_init: fix potential memleak

Upon failure this function returns without freeing memory allocated
internally.  This makes sure that it is released and do not touch the
output handle argument.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agognutls_aead_cipher_init: fix potential memleak
Daiki Ueno [Tue, 2 Jun 2020 03:34:29 +0000 (05:34 +0200)] 
gnutls_aead_cipher_init: fix potential memleak

When _gnutls_aead_cipher_init() fails, the function returns without
freeing the allocted handle.  This was once fixed in commit
502be130493e8ce802cdf60fffdbb5f1885352a5 but regressed after a code
reorganization in commit 2eef509ce5f2d250f8dcaeffa46444dd2b694e91.

Reported by Miroslav Lichvar.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoserv: omit upper bound of --maxearlydata option definition
Daiki Ueno [Mon, 1 Jun 2020 15:23:59 +0000 (17:23 +0200)] 
serv: omit upper bound of --maxearlydata option definition

It turned out that AutoGen treats numbers that exceed INT_MAX in a
platform dependent way.  In this case, 4294967295 (UINT_MAX) is
treated as is on 64-bit platforms, while it is interpreted as "-1" on
32-bit platforms.  This causes a problem when the program
documentation is compiled under multilib environment.

Reported by Ivan Molodetskikh in:
https://bugzilla.redhat.com/show_bug.cgi?id=1841844
and the cause was identified by Anderson Toshiyuki Sasaki.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoMerge branch 'tmp-known-certs' into 'master'
Daiki Ueno [Sun, 31 May 2020 16:15:57 +0000 (16:15 +0000)] 
Merge branch 'tmp-known-certs' into 'master'

_gnutls_pkcs11_verify_crt_status: check validity against system cert

See merge request gnutls/gnutls!1271

6 years agotests: add test case for certificate chain superseding 1271/head
Daiki Ueno [Sun, 31 May 2020 12:28:48 +0000 (14:28 +0200)] 
tests: add test case for certificate chain superseding

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agox509: trigger fallback verification path when cert is expired
Daiki Ueno [Sun, 31 May 2020 11:59:53 +0000 (13:59 +0200)] 
x509: trigger fallback verification path when cert is expired

gnutls_x509_trust_list_verify_crt2 use the macro SIGNER_OLD_OR_UNKNOWN
to trigger the fallback verification path if the signer of the last
certificate is not in the trust store.  Previously, it doesn't take
into account of the condition where the certificate is expired.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years ago_gnutls_pkcs11_verify_crt_status: check validity against system cert
Daiki Ueno [Sun, 31 May 2020 10:39:14 +0000 (12:39 +0200)] 
_gnutls_pkcs11_verify_crt_status: check validity against system cert

To verify a certificate chain, this function replaces known
certificates with the ones in the system trust store if possible.

However, if it is found, the function checks the validity of the
original certificate rather than the certificate found in the trust
store.  That reveals a problem in a scenario that (1) a certificate is
signed by multiple issuers and (2) one of the issuers' certificate has
expired and included in the input chain.

This patch makes it a little robuster by actually retrieving the
certificate from the trust store and perform check against it.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agoMerge branch 'nowincrypt' into 'master'
Dmitry Baryshkov [Sun, 31 May 2020 12:41:15 +0000 (12:41 +0000)] 
Merge branch 'nowincrypt' into 'master'

use bcrypt for the windows random generator instead of wincrypt

See merge request gnutls/gnutls!1255

6 years agoMerge branch 'fix-valgrind' into 'master'
Dmitry Baryshkov [Sun, 31 May 2020 12:32:30 +0000 (12:32 +0000)] 
Merge branch 'fix-valgrind' into 'master'

configure.ac: add -fno-builtin-strcmp if valgrind is enabled

Closes #944

See merge request gnutls/gnutls!1264

6 years agoMerge branch 'add-aes192-gcm' into 'master'
Dmitry Baryshkov [Sat, 30 May 2020 12:53:20 +0000 (12:53 +0000)] 
Merge branch 'add-aes192-gcm' into 'master'

lib: add support for AES-192-GCM

See merge request gnutls/gnutls!1267

6 years agoMerge branch 'tmp-macosx-vers' into 'master'
Dmitry Baryshkov [Sat, 30 May 2020 12:51:01 +0000 (12:51 +0000)] 
Merge branch 'tmp-macosx-vers' into 'master'

.travis.yml: use several different OSX versions

See merge request gnutls/gnutls!1269

6 years agoMerge branch 'tmp-fix-macosx-link' into 'master'
Dmitry Baryshkov [Sat, 30 May 2020 12:50:38 +0000 (12:50 +0000)] 
Merge branch 'tmp-fix-macosx-link' into 'master'

configure: check that -no_weak_links works with FD_SET

Closes #966

See merge request gnutls/gnutls!1266

6 years agodevel: provide external git diff driver for *.abi files [ci skip]
Daiki Ueno [Mon, 16 Mar 2020 16:16:08 +0000 (17:16 +0100)] 
devel: provide external git diff driver for *.abi files [ci skip]

This adds an external diff driver for *.abi files, that shows only
interesting changes in those files.  This would be useful when adding
a new API.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
6 years agoMerge branch 'tmp-fileio' into 'master'
Daiki Ueno [Sat, 30 May 2020 10:22:18 +0000 (10:22 +0000)] 
Merge branch 'tmp-fileio' into 'master'

lib: improve external file loading

See merge request gnutls/gnutls!1261

6 years agobuild: write "FILE *fp" instead of "FILE *fd"
Daiki Ueno [Sat, 30 May 2020 09:06:57 +0000 (11:06 +0200)] 
build: write "FILE *fp" instead of "FILE *fd"

This makes it clear that "fd" is not a file descriptor but a FILE
pointer.  Suggested by Tim Rühsen.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agognutls_load_file: document limitation regarding partial failure
Daiki Ueno [Mon, 25 May 2020 13:33:49 +0000 (15:33 +0200)] 
gnutls_load_file: document limitation regarding partial failure

Signed-off-by: Daiki Ueno <ueno@gnu.org>
6 years agocert-cred: clear private key data loaded from file
Daiki Ueno [Mon, 25 May 2020 09:21:38 +0000 (11:21 +0200)] 
cert-cred: clear private key data loaded from file

This makes use of the RF_SENSITIVE flag newly added to read_file
function when reading potentially senstive information from a file.

Signed-off-by: Daiki Ueno <ueno@gnu.org>