Bug 342958 - SSL KCM doesn't save any added certificates
Summary: SSL KCM doesn't save any added certificates
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 376402 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-17 11:52 UTC by Elias Probst
Modified: 2017-02-17 03:54 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.31


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elias Probst 2015-01-17 11:52:31 UTC
When adding any certificates in the SSL KCM, they're not saved.
When restarting the KCM all custom certificates are gone from the "User-added certificates" branch and they're also not recognized by any applications.

Running KF5 from git master (kdelibs4support 6da9c53) + Qt 5.4.0.

kcmshell5 doesn't log any related messages on the terminal when applying the changes in the KCM.
Comment 1 Elias Probst 2015-01-17 15:59:16 UTC
It looks like this fails when ~/.local/share/kssl/userCaCertificates doesn't exist.
Neither the parent directory kssl nor userCaCertificates existed here.
After creating it manually, I was able to add custom CA certs successfully.
Comment 2 fetzt_doch 2015-12-04 22:20:39 UTC
Confirmed for Kubuntu 15.10
Creating ~/.local/share/kssl/userCaCertificates manually fixes this.
Comment 3 Florian Brunner 2017-01-09 20:48:45 UTC
Same issue here with Kubuntu 16.04.1 LTS

Creating the directory ~/.local/share/kssl/userCaCertificates did the trick.
Comment 4 Michael Pyne 2017-01-10 03:27:30 UTC
I think this is actually a bug in KIO; the cert saving/loading is actually implemented at kio/src/core/ksslcertificatemanager.cpp in the addCertificate() member function.

I've opened a review request for a potential fix at https://phabricator.kde.org/D4060
Comment 5 Michael Pyne 2017-01-11 02:11:36 UTC
Git commit d06e40bc1e84391640fc56a4c5ba252eaa9dcc6d by Michael Pyne.
Committed on 11/01/2017 at 02:10.
Pushed by mpyne into branch 'master'.

kssl: Ensure user certificate directory has been created before use.

The KSSL KCM (in kdelibs4support) fails to save imported certificates to
the user certificate store, unless the user store directory is manually
created by the user first.  Fix by ensuring the directory is created
before trying to save user certs.

Differential Revision: https://phabricator.kde.org/D4060
FIXED-IN: 5.31

M  +2    -2    src/core/ksslcertificatemanager.cpp

https://commits.kde.org/kio/d06e40bc1e84391640fc56a4c5ba252eaa9dcc6d
Comment 6 Michael Pyne 2017-02-17 03:54:28 UTC
*** Bug 376402 has been marked as a duplicate of this bug. ***