summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * x509: enable importing secret keys for X448 and X25519.Daniel Kahn Gillmor2021-09-171-0/+54
| | | | | | | | | | | | | | | | | | _decode_pkcs8_modern_ecdh_key is virtually the same as _decode_pkcs8_eddsa_key. Another implementation would be to collapse these two functions into one, since their structure is identical. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
| * Enable X25519 and X448 everywhere that EdDSA is supported.Daniel Kahn Gillmor2021-09-1710-3/+27
| | | | | | | | | | | | | | These are just trivial extension points where the codepath is the same for the ECDH scheme as it is for the EdDSA scheme. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
| * x509: handle X448 and X25519 in write_pubkeyDaniel Kahn Gillmor2021-09-171-0/+32
| | | | | | | | | | | | | | | | | | This uses the same structure as _gnutls_x509_write_eddsa_pubkey. Another way to write this would be to combine those two functions, despite X448 and X25519 not being EdDSA at all. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
| * pubkey: handle X25519 and X448 in gnutls_pubkey_import_pkcs11Daniel Kahn Gillmor2021-09-171-0/+137
| | | | | | | | | | | | | | | | | | | | | | I am not confident in the strings I chose to match on in ASN1_ETYPE_PRINTABLE_STRING, in that I do not know what registry I should look this up in. The *parse_ecc_ecdh_params and *import_ecc_ecdh functions are tweaked analogs to the eddsa versions of those functions. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
| * nettle: extend pk_verify_priv_params to handle X25519 and X448Daniel Kahn Gillmor2021-09-171-0/+41
| | | | | | | | | | | | | | | | | | | | This is basically a copy of the EdDSA case in the switch statement. Another way to implement it would be to augment the EdDSA case (and the functions it uses) to have that case also handle ECDH use of the CFRG curves. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
| * lib/pk: treat modern ECDH octet streams the same way as eddsa streams.Daniel Kahn Gillmor2021-09-171-1/+1
| | | | | | | | Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
| * lib/algorithms: add modern ecdh functions comparable to curve_is_eddsaDaniel Kahn Gillmor2021-09-171-0/+16
| | | | | | | | | | | | This is useful for the so-called CFRG curves used in ECDH, x25519 and x448. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
| * algorithms: Explicitly name ECDH_X448_OID and ECDH_X25519_OIDDaniel Kahn Gillmor2021-09-173-2/+7
| | | | | | | | Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* | Merge branch 'wip/dueno/shake' into 'master'Daiki Ueno2021-09-202-7/+22
|\ \ | | | | | | | | | | | | wrap_nettle_hash_exists: add missing hash algorithms See merge request gnutls/gnutls!1473
| * | wrap_nettle_hash_exists: add missing hash algorithmsDaiki Ueno2021-09-202-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds SHAKE-128, SHAKE-256, and RIPEMD-160 to the supported algorithms by nettle. While SHAKEs are not a hash algorithm but an XOF, it would be consistent to report they are implemented. The simple test is expanded to exercise the code path (gnutls_digest_get_id → wrap_nettle_hash_exists). Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | | Merge branch 'wip/dueno/oss-fuzz-focal' into 'master'Daiki Ueno2021-09-181-1/+1
|\ \ \ | |_|/ |/| | | | | | | | fuzz: explicitly supply LDFLAGS to clang++ command line See merge request gnutls/gnutls!1474
| * | fuzz: explicitly supply LDFLAGS to clang++ command lineDaiki Ueno2021-09-181-1/+1
| |/ | | | | | | | | | | | | This prevented fuzzer programs being linked in Ubuntu 20.03, used in oss-fuzz. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'wip/dueno/asan-aggressive' into 'master'Daiki Ueno2021-09-111-0/+35
|\ \ | |/ |/| | | | | .gitlab-ci.yml: new ASan job with -DAGGRESSIVE_REALLOC See merge request gnutls/gnutls!1472
| * .gitlab-ci.yml: new ASan job with -DAGGRESSIVE_REALLOCDaiki Ueno2021-09-101-0/+35
|/ | | | | | | This would exercise the same logic currently covered with fedora-valgrind-aggressive in each MR. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Merge branch 'tmp-abi-check' into 'master'Daiki Ueno2021-09-103-1/+25
|\ | | | | | | | | devel: provide external git diff driver for *.abi files See merge request gnutls/gnutls!1214
| * devel: provide external git diff driver for *.abi files [ci skip]tmp-abi-checkDaiki Ueno2020-05-303-1/+25
| | | | | | | | | | | | | | | | 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>
* | Merge branch 'wip/dueno/oss-fuzz-muldefs' into 'master'Daiki Ueno2021-09-101-0/+1
|\ \ | | | | | | | | | | | | fuzz: allow multiple definitions of gnutls_rnd in oss-fuzz See merge request gnutls/gnutls!1471
| * | fuzz: allow multiple definitions of gnutls_rnd in oss-fuzzDaiki Ueno2021-09-091-0/+1
|/ / | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'wip/dueno/lgtm' into 'master'Daiki Ueno2021-09-099-80/+81
|\ \ | | | | | | | | | | | | Suppress warnings spotted by LGTM See merge request gnutls/gnutls!1470
| * | build: remove tautological if conditionsDaiki Ueno2021-09-097-72/+71
| | | | | | | | | | | | | | | | | | Spotted by LGTM. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | ext/{client,server}_cert_type: use proper types for integersDaiki Ueno2021-09-092-8/+10
| | | | | | | | | | | | | | | | | | Spotted by LGTM. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | | Merge branch 'wip/dueno/pythonpath' into 'master'Daiki Ueno2021-09-074-4/+4
|\ \ \ | |/ / |/| | | | | | | | tls-fuzzer: update submodules to the latest See merge request gnutls/gnutls!1469
| * | tests: use PYTHONPATH instead of creating symlinks in srcdirDaiki Ueno2021-09-071-4/+4
| | | | | | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | tls-fuzzer: update submodules to the latestDaiki Ueno2021-09-073-0/+0
|/ / | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'ssse3-sha384' into 'master'Daiki Ueno2021-09-071-1/+1
|\ \ | | | | | | | | | | | | fix SSSE3 SHA384 to work more than once See merge request gnutls/gnutls!1466
| * | fix SSSE3 SHA384 to work more than onceMiroslav Lichvar2021-09-071-1/+1
|/ / | | | | | | | | | | | | | | The output function called sha512_digest() instead of sha384_digest(), which caused the hash context to be reinitialized for SHA512 instead of SHA384 and all following digests using the hash handle were wrong. Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
* | Merge branch 'wip/dueno/disable-0rtt-tests' into 'master'Daiki Ueno2021-09-073-62/+60
|\ \ | | | | | | | | | | | | testcompat-openssl-tls13-cli.sh: disable early data testing for CI stability See merge request gnutls/gnutls!1468
| * | testcompat-openssl-tls13-cli.sh: disable early data testingDaiki Ueno2021-09-071-33/+33
| | | | | | | | | | | | | | | | | | | | | This test is causing intermittent failure quite often in the CI. Let's temporarily disable it until the cause is properly investigated. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | testcompat-openssl-tls13-cli.sh: use different tmpdirs for sub-testsDaiki Ueno2021-09-071-2/+2
| | | | | | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | tests: rework port lockingDaiki Ueno2021-09-072-29/+27
|/ / | | | | | | | | | | | | | | This makes the locking logic per port, not per entire make process. It also makes use of absolute paths for locking directory, so that tlsfuzzer tests can use it. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'fix-tls13-post-hanshake-with-cert' into 'master'Daiki Ueno2021-09-011-4/+5
|\ \ | | | | | | | | | | | | tests/tls13/post-handshake-with-cert: avoid a race condition See merge request gnutls/gnutls!1464
| * | tests/tls13/post-handshake-with-cert: avoid a race conditionAlexander Sosedkin2021-08-301-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | A server tries to close connection and kill the client after reauth. Client, in turn, attempts to send data in some cases. This patch makes the server wait for the client to terminate first. Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
* | | Merge branch 'terminate-fixes' into 'master'Daiki Ueno2021-08-3154-111/+132
|\ \ \ | |/ / |/| | | | | | | | Avoid tests killing entire process groups See merge request gnutls/gnutls!1463
| * | tests: remove unused `terminate` from 2 testsAlexander Sosedkin2021-08-302-18/+0
| | | | | | | | | | | | Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
| * | tests: add a safeguard to terminate()Alexander Sosedkin2021-08-3053-35/+74
| | | | | | | | | | | | | | | | | | Add a safeguard to `terminate()` so that we don't kill whole pgroups. Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
| * | tests: don't kill whole pgroupsAlexander Sosedkin2021-08-2716-60/+60
|/ / | | | | | | | | | | | | `terminate()` executed from the child process results in a `kill(0, SIGTERM)`, bringing the whole pgroup down. `exit(1)` should be called instead. Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
* | Merge branch 'build_docs' into 'master'Daiki Ueno2021-08-261-3/+4
|\ \ | | | | | | | | | | | | INSTALL.md: Update documentation on building static library See merge request gnutls/gnutls!1462
| * | INSTALL.md: Update documentation on building static library [skip ci]Nick Child2021-08-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | As of commit a88eb79d88c53531c49d7cedfce2207f36ac8a9d, building a static archive (libgnutls.a) is off by default. This commit updates the documentation for building a static library in INSTALL.md . Signed-off-by: Nick Child <nick.child@ibm.com>
* | | Merge branch 'wip/dueno/guile-fixes' into 'master'Daiki Ueno2021-08-264-6/+66
|\ \ \ | |/ / |/| | | | | | | | guile: Add 'gnutls_x509_crt_get_fingerprint', 'GNUTLS_DIG_SHA256' See merge request gnutls/gnutls!1461
| * | guile: Add 'GNUTLS_DIG_SHA256' enum value.Simon South2021-08-223-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guile/modules/gnutls/build/enums.scm (%digest-enum): Add 'sha256'. * guile/modules/gnutls.in: Export 'digest/sha256'. * guile/tests/x509-certificates.scm: Test 'digest/sha256' with 'x509-certificate-fingerprint'. (%sha256-fingerprint): New constant. Signed-off-by: Simon South <simon@simonsouth.net>
| * | guile: Add binding for 'gnutls_x509_crt_get_fingerprint'.Simon South2021-08-223-5/+57
|/ / | | | | | | | | | | | | | | | | | | | | * guile/src/core.c (MAX_HASH_SIZE): New constant. (scm_gnutls_x509_certificate_fingerprint): New function. * guile/modules/gnutls.in: Export 'x509-certificate-fingerprint'. * guile/tests/x509-certificates.scm: Test 'x509-certificate-fingerprint'. (%sha1-fingerprint): New constant. (u8vector->hex-string): New procedure. Signed-off-by: Simon South <simon@simonsouth.net>
* | Merge branch 'master' into 'master'Daiki Ueno2021-08-162-0/+81
|\ \ | | | | | | | | | | | | x509: pin/password callback support for openssl encrypted private keys See merge request gnutls/gnutls!1459
| * | x509: pin/password callback support for openssl encrypted private keysCraig Gallek2021-08-152-0/+81
|/ / | | | | | | | | | | | | | | | | This attempts to use the registered pin callback when the password for an encrypted openssl private key is not supplied. This matches the functionality for PKCS8 sealed keys above and is similar to what openssl does in this situation. Signed-off-by: Craig Gallek <cgallek@gmail.com>
* | Merge branch 'wip/dueno/asan-poisoning' into 'master'Daiki Ueno2021-08-109-101/+165
|\ \ | | | | | | | | | | | | | | | | | | mem: instrument with ASan memory poisoning as well as valgrind Closes #1260 See merge request gnutls/gnutls!1458
| * | mem: instrument with ASan memory poisoning as well as valgrindDaiki Ueno2021-08-099-101/+165
| | | | | | | | | | | | | | | | | | | | | This makes it possible to catch undefined memory access in the more lightweight CI runs. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | | Merge branch 'wip/dueno/tls13-rsa-pss-salt' into 'master'Daiki Ueno2021-08-079-45/+134
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | pk: add flags to force RSA-PSS salt length to match digest length Closes #1258 See merge request gnutls/gnutls!1455
| * | | pk: add flags to force RSA-PSS salt length to match digest lengthDaiki Ueno2021-08-079-45/+134
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | This adds a couple of flags to RSA-PSS signing and verification, to enforce that the salt length matches the digest length. That is not only recommended in RFC 4055, but also mandated in RFC 8446 in the TLS 1.3 context. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | | Merge branch 'wip/dueno/fips-rsa-key-size' into 'master'Daiki Ueno2021-08-051-3/+25
|\ \ \ | |/ / |/| | | | | | | | fips: allow more RSA modulus sizes See merge request gnutls/gnutls!1453
| * | fips: allow more RSA modulus sizesDaiki Ueno2021-08-051-3/+25
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we restricted RSA modulus size to be either 2048 or 3072 bits in FIPS mode, following FIPS 186-4. On the other hand, FIPS 140-2 IG A.14 and FIPS 140-3 IG C.F updates it to allow arbitrary modulus sizes equal to or larger than 2048 bits under certain conditions. This change reflects the guidance, though it only allows known sizes due to the complexity of calculating the approximate security strength using the formula in FIPS 140-2 IG 7.5. Suggested-by: Stephan Mueller Reviewed-by: Stephan Mueller Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'wip/dueno/test-key-share-single' into 'master'Daiki Ueno2021-08-041-159/+57
|\ \ | | | | | | | | | | | | tests: tls13/key_share: rewrite as single process See merge request gnutls/gnutls!1457