After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761092 - glib-networking: merge tls split
glib-networking: merge tls split
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: network
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-01-25 15:54 UTC by Ignacio Casal Quinteiro (nacho)
Modified: 2017-10-17 20:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a generic HAVE_TLS flag to build the tests (1.11 KB, patch)
2016-01-25 15:54 UTC, Ignacio Casal Quinteiro (nacho)
reviewed Details | Review
Split tests to take into account the backend (4.21 KB, patch)
2016-01-25 15:57 UTC, Ignacio Casal Quinteiro (nacho)
reviewed Details | Review
tls: split out non-gnutls-specific code from gnutls backend (165.81 KB, patch)
2016-01-25 15:58 UTC, Ignacio Casal Quinteiro (nacho)
reviewed Details | Review

Description Ignacio Casal Quinteiro (nacho) 2016-01-25 15:54:07 UTC
The tls split branch refactors out some of the code from the gnutls backend creating some base classes that can be used by other implementation, i.e the openssl one.

One of the reasons to not merge this was the conflicts it would get with the DTLS merge, though we know already that the dtls support will not get merged this release so I wonder if we should get this already in. It has been tested with gnutls and openssl.
Comment 1 Ignacio Casal Quinteiro (nacho) 2016-01-25 15:54:57 UTC
Created attachment 319687 [details] [review]
Add a generic HAVE_TLS flag to build the tests
Comment 2 Ignacio Casal Quinteiro (nacho) 2016-01-25 15:57:51 UTC
Created attachment 319688 [details] [review]
Split tests to take into account the backend
Comment 3 Ignacio Casal Quinteiro (nacho) 2016-01-25 15:58:39 UTC
Created attachment 319689 [details] [review]
tls: split out non-gnutls-specific code from gnutls backend

Create GTlsConnectionBase, GTlsInputStreamBase, GTlsOutputStreamBase,
which implement the generic "translate from a BSD-sockets-y API to the
GTlsConnection API" semantics, and rebase GTlsConnectionGnutls on top
of that.
Comment 4 Dan Winship 2016-02-21 14:12:26 UTC
(In reply to Ignacio Casal Quinteiro (nacho) from comment #0)
> One of the reasons to not merge this was the conflicts it would get with the
> DTLS merge, though we know already that the dtls support will not get merged
> this release so I wonder if we should get this already in. It has been
> tested with gnutls and openssl.

Given that this changes a lot of code, but doesn't add any new functionality (for gnutls users), I think it would be better to wait until after 2.48.0, and then merge this right after branching so there's plenty of time to shake out bugs before it hits a stable release.
Comment 5 Olivier Blin 2016-09-15 08:30:47 UTC
(In reply to Dan Winship from comment #4)
> Given that this changes a lot of code, but doesn't add any new functionality
> (for gnutls users), I think it would be better to wait until after 2.48.0,
> and then merge this right after branching so there's plenty of time to shake
> out bugs before it hits a stable release.

Is it a good time to merge this in master now?
Comment 6 Michael Catanzaro 2017-10-17 15:18:23 UTC
Now that glib-openssl is a separate module, this is not needed anymore, right Ignacio?

I don't think extending glib-networking to support multiple TLS backends is a good idea, since it will make glib-networking maintenance significantly more difficult, will result in us maintaining a backend that is effectively a second-class citizen, and it's already possible to completely replace the entire GTlsBackend. I suspect it's better for both glib-networking and glib-openssl for these to be maintained as separate modules going forward. Do you agree?
Comment 7 Ignacio Casal Quinteiro (nacho) 2017-10-17 15:27:20 UTC
Hey Michael, yeah I think it makes sense to close this bug report. BTW maybe it makes sense to have a look at glib-openssl's last patches since we fixed several vulnerabilities pointed out by testssl.sh and maybe it might make sense to port them to glib-networking
Comment 8 Michael Catanzaro 2017-10-17 16:18:05 UTC
I'll definitely check out testssl.sh, didn't know about that.

BTW I don't see any commits there that look immediately useful for glib-networking, except the one that disables rehandshaking entirely (which doesn't seem desirable?). Is there any one in particular that you want to suggest we take?
Comment 9 Dan Winship 2017-10-17 20:15:00 UTC
> Now that glib-openssl is a separate module, this is not needed anymore, right Ignacio?

FWIW the plan had always been that glib-openssl would be a separate module and not supported by the GLib maintainers. This bug was just about abstracting out the parts that could be shared between the two modules. (Though we never figured out for sure if the next step was "move those parts into glib as public types", "create a glib-networking-devel with those types" or "just let glib-openssl cut+paste them".)