Commits on Source (74)
-
Rūdolfs Mazurs authored5dfa84cb
-
Juliano Camargo authored
(cherry picked from commit a76b9fc73cdd06bf40ab5181b1593975aef1dcd2)
4f98cb53 -
Juliano de Souza Camargo authored14666fb7
-
Ruslan Marchenko authored
The base class mainly assigns GTlsConnection and GDtlsConnection vfuncs, checks whether handshake is complete and passes the data to the low-level TLS backend implementation via own vfunc
fed81fd1 -
Ruslan Marchenko authored
The implementation supports tls-unique, server-end-point and experimental proposed tls-exporter binding type.
d696b207 -
Ruslan Marchenko authored
The implementation supports tls-unique, server-end-point and experimental proposed tls-exporter binding type.
0b84253d -
Ruslan Marchenko authored
* Test units verify if both client and server binding data matches. * Test units require Glib-2.0 version 2.65.1 hence bump the dependency
804a026c -
Yuri Chornoivan authored40dea433
-
Yuri Chornoivan authoredf3298faf
-
Michael Catanzaro authored
We should use test asserts instead. Fixes #137
783f10eb -
Cheng-Chia Tseng authored
(cherry picked from commit ef578948d98f15965c3d927862c6b87d90bb4c73)
fb7efcb1 -
Ruslan Marchenko authored48f3027b
-
Michael Catanzaro authored
RSA-1024 is now blocked by Fedora 33 system policy. This exposes an embarassing mistake. Browsers blocked RSA-1024 five years ago. It is surprising that it was not blocked before now.
53272dab -
Michael Catanzaro authored
SHA-1 is still allowed for certificates that are trust roots, but it is NOT allowed for the "alternative" CA certificate sent in the chain, because that alternative certificate is not a trust root, even though it has the same public key as a trust root. So we can no longer use SHA-1 in ca-alternative.pem, though it's still allowed in ca.pem. Both certificates are constructed from the same .conf, so we either need to use separate .conf or change them both. Changing them both is easier. We have no compelling reason to test whether SHA-1 is allowed on trust roots here; we can expect GnuTLS and OpenSSL to do that in their testsuites. Interestingly, only GnuTLS rejects SHA-1 on the alternative CA certificate with F33 crypto policy. OpenSSL allows it. I guess the OpenSSL behavior seems reasonable, because there should be no security risk to allowing SHA-1 signatures for a certificate that has the same public key as a trust root. If the owner of the corresponding private key is not trusted, then it should not have any certificates installed as trust roots. Fixes #140
db1a0852 -
Michael Catanzaro authored
We no longer need to allow legacy crypto.
88707ad2 -
Anderson Toshiyuki Sasaki authored
Previously, the cipher list was set as "HIGH:!DSS:!aNULL@STRENGTH" by default. This made the OpenSSL backend to not follow the system-wide crypto policies in systems like Fedora or RHEL. With this change, the cipher list is only set when the environment variable G_TLS_OPENSSL_CIPHER_LIST is specified. Fixes #106 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2ede29be -
Michael Catanzaro authored
Found by coverity
57b0474e -
Michael Catanzaro authored
Found by coverity
532150b9 -
Yuri Chornoivan authored4080b9b7
-
Marek Černocký authoredb586958e
-
Michael Catanzaro authored
This is slow. Don't misconfigure your server by failing to include required certificates if you don't want your website to be slow. Note that since we're already on a dedicated handshake thread if called from GTlsConnection, we can do sync I/O throughout, no worries. Fixes #96
248003f3 -
Vladimir D. Seleznev authored42f8afbb
-
Patrick Griffis authored
This reverts commit d90b93a8.
9b3d30e4 -
Patrick Griffis authored
- Use Fedora 33 as Rawhide is currently broken - Build glib 2.67 (master currently) - Add opensc for pkcs11-spy module
a0da3a2c -
Patrick Griffis authored5447d044
-
Patrick Griffis authored
It has leaks that we don't care about
2ce8edc9 -
Michael Catanzaro authored
This was hard. The problem was that the mock PKCS#11 module accepts only a single PKCS#11 session at a time. The test normally creates one session, closes it, creates another, and closes it. But sometimes the first session doesn't get closed before the second is created, and the test breaks. The problem is that the PKCS#11 session is created and closed by the GTlsClientConnection. The test creates two, and unrefs the first one before creating the second, but other refs are held by the first connection's GTasks. These GTasks complete in idle callbacks, and if one idle fails to run before we finish iterating the main loop, the first GTlsClientConnection won't be destroyed and so the first PKCS#11 session won't be closed in time. Note there is no bug in the implementation, and nothing is leaked; rather, it's just not destroyed soon enough for the test. Fix this by iterating the test's main context until the first connection is destroyed.
0a659d0a -
Patrick Griffis authored90f7f8cf
-
Yuri Chornoivan authored66295504
-
Florentina Mușat authored2b121b29
-
Jordi Mas authored11a43bd0
-
Fabio Tomat authoredb4a3702c
-
Philipp Kiemle authored5fc00483
-
Asier Sarasua Garmendia authoredec31c2a9
-
Ignacio Casal Quinteiro authored
And call the openssl api if it is defined Fixes #156
40c708dd -
Ignacio Casal Quinteiro authored5e97a64f
-
Ignacio Casal Quinteiro authored3aaf1c39
-
Ignacio Casal Quinteiro authored
Also point to the glib 2.67 branch for now
1aa90ea7 -
Aurimas Černius authored1d4299f0
-
Fran Dieguez authored83b98b61
-
Michael Catanzaro authored1a79147b
-
Hugo Carvalho authored3726a128
-
Marek Černocký authoredfdb944dc
-
Źmicier Turok authoredc48a63f4
-
Balázs Úr authored99ae209b
-
Dz Chen authored93754d58
-
Daniel Mustieles authored1e8cde95
-
Rafael authored1b561502
-
Anders Jonsson authorede0fd8a31
-
Daniel Mustieles authored7e6080ef
-
Zander Brown authored0ce896a9
-
Matej Urbančič authored6eecbfd8
-
Emin Tufan Çetin authored01d57ab6
-
Ask Hjorth Larsen authoredb331ca57
-
Fran Dieguez authored5c24534f
-
Kukuh Syafaat authoredd6110694
-
Philipp Kiemle authoredb3f017a6
-
Michael Catanzaro authored
It seems we have no tests to see if these errors work or not, because the code is comparing a GTlsConnectionBaseStatus code to a GnuTLS error code. It has been broken since 0e94c20a. The code previously used "status" as the name for a GnuTLS error code, then changed it to be a GTlsConnectionBaseStatus in that commit. Alas, I should have used a different intermediary name instead, which would have caught this as a compiler error. Getting the tests to return particular errors is likely impractical. Let's just fix this and move on.
33176710 -
Michael Catanzaro authored
Turns out the current code to guess whether to return G_TLS_ERROR_CERTIFICATE_REQUIRED is racy. With TLS 1.2, the client would see a handshake failure if a client certificate was required but not provided (or not accepted). That's no longer the case with TLS 1.3; instead, the client will see a successful handshake before it sees the server close the connection. GnuTLS is no longer able to indicate *why* the connection was closed unless the server sends GNUTLS_A_CERTIFICATE_REQUIRED, but we don't support alerts yet, #65. In the meantime, we're stuck using a heuristic to decide whether to return G_TLS_ERROR_CERTIFICATE_REQUIRED: if the server requested a certificate, and we did not provide one, and an operation fails, and we have never successfully done any operation after the handshake, then assume the server rejected our certificate and return G_TLS_ERROR_CERTIFICATE_REQUIRED. This behavior was added in 14be4745. However, there in a window of time during which the client may see write operations succeed even though it failed to provide an acceptable certificate and the connection is about to be closed by the server. If a write succeeds, then our heuristic to decide whether to return G_TLS_ERROR_CERTIFICATE_REQUIRED fails. So let's change the heuristic to check only for reads instead. A read can never succeed because a properly-implemented server would not write any data before it verifies that the client certificate is acceptable. This commit fixes 14be4745. It's sort of covered by existing tests, in that we have tests that check for G_TLS_ERROR_CERTIFICATE_REQUIRED, although they don't seem to be tripping this race. We have a libsoup test /ssl/tls-interaction that is really hitting this race, although this change won't be enough to fix that test, because that test needs to be changed to no longer expect the TLS 1.2 behavior.
09485fc9 -
Changwoo Ryu authoredb17c8fab
-
Мирослав Николић authored83c1a573
-
Guillaume Bernard authored91ef9fdd
-
Michael Catanzaro authored7de313f8
-
Piotr Drąg authored46c45306
-
Milo Casagrande authored33ebb22f
-
Michael Catanzaro authored
Use bash, because 'read -p' is a bashism. Use 'set -e' to give up on error, or shellcheck will complain that we don't check whether cd fails. Remove an unused variable. Note this commit does not violate hard code freeze because this script is only run manually by glib-networking maintainers.
7ed5c466 -
Michael Catanzaro authored
Coverity noticed that if g_tls_connection_base_handshake_thread_request_certificate() returns FALSE here, we call g_tls_certificate_gnutls_copy_free() twice with the same data. It's obvious and should never have happened. Oops.
8b2fd943 -
Michael Catanzaro authoredc02cc94b
-
Nathan Follens authored760f9e2a
-
Michael Catanzaro authored
All priv members need to be locked, including priv->trust_list. Although it is read-only once it is initialized, apparently still not safe to share across threads. We also need to lock priv->verify_chain_cancellable. https://bugzilla.redhat.com/show_bug.cgi?id=1937513
8c034ff0 -
Pawan Chitrakar authored57b3cdbd
-
Michael Catanzaro authored
This reverts commit 248003f3. This is not quite ready yet, and I don't want to maintain it on the GLib 2.68 branch. See #160 for details on further work required.
a3e1e22e -
Michael Catanzaro authored8433a2d9
-
Iain Lane authoredd8e91167
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.