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 543455 - Add overrides for TLS CA files, CRLs, mandatory minimum validation flags
Add overrides for TLS CA files, CRLs, mandatory minimum validation flags
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: network
2.27.x
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2008-07-17 16:13 UTC by Matt McCutchen
Modified: 2017-10-17 14:37 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Make libsoup recognize SOUP_SSL_CA_FILE environment variable (728 bytes, patch)
2008-12-12 19:21 UTC, Matt McCutchen
none Details | Review
Make libsoup recognize SOUP_SSL_CA_FILE environment variable (applies to 2.32.1) (877 bytes, patch)
2011-01-12 00:57 UTC, Matt McCutchen
none Details | Review

Description Matt McCutchen 2008-07-17 16:13:34 UTC
gvfs should provide a way to specify a CA file to libsoup to validate the certificate of a https server it is accessing.  Currently libsoup defaults to not validating the certificate, and there is no obvious way to override that default.  An environment variable or gconf setting for the CA file would work.
Comment 1 Christian Kellner 2008-12-12 18:35:32 UTC
Agreeed, but I guess we need something like a gobal certificate store somewhere (soup?).
Comment 2 Matt McCutchen 2008-12-12 19:20:06 UTC
Ideally there would be a global certificate store.  Fedora is working on this:

https://fedoraproject.org/wiki/FedoraCryptoConsolidation

and I also see some discussion of certificates and libsoup in bug 507802.

In the meantime, yes, let's move this to libsoup; then it will benefit Evolution's retrieval of calendars over https (another app I use) as well as gvfs.  In fact, I wrote a small patch to libsoup that recognizes an environment variable SOUP_SSL_CA_FILE, and I have been using the patched libsoup as an interim solution; I'll attach the patch.

Note that to affect gvfs, the environment variable has to be set quite early in the login process.  On Fedora 9, I had to create my own script in /etc/X11/xinit/xinitrc.d that would source ~/.xprofile, and then I sent the environment variable there.
Comment 3 Matt McCutchen 2008-12-12 19:21:16 UTC
Created attachment 124547 [details] [review]
Make libsoup recognize SOUP_SSL_CA_FILE environment variable

Applies to Fedora 10's libsoup-2.24.2.1-1.fc10 .
Comment 4 Matt McCutchen 2008-12-12 19:23:32 UTC
So, in the context of libsoup, this enhancement request is: allow a default SSL CA file to be specified via environment variable for the benefit of apps that are too naive to let the user set the CA file, including gvfs and Evolution (for http calendars).
Comment 5 Bastien Nocera 2008-12-13 00:09:44 UTC
Except that won't work for gvfs, as http will be running out-of-band, in a process that's not spawned by the application.
Comment 6 Matt McCutchen 2008-12-13 03:26:12 UTC
gvfs checked the certificate just fine if I set the environment variable early enough in the xinit process that gvfsd picked it up.
Comment 7 Dan Winship 2009-01-17 15:17:10 UTC
oops, this got moved to libsoup but not reassigned
Comment 8 Dan Winship 2010-11-09 16:26:08 UTC
TLS code is being moved to gio (bug 588189) and libsoup will be ported to use that (bug 634425). The gio code defaults to draconian certificate validation using the system CA file, although libsoup will need to turn that off by default to preserve backward compatibility.

It probably makes more sense to put this into gsettings than environment variables, and then the problem of setting it early enough in login is avoided.
Comment 9 Matt McCutchen 2011-01-12 00:57:05 UTC
Created attachment 178103 [details] [review]
Make libsoup recognize SOUP_SSL_CA_FILE environment variable (applies to 2.32.1)

For anyone still interested in the issue as originally reported, here is an updated patch that applies cleanly to libsoup 2.32.1.
Comment 10 Michael Catanzaro 2017-10-17 14:37:17 UTC
This looks quite obsolete.