summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* handshake: reject no_renegotiation alert if handshake is incompletetmp-renegotiationDaiki Ueno2020-09-034-13/+36
| | | | | | | | | | | | | | If the initial handshake is incomplete and the server sends a no_renegotiation alert, the client should treat it as a fatal error even if its level is warning. Otherwise the same handshake state (e.g., DHE parameters) are reused in the next gnutls_handshake call, if it is called in the loop idiom: do { ret = gnutls_handshake(session); } while (ret < 0 && gnutls_error_is_fatal(ret) == 0); Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Merge branch 'tmp-tls12-version-checks' into 'master'Daiki Ueno2020-08-212-12/+39
|\ | | | | | | | | | | | | handshake: check TLS version against modified server priorities Closes #1054 See merge request gnutls/gnutls!1309
| * handshake: check TLS version against modified server prioritiestmp-tls12-version-checksDaiki Ueno2020-08-172-12/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | The server needs to take into account of multiple factors when determining the TLS protocol version actually being used: - the legacy version - "supported_versions" extension - user_hello_func that may modify the server's priorities Only after that it can check whether the TLS version is enabled in the server's priorities. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'tmp-ocsp-resp-status' into 'master'Daiki Ueno2020-08-204-2/+134
|\ \ | | | | | | | | | | | | | | | | | | cert-session: check OCSP error responses Closes #1062 See merge request gnutls/gnutls!1308
| * | cert-session: check OCSP error responsestmp-ocsp-resp-statusDaiki Ueno2020-08-144-2/+134
| |/ | | | | | | | | | | | | | | If the OCSP responder returns an error code, such as tryLater, we can't proceed to examine the response bytes. In that case, just skip the check unless the stapling is mandatory on this certificate. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'tmp-cipher-check-length' into 'master'Daiki Ueno2020-08-182-0/+91
|\ \ | | | | | | | | | | | | | | | | | | gnutls_aead_cipher_decrypt: check output buffer size before writing Closes #1049 See merge request gnutls/gnutls!1312
| * | gnutls_aead_cipher_decrypt: check output buffer size before writingtmp-cipher-check-lengthDaiki Ueno2020-08-172-0/+91
| |/ | | | | | | | | | | | | | | | | While the documentation of gnutls_aead_cipher_decrypt indicates that the inout argument ptext_len initially holds the size that sufficiently fits the expected output size, there was no runtime check on that. This makes the interface robuster against misuses. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'tmp-crt-export2' into 'master'Daiki Ueno2020-08-182-4/+11
|\ \ | | | | | | | | | | | | | | | | | | gnutls_x509_crt_export2: return 0 instead of the length Closes #1025 See merge request gnutls/gnutls!1311
| * | gnutls_x509_crt_export2: return 0 instead of the lengthtmp-crt-export2Daiki Ueno2020-08-162-4/+11
| | | | | | | | | | | | | | | | | | This aligns the behavior to the documentation. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | | Merge branch 'tmp-type-limits' into 'master'Daiki Ueno2020-08-182-4/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | minitasn1: move WARN_CFLAGS setting to configure.ac Closes #1022 See merge request gnutls/gnutls!1307
| * | minitasn1: move WARN_CFLAGS setting to configure.actmp-type-limitsDaiki Ueno2020-08-132-4/+1
| |/ | | | | | | | | | | | | Some compilers don't support -Wno-type-limits, while they support -Wtype-limits. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'tmp-fix-gost-cert-nogost' into 'master'Daiki Ueno2020-08-161-15/+1
|\ \ | | | | | | | | | | | | | | | | | | Fix parser output in tests/cert-tests/data/gost-cert-nogost.pem Closes #1038 See merge request gnutls/gnutls!1310
| * | Fix parser output in tests/cert-tests/data/gost-cert-nogost.pemFiona Klute2020-08-161-15/+1
|/ / | | | | | | | | | | | | | | | | When building without GOST support parsing a GOST certificate must return an "error importing public key" message instead of key details. This change makes tests/cert-tests/pem-decoding pass for builds with --disable-gost. Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
* | Merge branch 'tmp-fips-enabled' into 'master'Daiki Ueno2020-08-141-1/+10
|\ \ | | | | | | | | | | | | _gnutls_fips_mode_enabled: treat selftest failure as FIPS disabled See merge request gnutls/gnutls!1306
| * | _gnutls_fips_mode_enabled: treat selftest failure as FIPS disabledtmp-fips-enabledDaiki Ueno2020-08-121-1/+10
| |/ | | | | | | | | | | | | | | | | Previously gnutls_fips140_mode_enabled() returned true, even after selftests have failed and the library state has switched to error. While later calls to crypto operations fails, it would be more convenient to have a function to detect that state. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'tmp-typo-fixes' into 'master'Daiki Ueno2020-08-1423-31/+31
|\ \ | | | | | | | | | | | | doc: assorted typo fixes See merge request gnutls/gnutls!1305
| * | doc: assorted typo fixestmp-typo-fixesDaiki Ueno2020-08-1223-31/+31
| |/ | | | | | | | | | | Spotted by codespell. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'tmp-cert-invalid' into 'master'Daiki Ueno2020-08-142-1/+5
|\ \ | | | | | | | | | | | | cert-session: ensure that invalid flag is always set See merge request gnutls/gnutls!1304
| * | serv, cli: ensure that invalid flag is always settmp-cert-invalidDaiki Ueno2020-08-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | cert-session: fail hard if mandatory stapling is not honoredDaiki Ueno2020-08-121-0/+1
| |/ | | | | | | | | | | | | | | 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>
* | Merge branch 'tmp-public-header-guards' into 'master'Daiki Ueno2020-08-1419-38/+50
|\ \ | | | | | | | | | | | | Add or clean header guards in lib/includes/gnutls/ See merge request gnutls/gnutls!993
| * | Add or clean header guards in lib/includes/gnutls/tmp-public-header-guardsTim Rühsen2019-05-0819-38/+50
| | | | | | | | | | | | Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
* | | Merge branch 'tmp-fix-cert-pass' into 'master'Daiki Ueno2020-08-142-1/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix two issues about certtool and passwords Closes #933 and #888 See merge request gnutls/gnutls!1268
| * | | p12: do not encrypt encrypt certificate bag with empty passwordtmp-fix-cert-passDmitry Baryshkov2020-05-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not encrypt certificate bag if the user has specified empty password (--password ''). Encryption can be turned on by specifying --empty-password. Fixes #888 Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
| * | | certtool: do not ask for private key password if it was providedDmitry Baryshkov2020-05-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make pin_callback() use cinfo->password if it is set (via command line or from template). Fixes #933 Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* | | | Merge branch 'mangle-ecc_scalar_random' into 'master'Daiki Ueno2020-08-141-1/+7
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | Mangle/hide GNUTLS-built ecc_scalar_random() Closes #1016 See merge request gnutls/gnutls!1300
| * | | mangle gnutls-built ecc_scalar_randomSteve Lhomme2020-08-141-1/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GNUTLS builds ecc-random.c but ecc_scalar_random() is a public API. So we mangle the internal version we build. ecc_mod_random is unaffected as it's an internal API that is mangled by GNUTLS. Fixes #1016 Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
* | | Merge branch 'mcatanzaro/test-missingissuer' into 'master'Daiki Ueno2020-08-081-1/+0
|\ \ \ | | | | | | | | | | | | | | | | Fix invalid free in missing issuer test case error path See merge request gnutls/gnutls!1303
| * | | Fix invalid free in missing issuer test case error pathMichael Catanzaro2020-08-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge branch 'mcatanzaro/typo' into 'master'Daiki Ueno2020-08-071-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Fix typo in API docs See merge request gnutls/gnutls!1302
| * | | Fix typo in API docsMichael Catanzaro2020-08-071-1/+1
|/ / / | | | | | | | | | Signed-off-by: Michael Catanzaro <mcatanzaro@gnome.org>
* | | Merge branch 'sign-spurious-message' into 'master'Daiki Ueno2020-07-271-4/+7
|\ \ \ | | | | | | | | | | | | | | | | pubkey: avoid spurious audit messages from _gnutls_pubkey_compatible_with_sig() See merge request gnutls/gnutls!1301
| * | | pubkey: avoid spurious audit messages from _gnutls_pubkey_compatible_with_sig()Petr Pavlu2020-07-271-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge branch 'tmp-dh-z' into 'master'Daiki Ueno2020-07-234-37/+338
|\ \ \ \ | |/ / / |/| | | | | | | | | | | nettle: check validity of (EC)DH shared secret before export See merge request gnutls/gnutls!1299
| * | | ecdh: perform SP800-56A rev3 full pubkey validation on keygentmp-dh-zDaiki Ueno2020-07-201-2/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | dh: perform SP800-56A rev3 full pubkey validation on keygenDaiki Ueno2020-07-181-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | dh-primes: make the FIPS approved check return Q valueDaiki Ueno2020-07-183-20/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | ecdh: check validity of P before exportDaiki Ueno2020-07-181-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | dh: check validity of Z before exportDaiki Ueno2020-07-101-9/+17
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'tmp-doc-fixes' into 'master'Dmitry Baryshkov2020-07-043-28/+28
|\ \ \ | | | | | | | | | | | | | | | | RELEASES.md: update for the 3.7.x releases See merge request gnutls/gnutls!1283
| * | | RELEASES.md: move the release steps to devel/ [ci skip]tmp-doc-fixesDaiki Ueno2020-06-072-26/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | RELEASES.md: mention 3.7.x releasesDaiki Ueno2020-06-071-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | | RELEASES.md: fix typo in scp command lineDaiki Ueno2020-06-071-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | | NEWS: add missing API modifications to 3.6.14 entryDaiki Ueno2020-06-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by Andreas Metzler in: https://lists.gnupg.org/pipermail/gnutls-help/2020-June/004650.html Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | | | Merge branch 'tmp-pthread' into 'master'Dmitry Baryshkov2020-07-042-3/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | build: use $(LIBPTHREAD) rather than non-existent $(LTLIBPTHREAD) See merge request gnutls/gnutls!1296
| * | | | build: use $(LIBPTHREAD) rather than non-existent $(LTLIBPTHREAD)tmp-pthreadJames Bottomley2020-06-292-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Merge branch 'tmp-nettle-master' into 'master'Dmitry Baryshkov2020-07-041-2/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | .gitlab-ci: disable config.cache for nettle-master builds See merge request gnutls/gnutls!1291
| * | | | | .gitlab-ci: disable config.cache for nettle-master buildsDmitry Baryshkov2020-06-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge branch 'split-up-tests-s-o-sig-hash' into 'master'Daiki Ueno2020-07-033-20/+46
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | tests: split up system-override-sig-hash.sh See merge request gnutls/gnutls!1298
| * | | | | | tests: split up system-override-sig-hash.shAlexander Sosedkin2020-07-033-20/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>