]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
4 years agoMerge branch 'wip/dueno/minor' into 'master'
Daiki Ueno [Tue, 3 May 2022 07:52:06 +0000 (07:52 +0000)] 
Merge branch 'wip/dueno/minor' into 'master'

.github/workflows/macos.yml: pull in gtk-doc

See merge request gnutls/gnutls!1580

4 years agom4: update from autoconf-archive
Daiki Ueno [Mon, 2 May 2022 05:41:12 +0000 (07:41 +0200)] 
m4: update from autoconf-archive

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years ago.github/workflows/macos.yml: pull in gtk-doc
Daiki Ueno [Sun, 17 Apr 2022 08:56:35 +0000 (10:56 +0200)] 
.github/workflows/macos.yml: pull in gtk-doc

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoMerge branch 'wip/dueno/ci-remove-valgrind' into 'master'
Daiki Ueno [Sun, 1 May 2022 07:44:44 +0000 (07:44 +0000)] 
Merge branch 'wip/dueno/ci-remove-valgrind' into 'master'

.gitlab-ci.yml: replace valgrind checks with ASan

See merge request gnutls/gnutls!1467

4 years agoMerge branch 'zfridric_devel' into 'master'
Zoltán Fridrich [Thu, 28 Apr 2022 14:50:11 +0000 (14:50 +0000)] 
Merge branch 'zfridric_devel' into 'master'

gnutls-cli, gnutls-serv: print supported channel binding

Closes #1350

See merge request gnutls/gnutls!1578

4 years agognutls-cli, gnutls-serv: print supported channel binding
Zoltan Fridrich [Thu, 28 Apr 2022 10:17:16 +0000 (12:17 +0200)] 
gnutls-cli, gnutls-serv: print supported channel binding

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
4 years ago.gitlab-ci.yml: replace valgrind checks with ASan
Daiki Ueno [Sat, 4 Sep 2021 05:16:18 +0000 (07:16 +0200)] 
.gitlab-ci.yml: replace valgrind checks with ASan

Running the full test suite under valgrind wastes a lot of time and
may cause intermittent failures due to timeout.  We have them mainly
for VALGRIND_MAKE_MEM_UNDEFINED client request, though the ASan tests
now cover the equivalent after
f23c3a6cba43706a6ebb3f9b0018cd658dcc0a72.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoMerge branch 'zfridric_devel' into 'master'
Zoltán Fridrich [Tue, 26 Apr 2022 15:43:52 +0000 (15:43 +0000)] 
Merge branch 'zfridric_devel' into 'master'

Use packit to automate fedora upstream release

See merge request gnutls/gnutls!1575

4 years agoUse packit to automate fedora upstream release
Zoltan Fridrich [Thu, 14 Apr 2022 09:29:26 +0000 (11:29 +0200)] 
Use packit to automate fedora upstream release

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
4 years agoMerge branch 'set-mbuffer-type-on-linearize' into 'master'
Daiki Ueno [Mon, 25 Apr 2022 12:35:14 +0000 (12:35 +0000)] 
Merge branch 'set-mbuffer-type-on-linearize' into 'master'

Preserve mbuffer type when linearized

Closes #1319

See merge request gnutls/gnutls!1577

4 years agoPreserve mbuffer type when linearized
Tatsuhiro Tsujikawa [Sun, 24 Apr 2022 08:03:18 +0000 (17:03 +0900)] 
Preserve mbuffer type when linearized

Signed-off-by: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
4 years agoMerge branch 'master' into 'master'
Daiki Ueno [Thu, 21 Apr 2022 05:52:36 +0000 (05:52 +0000)] 
Merge branch 'master' into 'master'

Fix for #1132

Closes #1132

See merge request gnutls/gnutls!1576

4 years agoFix for #1132
Brian Wickman [Thu, 21 Apr 2022 05:52:36 +0000 (05:52 +0000)] 
Fix for #1132

4 years agoMerge branch 'wip/dueno/minor' into 'master'
Daiki Ueno [Sun, 17 Apr 2022 06:56:54 +0000 (06:56 +0000)] 
Merge branch 'wip/dueno/minor' into 'master'

cligen: change how Python modules are included in the distribution

See merge request gnutls/gnutls!1571

4 years ago.gitignore: ignore files generated by asn1Parser
Daiki Ueno [Mon, 11 Apr 2022 12:00:16 +0000 (14:00 +0200)] 
.gitignore: ignore files generated by asn1Parser

These files are no longer maintained in the repository, after commit
16061937.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agocligen: update git submodule
Daiki Ueno [Fri, 8 Apr 2022 08:23:51 +0000 (10:23 +0200)] 
cligen: update git submodule

This also reverts commit fd0e28a3 and changes how the cligen python
files are included in the distribution.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoMerge branch 'config' into 'master'
František Krenželok [Wed, 13 Apr 2022 09:38:30 +0000 (09:38 +0000)] 
Merge branch 'config' into 'master'

system config disable KTLS

See merge request gnutls/gnutls!1559

4 years agoMerge branch 'zfridric_devel' into 'master'
Zoltán Fridrich [Tue, 12 Apr 2022 16:17:42 +0000 (16:17 +0000)] 
Merge branch 'zfridric_devel' into 'master'

Add zeroization of some critical security parameters

See merge request gnutls/gnutls!1573

4 years agoMerge branch 'zfridric_devel3' into 'master'
Zoltán Fridrich [Tue, 12 Apr 2022 15:49:12 +0000 (15:49 +0000)] 
Merge branch 'zfridric_devel3' into 'master'

Small fips-test refactoring

See merge request gnutls/gnutls!1574

4 years agoSmall fips-test refactoring
Zoltan Fridrich [Tue, 12 Apr 2022 14:34:52 +0000 (16:34 +0200)] 
Small fips-test refactoring

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
4 years agoAdd zeroization of some critical security parameters
Zoltan Fridrich [Mon, 11 Apr 2022 14:04:38 +0000 (16:04 +0200)] 
Add zeroization of some critical security parameters
to comply with FIPS-140-3 requirements

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
4 years agoMerge branch 'tmp-2022-mixed-fixes' into 'master'
Zoltán Fridrich [Tue, 12 Apr 2022 11:58:27 +0000 (11:58 +0000)] 
Merge branch 'tmp-2022-mixed-fixes' into 'master'

Misc fixups for 3.7.4 release

See merge request gnutls/gnutls!1572

4 years agoDocument C++ soname bump in NEWS.
Andreas Metzler [Sun, 10 Apr 2022 11:22:22 +0000 (13:22 +0200)] 
Document C++ soname bump in NEWS.

Signed-off-by: Andreas Metzler <ametzler@bebt.de>
4 years agoAdd missing gtk-doc for GNUTLS_COMP_BROTLI/ZSTD.
Andreas Metzler [Wed, 30 Mar 2022 16:26:36 +0000 (18:26 +0200)] 
Add missing gtk-doc for GNUTLS_COMP_BROTLI/ZSTD.

Signed-off-by: Andreas Metzler <ametzler@bebt.de>
4 years agoAdd missing copyright header
Andreas Metzler [Wed, 30 Mar 2022 16:18:12 +0000 (18:18 +0200)] 
Add missing copyright header

Signed-off-by: Andreas Metzler <ametzler@bebt.de>
4 years agoMerge branch 'zfridric_devel' into 'master'
Zoltán Fridrich [Mon, 11 Apr 2022 08:38:36 +0000 (08:38 +0000)] 
Merge branch 'zfridric_devel' into 'master'

Add missing FIPS service indicator transitions

Closes #1352

See merge request gnutls/gnutls!1569

4 years agoAdd missing FIPS service indicator transitions
Zoltan Fridrich [Tue, 5 Apr 2022 14:28:41 +0000 (16:28 +0200)] 
Add missing FIPS service indicator transitions

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
4 years agoMerge branch 'zfridric_devel3' into 'master'
Zoltán Fridrich [Thu, 7 Apr 2022 14:08:58 +0000 (14:08 +0000)] 
Merge branch 'zfridric_devel3' into 'master'

Remove 3DES from FIPS approved algorithms

Closes #1353

See merge request gnutls/gnutls!1570

4 years agoRemove 3DES from FIPS approved algorithms.
Zoltan Fridrich [Wed, 6 Apr 2022 13:33:32 +0000 (15:33 +0200)] 
Remove 3DES from FIPS approved algorithms.
According to the section 2 of SP800-131A Rev.2, 3DES algorithm
will be disallowed for encryption after December 31, 2023:
https://csrc.nist.gov/publications/detail/sp/800-131a/rev-2/final

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
4 years agoMerge branch 'zfridric_devel' into 'master'
Zoltán Fridrich [Tue, 5 Apr 2022 12:24:49 +0000 (12:24 +0000)] 
Merge branch 'zfridric_devel' into 'master'

Mark HKDF and AES-GCM as approved when used in TLS

Closes #1311

See merge request gnutls/gnutls!1568

4 years agoMark HKDF and AES-GCM as approved when used in TLS
Zoltan Fridrich [Fri, 1 Apr 2022 10:34:12 +0000 (12:34 +0200)] 
Mark HKDF and AES-GCM as approved when used in TLS

Co-authored-by: Pedro Monreal <pmgdeb@gmail.com>
Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
4 years agoMerge branch 'wip/dueno/minor' into 'master'
Daiki Ueno [Tue, 5 Apr 2022 10:08:04 +0000 (10:08 +0000)] 
Merge branch 'wip/dueno/minor' into 'master'

build: minor fixes

See merge request gnutls/gnutls!1566

4 years agobootstrap.conf: use install-sh to copy cligen files
Daiki Ueno [Thu, 31 Mar 2022 13:50:51 +0000 (15:50 +0200)] 
bootstrap.conf: use install-sh to copy cligen files

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agolib/{gnutls,pkix}_asn1_tab.c: remove autogenerated files
Daiki Ueno [Sat, 19 Mar 2022 09:01:09 +0000 (10:01 +0100)] 
lib/{gnutls,pkix}_asn1_tab.c: remove autogenerated files

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agodevel/README-ci.freebsd.md: stop mentioning autogen
Daiki Ueno [Sat, 19 Mar 2022 09:00:08 +0000 (10:00 +0100)] 
devel/README-ci.freebsd.md: stop mentioning autogen

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years ago.github/workflows/macos.yml: stop installing autogen
Daiki Ueno [Sat, 19 Mar 2022 08:59:58 +0000 (09:59 +0100)] 
.github/workflows/macos.yml: stop installing autogen

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoconfigure.ac: always assume GTK_DOC_CHECK macro
Daiki Ueno [Sat, 19 Mar 2022 08:53:54 +0000 (09:53 +0100)] 
configure.ac: always assume GTK_DOC_CHECK macro

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoMerge branch 'wip/dueno/fipshmac-followup' into 'master'
Daiki Ueno [Fri, 1 Apr 2022 06:11:45 +0000 (06:11 +0000)] 
Merge branch 'wip/dueno/fipshmac-followup' into 'master'

fips: simplify library integrity checking

See merge request gnutls/gnutls!1565

4 years agoMerge branch 'zfridric_devel3' into 'master'
Zoltán Fridrich [Thu, 31 Mar 2022 13:52:30 +0000 (13:52 +0000)] 
Merge branch 'zfridric_devel3' into 'master'

Increase length limit of PKCS#12 passwords

Closes #1349

See merge request gnutls/gnutls!1564

4 years agofips: simplify library integrity checking
Daiki Ueno [Thu, 31 Mar 2022 12:28:32 +0000 (14:28 +0200)] 
fips: simplify library integrity checking

This removes code duplication by grouping the path and hmac fields in
hmac_file structure.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoIncrease length limit of PKCS#12 passwords
Zoltan Fridrich [Thu, 31 Mar 2022 08:13:06 +0000 (10:13 +0200)] 
Increase length limit of PKCS#12 passwords

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
4 years agoMerge branch 'zfridric_devel' into 'master'
Zoltán Fridrich [Thu, 31 Mar 2022 10:54:40 +0000 (10:54 +0000)] 
Merge branch 'zfridric_devel' into 'master'

Consolidate FIPS .hmac files

Closes #1338

See merge request gnutls/gnutls!1562

4 years agoMerge branch 'fix-find-pkcs11-keys' into 'master'
Daiki Ueno [Thu, 31 Mar 2022 08:59:53 +0000 (08:59 +0000)] 
Merge branch 'fix-find-pkcs11-keys' into 'master'

Fix matching of last key of a pkcs#11 token

See merge request gnutls/gnutls!1560

4 years agoktls config documentation
Frantisek Krenzelok [Fri, 25 Mar 2022 10:31:05 +0000 (11:31 +0100)] 
ktls config documentation

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
4 years agoFix off-by one exit condition in pkcs#11 priv keys lookup
Benjamin Herrenschmidt [Wed, 30 Mar 2022 21:57:07 +0000 (08:57 +1100)] 
Fix off-by one exit condition in pkcs#11 priv keys lookup

In function find_privkeys(), the list-> array is allocated to be of size
lists->key_ids_size. "current" is the index where the next found key will
be written (starts at 0).

The current exit condition is thus incorrect:

if (current > list->key_ids_size)
break;

This will allow "current" to be equal to list->key_ids_size which will
potentially cause an overflow if more keys are returned by the loop than
 was originally found when calculating that size.

This is very unlikely, but incorrect nonetheless.

Fix this by using the more classic construct of testing for the array bound
in the loop exit condition, as suggested by Daiki Ueno.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
4 years agoFix matching of last key of a pkcs#11 token
Benjamin Herrenschmidt [Mon, 21 Mar 2022 02:45:11 +0000 (13:45 +1100)] 
Fix matching of last key of a pkcs#11 token

Retrieving the cert for the last key of a token fails due to an
off-by-one bug in find_privkeys():

In the loop that iterates the keys, "current" contains the index
of the "next" key slot, which is also the active "count" of populated
slots in the output struct find_pkey_list_st.

The current statement:

list->key_ids_size = current - 1;

Means we return a "key_ids_size" of the current count minus one, ie 0
for 1 key etc... However, this isn't what the callers expect, for example:

find_multi_objs_cb() does:

ret = find_privkeys(sinfo, tinfo, &plist);
if (ret < 0) {
gnutls_assert();
return ret;
}

if (plist.key_ids_size == 0) {
gnutls_assert();
return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE;
}

So a slot with a single key will fail when trying to find a certificate

Subsequent uses of "plist" in that function also show that it's expected
to contain the real slot count:

for (i = 0; i < plist.key_ids_size; i++) {

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
4 years agoConsolidate FIPS .hmac files
Zoltan Fridrich [Wed, 23 Mar 2022 15:55:51 +0000 (16:55 +0100)] 
Consolidate FIPS .hmac files

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
4 years agosystem config disable KTLS
Frantisek Krenzelok [Fri, 18 Mar 2022 10:37:10 +0000 (11:37 +0100)] 
system config disable KTLS

Added option for system config `ktls = false` to disable ktls
system-wide

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
4 years agoMerge branch 'fips-pbkdf2-kat' into 'master'
Daiki Ueno [Sat, 26 Mar 2022 15:48:32 +0000 (15:48 +0000)] 
Merge branch 'fips-pbkdf2-kat' into 'master'

lib/crypto-selftests.c: Add a selftest for PBKDF2 that complies with FIPS 140-3.

See merge request gnutls/gnutls!1561

4 years agolib/crypto-selftests.c: Add a selftest for PBKDF2 that complies with FIPS 140-3.
Pedro Monreal [Tue, 22 Mar 2022 12:01:53 +0000 (13:01 +0100)] 
lib/crypto-selftests.c: Add a selftest for PBKDF2 that complies with FIPS 140-3.

Signed-off-by: Pedro Monreal <pmgdeb@gmail.com>
4 years agoMerge branch 'gmp_alloc' into 'master'
Daiki Ueno [Thu, 24 Mar 2022 19:17:38 +0000 (19:17 +0000)] 
Merge branch 'gmp_alloc' into 'master'

Use custom free/realloc for GMP to safely delete temporary secrets

See merge request gnutls/gnutls!1554

4 years agoUse custom allocators for GMP to make sure temporary secrets
Tobias Heider [Mon, 14 Mar 2022 15:17:28 +0000 (16:17 +0100)] 
Use custom allocators for GMP to make sure temporary secrets
from cryptographic operations in nettle are deleted safely.

Signed-off-by: Tobias Heider <tobias.heider@canonical.com>
4 years agoMerge branch 'configure-args-compression' into 'master'
Daiki Ueno [Sat, 19 Mar 2022 08:24:48 +0000 (08:24 +0000)] 
Merge branch 'configure-args-compression' into 'master'

configure.ac: fix brotli/zstd configure argument name; fix zstd searching

Closes #1342 and #1343

See merge request gnutls/gnutls!1557

4 years agoMerge branch 'wip/dueno/3.7.4-followup' into 'master'
Daiki Ueno [Fri, 18 Mar 2022 09:47:51 +0000 (09:47 +0000)] 
Merge branch 'wip/dueno/3.7.4-followup' into 'master'

NEWS: mention couple more changes in 3.7.4 release [ci-skip]

See merge request gnutls/gnutls!1558

4 years agodevel/release-steps.md: expand steps to generate tarball [ci-skip]
Daiki Ueno [Fri, 18 Mar 2022 07:10:12 +0000 (08:10 +0100)] 
devel/release-steps.md: expand steps to generate tarball [ci-skip]

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoNEWS: mention couple more changes in 3.7.4 release [ci-skip]
Daiki Ueno [Fri, 18 Mar 2022 06:54:06 +0000 (07:54 +0100)] 
NEWS: mention couple more changes in 3.7.4 release [ci-skip]

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoconfigure.ac: fix zstd detection
Sam James [Fri, 18 Mar 2022 05:51:29 +0000 (05:51 +0000)] 
configure.ac: fix zstd detection

Fixes typo in zstd detection.

None of the used autoconf macros will define `has_zstd_h` so
configure will (AFAICT) always fail to find zstd, even if it succeeded
via pkg-config moments before.

Drop it and rely solely on pkg-config as that's the only search
we're actually doing.

Fixes: https://gitlab.com/gnutls/gnutls/-/issues/1343
Signed-off-by: Sam James <sam@gentoo.org>
4 years agoconfigure.ac: fix brotli/zstd configure argument name
Sam James [Fri, 18 Mar 2022 05:40:28 +0000 (05:40 +0000)] 
configure.ac: fix brotli/zstd configure argument name

The old `./configure` arguments for brotli and zstd respectively
were inconsistent with the `./configure --help` output.

Old: --without-libbrotli --without-libzstd (also --with-*)
New: --without-brotli --without-zstd (also --with-*)

Fixes: https://gitlab.com/gnutls/gnutls/-/issues/1342
Signed-off-by: Sam James <sam@gentoo.org>
4 years agoMerge branch 'wip/dueno/cligen-update' into 'master'
Daiki Ueno [Thu, 17 Mar 2022 20:43:44 +0000 (20:43 +0000)] 
Merge branch 'wip/dueno/cligen-update' into 'master'

cligen: update git submodule

Closes #1337

See merge request gnutls/gnutls!1555

4 years agoMerge branch 'zfridric_devel' into 'master' 3.7.4
Zoltán Fridrich [Thu, 17 Mar 2022 09:03:52 +0000 (09:03 +0000)] 
Merge branch 'zfridric_devel' into 'master'

Release 3.7.4

See merge request gnutls/gnutls!1556

4 years agocligen: update git submodule
Daiki Ueno [Wed, 16 Mar 2022 10:19:29 +0000 (11:19 +0100)] 
cligen: update git submodule

To avoid emitting empty "list" substruct in header files, as well as
assuming the Python pwd module is always available.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoRelease 3.7.4
Zoltan Fridrich [Wed, 16 Mar 2022 14:42:40 +0000 (15:42 +0100)] 
Release 3.7.4

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
4 years agoMerge branch 'zfridric_devel' into 'master'
Zoltán Fridrich [Wed, 16 Mar 2022 10:37:08 +0000 (10:37 +0000)] 
Merge branch 'zfridric_devel' into 'master'

Make gnutls compliant to RFC5280

Closes #181

See merge request gnutls/gnutls!1550

4 years agoMake gnutls compliant to RFC5280
Zoltan Fridrich [Tue, 8 Mar 2022 17:01:37 +0000 (18:01 +0100)] 
Make gnutls compliant to RFC5280

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
4 years agoMerge branch 'wip/dueno/compress-cert-cli' into 'master'
Daiki Ueno [Wed, 16 Mar 2022 06:13:24 +0000 (06:13 +0000)] 
Merge branch 'wip/dueno/compress-cert-cli' into 'master'

cli, serv: allow multiple --compress-cert options

See merge request gnutls/gnutls!1553

4 years agocli, serv: allow multiple --compress-cert options
Daiki Ueno [Mon, 14 Mar 2022 15:03:07 +0000 (16:03 +0100)] 
cli, serv: allow multiple --compress-cert options

This eliminates the need of parsing the comma separated list manually.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoMerge branch 'wip/dueno/options' into 'master'
Daiki Ueno [Mon, 14 Mar 2022 14:38:29 +0000 (14:38 +0000)] 
Merge branch 'wip/dueno/options' into 'master'

Make option description type-safe

See merge request gnutls/gnutls!1535

4 years agoMerge branch 'calloc' into 'master'
Daiki Ueno [Mon, 14 Mar 2022 08:47:25 +0000 (08:47 +0000)] 
Merge branch 'calloc' into 'master'

Always check calloc() return value for NULL

See merge request gnutls/gnutls!1552

4 years agoHandle all cases of calloc returning NULL.
Tobias Heider [Sun, 13 Mar 2022 22:58:42 +0000 (23:58 +0100)] 
Handle all cases of calloc returning NULL.

Signed-off-by: Tobias Heider <tobias.heider@canonical.com>
4 years agoMerge branch 'config' into 'master'
František Krenželok [Sat, 12 Mar 2022 06:55:05 +0000 (06:55 +0000)] 
Merge branch 'config' into 'master'

Fix global-ini-handler

See merge request gnutls/gnutls!1551

4 years agoFix global-ini-handler
Frantisek Krenzelok [Fri, 11 Mar 2022 17:22:18 +0000 (18:22 +0100)] 
Fix global-ini-handler

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
4 years agoMake option specification type-safe
Daiki Ueno [Thu, 10 Feb 2022 14:58:08 +0000 (15:58 +0100)] 
Make option specification type-safe

This switches the CLI code and documentation generation to the
external cligen module, which provides more type-safe specification.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoMerge branch 'wip/dueno/lock-macro' into 'master'
Daiki Ueno [Wed, 9 Mar 2022 11:26:02 +0000 (11:26 +0000)] 
Merge branch 'wip/dueno/lock-macro' into 'master'

locks: define lock functions as a macro

Closes #1330

See merge request gnutls/gnutls!1549

4 years agoMerge branch 'fips' into 'master'
Daiki Ueno [Wed, 9 Mar 2022 11:08:42 +0000 (11:08 +0000)] 
Merge branch 'fips' into 'master'

fips: use GNUTLS_FIPS140_STRICT instead of magic number.

See merge request gnutls/gnutls!1547

4 years agofips: use GNUTLS_FIPS140_STRICT instead of magic number.
Tobias Heider [Wed, 9 Mar 2022 00:18:20 +0000 (01:18 +0100)] 
fips: use GNUTLS_FIPS140_STRICT instead of magic number.

Signed-off-by: Tobias Heider <tobias.heider@canonical.com>
4 years agoMerge branch 'wip/dueno/ci-timeout' into 'master'
Daiki Ueno [Wed, 9 Mar 2022 08:45:47 +0000 (08:45 +0000)] 
Merge branch 'wip/dueno/ci-timeout' into 'master'

.gitlab-ci.yml: prolong timeout for slow CI jobs

See merge request gnutls/gnutls!1548

4 years agolocks: define lock functions as a macro
Daiki Ueno [Wed, 9 Mar 2022 07:07:58 +0000 (08:07 +0100)] 
locks: define lock functions as a macro

When threads are not supported, glthread_* functions are defined as
no-op and thus dereferencing lock variables in inline functions will
cause compilation error.  This change fixes it by redefining our lock
functions as a macro so it will also be compiled out.

Reported by Fabrice Fontaine in:
https://gitlab.com/gnutls/gnutls/-/issues/1330

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years ago.gitlab-ci.yml: prolong timeout for slow CI jobs
Daiki Ueno [Wed, 9 Mar 2022 06:25:01 +0000 (07:25 +0100)] 
.gitlab-ci.yml: prolong timeout for slow CI jobs

Suggested by Marvin Scholz in:
https://gitlab.com/gnutls/gnutls/-/merge_requests/1543#note_859825412

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoMerge branch 'wip/dueno/strcodes' into 'master'
Daiki Ueno [Sat, 5 Mar 2022 07:18:06 +0000 (07:18 +0000)] 
Merge branch 'wip/dueno/strcodes' into 'master'

algorithms: ensure _list() exclude non-existing algorithms

See merge request gnutls/gnutls!1542

4 years agoMerge branch 'wip/dueno/libtss2-esys-dlopen' into 'master'
Daiki Ueno [Wed, 2 Mar 2022 14:19:35 +0000 (14:19 +0000)] 
Merge branch 'wip/dueno/libtss2-esys-dlopen' into 'master'

tpm2: dynamically load tss2 libraries as needed

See merge request gnutls/gnutls!1544

4 years agoMerge branch 'epirat-fix-missing-frameworks-pc-file' into 'master'
Daiki Ueno [Wed, 2 Mar 2022 12:34:14 +0000 (12:34 +0000)] 
Merge branch 'epirat-fix-missing-frameworks-pc-file' into 'master'

configure.ac: add missing Libs.private for macOS

See merge request gnutls/gnutls!1543

4 years agotpm2: dynamically load tss2 libraries as needed
Daiki Ueno [Wed, 23 Feb 2022 18:48:52 +0000 (19:48 +0100)] 
tpm2: dynamically load tss2 libraries as needed

libtss2-esys links to OpenSSL or mbed TLS for cryptography, which may
cause packaging issues.  This instead dlopen's tss2 libraries as
needed so non-TPM applications continue working without loading
multiple crypto libraries.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoMerge branch 'zfridric_devel' into 'master'
Daiki Ueno [Wed, 2 Mar 2022 05:17:10 +0000 (05:17 +0000)] 
Merge branch 'zfridric_devel' into 'master'

Add compress_certificate extension (RFC8879)

Closes #1301

See merge request gnutls/gnutls!1512

4 years agoAdd compress_certificate extension (RFC8879)
Zoltan Fridrich [Wed, 12 Jan 2022 13:57:42 +0000 (14:57 +0100)] 
Add compress_certificate extension (RFC8879)

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
4 years agoMerge branch 'master' into 'master'
Daiki Ueno [Mon, 28 Feb 2022 19:46:46 +0000 (19:46 +0000)] 
Merge branch 'master' into 'master'

x509: fix return error code for failed decryption without key

Closes #1321

See merge request gnutls/gnutls!1546

4 years agox509: fix return error code for failed decryption without key
Craig Gallek [Sun, 27 Feb 2022 15:39:07 +0000 (10:39 -0500)] 
x509: fix return error code for failed decryption without key

Decrypting an encrypted private key previously returned
GNUTLS_E_DECRYPTION_FAILED when no password was supplied.  This changed when
decryption via pin callbacks was added in d31b89de.

That change should have included a check for callback existence in order to
preserve the error path of the no-password case.

This adds the check and a test for the previous behavior.
Resolves bug #1321

Signed-off-by: Craig Gallek <cgallek@gmail.com>
4 years agoMerge branch 'wip/dueno/sendfile' into 'master'
Daiki Ueno [Sat, 26 Feb 2022 15:49:19 +0000 (15:49 +0000)] 
Merge branch 'wip/dueno/sendfile' into 'master'

gnutls_record_send_file: make it work with non-blocking I/O

See merge request gnutls/gnutls!1545

4 years agognutls_record_send_file: make it work with non-blocking I/O
Daiki Ueno [Thu, 24 Feb 2022 08:55:01 +0000 (09:55 +0100)] 
gnutls_record_send_file: make it work with non-blocking I/O

When either read() or gnutls_record_send() returns EAGAIN, just return
to the caller so it can call this function again, instead of retrying
internally.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoMerge branch 'ktls_sendfile' into 'master'
Daiki Ueno [Thu, 24 Feb 2022 06:45:49 +0000 (06:45 +0000)] 
Merge branch 'ktls_sendfile' into 'master'

ktls: sendfile

See merge request gnutls/gnutls!1486

4 years agoconfigure.ac: add missing Libs.private for macOS
Marvin Scholz [Wed, 23 Feb 2022 18:03:51 +0000 (19:03 +0100)] 
configure.ac: add missing Libs.private for macOS

On macOS the CoreFoundation and Security frameworks are used by
GnuTLS, however those were missing in the Libs.private in the .pc
resulting in link failures with static builds when relying on the
output of pkg-config --static.

Signed-off-by: Marvin Scholz <epirat07@gmail.com>
4 years agonon-KTLS sendfile test
Frantisek Krenzelok [Wed, 16 Feb 2022 10:25:11 +0000 (11:25 +0100)] 
non-KTLS sendfile test

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
4 years agonon-KTLS sendfile
Frantisek Krenzelok [Wed, 16 Feb 2022 10:23:36 +0000 (11:23 +0100)] 
non-KTLS sendfile

Added: sendfile API functionality for non KTLS enabled builds.
Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
4 years agoalgorithms: ensure _list() exclude non-existing algorithms
Daiki Ueno [Tue, 22 Feb 2022 16:09:46 +0000 (17:09 +0100)] 
algorithms: ensure _list() exclude non-existing algorithms

This aligns the behavior of _list() function for sign/pk to the one
for cipher/mac: the former previously returned all the algorithms
defined, while the latter returns only algorithms compiled in.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoRevert "algorithms: compile out GOST algorithm IDs if they are disabled"
Daiki Ueno [Tue, 22 Feb 2022 16:25:26 +0000 (17:25 +0100)] 
Revert "algorithms: compile out GOST algorithm IDs if they are disabled"

This reverts commit aa94bcbdaa55899f4f4ae13dc3e9a8c559354676.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoauto-generated files update
Frantisek Krenzelok [Wed, 16 Feb 2022 10:22:47 +0000 (11:22 +0100)] 
auto-generated files update

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
4 years agoktls: sendfile
Frantisek Krenzelok [Tue, 16 Nov 2021 11:05:53 +0000 (12:05 +0100)] 
ktls: sendfile

added API function: gnutls_record_send_file().
added: _gnutls_ktls_send_file() function which increases the performance
by offloading the file encryption to kernel, thus the data never goes
to userspace.
updated tests/gnutls_ktls to cover new API

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
4 years agoMerge branch 'wip/dueno/gost-fixes' into 'master'
Daiki Ueno [Tue, 22 Feb 2022 13:25:31 +0000 (13:25 +0000)] 
Merge branch 'wip/dueno/gost-fixes' into 'master'

priority, algorithms: compile out GOST algorithms IDs if they are disabled

See merge request gnutls/gnutls!1539

4 years agoalgorithms: compile out GOST algorithm IDs if they are disabled
Daiki Ueno [Mon, 21 Feb 2022 15:36:32 +0000 (16:36 +0100)] 
algorithms: compile out GOST algorithm IDs if they are disabled

When compiled with --disable-gost, gnutls-cli --list still prints GOST
algorithms for public key systems and signatures.  This change adds
compile time checks to suppress them.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
4 years agoMerge branch 'defer-setting-prio-string' into 'master'
Daiki Ueno [Tue, 22 Feb 2022 07:16:27 +0000 (07:16 +0000)] 
Merge branch 'defer-setting-prio-string' into 'master'

[split off !1533] defer setting priority string

See merge request gnutls/gnutls!1540

4 years agolib/algorithms: add UB warnings on late allowlisting API invocations
Alexander Sosedkin [Mon, 21 Feb 2022 17:19:25 +0000 (18:19 +0100)] 
lib/algorithms: add UB warnings on late allowlisting API invocations

Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>