summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * .gitlab-ci.yml: bump configure cache versionDaiki Ueno2020-08-311-1/+1
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * .gitignore: ignore more filesDaiki Ueno2020-08-311-1/+27
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * build: avoid -Wenum-conversion warnings with GCC 10Daiki Ueno2020-08-3112-20/+33
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * refine tests for ancient servers which support both SSL 3.0 and TLS 1.0, but ↵Daniel Lenski2020-08-312-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | both only with %NO_EXTENSIONS This is a follow-up to !1221. See #958 and https://gitlab.com/openconnect/openconnect/-/issues/145 for a real-world example of ancient Cisco servers with these deficiencies. With !1221 only, gnutls-cli-debug reports that these ancient servers only support SSL 3.0 (but without extensions). Information after this point is largely erroneous: $ gnutls-cli-debug ***vpn.***.com GnuTLS debug client 3.6.12 Checking ***vpn.***.com:443 whether the server accepts default record size (512 bytes)... no whether %ALLOW_SMALL_RECORDS is required... no for SSL 3.0 (RFC6101) support... yes for SSL 3.0 with extensions... no With this additional change, gnutls-cli-debug correctly reports that such a server also supports TLS 1.0 (but again with extensions disabled). Below I've marked some of the significant fields that have changed: $ gnutls-cli-debug ***vpn.***.com GnuTLS debug client 3.6.12 Checking ***vpn.***.com:443 whether the server accepts default record size (512 bytes)... no whether %ALLOW_SMALL_RECORDS is required... no for SSL 3.0 (RFC6101) support... yes for SSL 3.0 with extensions... no whether we need to disable TLS 1.2... yes whether we need to disable TLS 1.1... yes # This is now correct: whether we need to disable TLS 1.0... no # This is now correct: whether %NO_EXTENSIONS is required... yes # This is now correct: for TLS 1.0 (RFC2246) support... yes for TLS 1.1 (RFC4346) support... no fallback from TLS 1.1 to... failed for TLS 1.2 (RFC5246) support... no # This is now correct: for known TLS or SSL protocols support... yes TLS1.2 neg fallback from TLS 1.6 to... failed (server requires fallback dance) for inappropriate fallback (RFC7507) support... no for HTTPS server name... ****** for certificate chain order... sorted for Safe renegotiation support (SCSV)... no for version rollback bug in RSA PMS... no for version rollback bug in Client Hello... no whether the server ignores the RSA PMS version... no whether small records (512 bytes) are tolerated on handshake... yes whether cipher suites not in SSL 3.0 spec are accepted... yes whether a bogus TLS record version in the client hello is accepted... yes whether the server understands TLS closure alerts... partially whether the server supports session resumption... yes for anonymous authentication support... no for ephemeral Diffie-Hellman support... no for RFC7919 Diffie-Hellman support... no for AES-GCM cipher (RFC5288) support... no for AES-CCM cipher (RFC6655) support... no for AES-CCM-8 cipher (RFC6655) support... no for AES-CBC cipher (RFC3268) support... no for CAMELLIA-GCM cipher (RFC6367) support... no for CAMELLIA-CBC cipher (RFC5932) support... no # This is now correct: for 3DES-CBC cipher (RFC2246) support... yes # This is now correct: for ARCFOUR 128 cipher (RFC2246) support... yes for CHACHA20-POLY1305 cipher (RFC7905) support... no for GOST28147-CNT cipher (draft-smyshlyaev-tls12-gost-suites) support... no for MD5 MAC support... yes for SHA1 MAC support... yes for SHA256 MAC support... no for GOST28147-IMIT MAC (draft-smyshlyaev-tls12-gost-suites) support... no Signed-off-by: Daniel Lenski <dlenski@gmail.com>
| * tests/cert-test/invalid-sig: use datefudge to test expired certsDaiki Ueno2020-08-311-18/+25
| | | | | | | | | | | | | | Suggested by Andreas Metzler in: https://gitlab.com/gnutls/gnutls/-/issues/1021 Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * tests: check_for_datefudge: don't exit the test programsDaiki Ueno2020-08-3148-48/+53
| | | | | | | | | | | | | | | | 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>
| * configure.ac: prefer the latest version of build infrastructureDaiki Ueno2020-08-311-0/+3
| | | | | | | | | | | | | | | | | | | | 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>
| * configure: improve nettle, gmp, and hogweed soname detectionVitezslav Cizek2020-08-311-3/+12
| | | | | | | | | | | | | | | | | | | | | | 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>
| * tests: updated tlsfuzzer tests to latest versionKrenzelokFrantisek2020-08-312-0/+2
| | | | | | | | | | | | excluded some tests from test-certificate-malformed.py Signed-off-by: KrenzelokFrantisek <krenzelok.frantisek@gmail.com>
| * gnutls_cipher_init: fix potential memleakDaiki Ueno2020-08-311-4/+14
| | | | | | | | | | | | | | | | 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>
| * gnutls_aead_cipher_init: fix potential memleakDaiki Ueno2020-08-311-4/+11
| | | | | | | | | | | | | | | | | | | | | | 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>
| * serv: omit upper bound of --maxearlydata option definitionDaiki Ueno2020-08-311-1/+1
|/ | | | | | | | | | | | | | 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>
* Merge branch 'tmp-fix-iov-3_6' into 'gnutls_3_6_x'Daiki Ueno2020-06-212-40/+29
|\ | | | | | | | | crypto-api: always allocate memory when serializing iovec_t See merge request gnutls/gnutls!1290
| * crypto-api: always allocate memory when serializing iovec_ttmp-fix-iov-3_6Daiki Ueno2020-06-142-40/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'fix-vista-ci-3_6_x' into 'gnutls_3_6_x'Dmitry Baryshkov2020-06-151-2/+45
|\ \ | |/ |/| | | | | Fix Vista CI and add a Vista DLL target (3_6_x branch) See merge request gnutls/gnutls!1282
| * CI: fix typo in the Vista targetSteve Lhomme2020-06-151-2/+45
|/ | | | | | | This resulted in the MinGW64.Vista+ target doing the same thing as the MinGW64 target. Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
* Merge branch 'tmp-fix-36-mandatory-lib' into 'gnutls_3_6_x'Dmitry Baryshkov2020-06-073-8/+8
|\ | | | | | | | | Merge the extra libraries to link dynamically in GNUTLS_LIBS_PRIVATE See merge request gnutls/gnutls!1281
| * Merge the extra libraries to link dynamically in GNUTLS_LIBS_PRIVATESteve Lhomme2020-06-073-8/+8
|/ | | | | | | | | 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>
* Merge branch 'tmp-release-3.6.14' into 'master'3.6.14Daiki Ueno2020-06-033-4/+36
|\ | | | | | | | | Release 3.6.14 [ci skip] See merge request gnutls/gnutls!1272
| * Release 3.6.14 [ci skip]Daiki Ueno2020-06-033-4/+36
|/ | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Merge branch 'tmp-totp-init' into 'master'Daiki Ueno2020-06-034-19/+23
|\ | | | | | | | | stek: differentiate initial state from valid time window of TOTP See merge request gnutls/gnutls!1275
| * valgrind: check if session ticket key is used without initializationtmp-totp-initDaiki Ueno2020-06-032-1/+12
| | | | | | | | | | | | | | | | 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>
| * stek: differentiate initial state from valid time window of TOTPDaiki Ueno2020-06-033-18/+11
|/ | | | | | | | | 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>
* Merge branch 'tmp-known-certs' into 'master'Daiki Ueno2020-05-315-35/+184
|\ | | | | | | | | _gnutls_pkcs11_verify_crt_status: check validity against system cert See merge request gnutls/gnutls!1271
| * tests: add test case for certificate chain supersedingDaiki Ueno2020-05-311-0/+97
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * x509: trigger fallback verification path when cert is expiredDaiki Ueno2020-05-311-5/+7
| | | | | | | | | | | | | | | | | | 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>
| * _gnutls_pkcs11_verify_crt_status: check validity against system certDaiki Ueno2020-05-313-30/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'nowincrypt' into 'master'Dmitry Baryshkov2020-05-314-1/+100
|\ \ | | | | | | | | | | | | use bcrypt for the windows random generator instead of wincrypt See merge request gnutls/gnutls!1255
| * | win32: use bcrypt instead of CryptoAPI on Vista+ for random numbersSteve Lhomme2020-05-284-1/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CryptoAPI is a deprecated API [1] that is forbidden in UWP builds. Rewrite the CryptoAPI calls in bcrypt. bcrypt is used instead of CryptoAPI when targeting Windows Vista and above. https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptdecrypt Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
* | | Merge branch 'fix-valgrind' into 'master'Dmitry Baryshkov2020-05-311-0/+4
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | configure.ac: add -fno-builtin-strcmp if valgrind is enabled Closes #944 See merge request gnutls/gnutls!1264
| * | configure.ac: add -fno-builtin-strcmp if valgrind is enabledDmitry Baryshkov2020-05-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent GCC provides strcmp which makes Valgrind assume that it accesses uninitialized data. Disable this optimization if Valgrind tests are enabled. Fixes #944 Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* | | Merge branch 'add-aes192-gcm' into 'master'Dmitry Baryshkov2020-05-3018-0/+128
|\ \ \ | | | | | | | | | | | | | | | | lib: add support for AES-192-GCM See merge request gnutls/gnutls!1267
| * | | lib: add support for AES-192-GCMDmitry Baryshkov2020-05-2718-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | Add support for AES-192 in GCM mode. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* | | | Merge branch 'tmp-macosx-vers' into 'master'Dmitry Baryshkov2020-05-301-0/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | .travis.yml: use several different OSX versions See merge request gnutls/gnutls!1269
| * | | | .travis.yml: use several different OSX versionsDmitry Baryshkov2020-05-281-0/+10
| |/ / / | | | | | | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* | | | Merge branch 'tmp-fix-macosx-link' into 'master'Dmitry Baryshkov2020-05-301-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | configure: check that -no_weak_links works with FD_SET Closes #966 See merge request gnutls/gnutls!1266
| * | | | configure: check that -no_weak_links works with FD_SETDmitry Baryshkov2020-05-261-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several Xcode/SDK versions provide FD_SET implementation that does not work with -no_weak_links. Check that this option does not break FD_SET usage. Fixes #966 Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* | | | Merge branch 'tmp-fileio' into 'master'Daiki Ueno2020-05-3032-225/+237
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | lib: improve external file loading See merge request gnutls/gnutls!1261
| * | | build: write "FILE *fp" instead of "FILE *fd"tmp-fileioDaiki Ueno2020-05-3010-141/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | gnutls_load_file: document limitation regarding partial failureDaiki Ueno2020-05-301-0/+4
| | | | | | | | | | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | | cert-cred: clear private key data loaded from fileDaiki Ueno2020-05-302-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | lib: avoid file descriptor leak when application forksDaiki Ueno2020-05-309-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes use of the "e" flag of fopen, provided by the Gnulib's fopen-gnu module. Reported by Remi Denis-Courmont in: https://gitlab.com/gnutls/gnutls/-/issues/985 and fix suggested by Tim Rühsen. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * | | gnulib: update git submoduleDaiki Ueno2020-05-2920-77/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings in the new fopen-gnu module and the RF_SENSITIVE flag for fread_file and read_file. This also adds the following changes to be consistent with the latest changes in Gnulib: - the callers of fread_file and read_file to be adjusted for the FLAGS argument - "attribute.h" needs to be used extensively Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | | | Merge branch 'ncrypt-uwp10' into 'master'Dmitry Baryshkov2020-05-271-142/+176
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | win32: allow using ncrypt in UWP builds See merge request gnutls/gnutls!1256
| * | | | win32: move the NCRYPT key import into a functionSteve Lhomme2020-05-271-142/+176
| | |/ / | |/| | | | | | | | | | | | | | | | | | No functional change. The has been simply moved. Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
* | | | Merge branch 'static-ncrypt' into 'master'Dmitry Baryshkov2020-05-274-4/+59
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Allow statically linking ncrypt (win32) See merge request gnutls/gnutls!1254
| * | | | configure.ac: determine if the Vista APIs can be linked staticallySteve Lhomme2020-05-274-4/+59
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If _WIN32_WINNT is higher or equal to 0x0600, Vista API's are allowed during the build. We can assume that the minimum platform the code will run on is Vista [1] In that case there's no need to call API's (ncrypt) dynamically when it can be done statically. [1] https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
* | | | Merge branch 'tmp-fips-redefinition' into 'master'Dmitry Baryshkov2020-05-274-18/+24
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | fips: make FIPS140-2 mode enablement logic simpler See merge request gnutls/gnutls!1253
| * | | | fips: remove FIPS_STARTUP_ONLY_TEST_CASE macrotmp-fips-redefinitionDaiki Ueno2020-05-201-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macro was intended to avoid non-recoverable errors during library initialization, but the code path has been removed in commit 3963518d067a64412bbe0aa9ce5fc33ae729c15f. Signed-off-by: Daiki Ueno <dueno@redhat.com>
| * | | | fips: make FIPS140-2 mode enablement logic simplerDaiki Ueno2020-05-203-9/+22
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, to enable the FIPS140-2 mode, both /etc/system-fips and the fips=1 kernel command line need to be set. While this was designed to be consistent, the convention is not well followed by the other crypto libraries and the former tends to be ignored. This aligns the behavior to the latter, i.e. if fips=1 is set, the library enables the FIPS140-2 mode regardless of the existence of /etc/system-fips. Suggested by Alexander Sosedkin. Signed-off-by: Daiki Ueno <dueno@redhat.com>