Bug 333079

Summary: kcmshell4 kcm_ssl fails to list files other than *.der and fails to import der certificates
Product: [Frameworks and Libraries] kio Reporter: Florian Reinhard <florian.reinhard>
Component: ksslAssignee: Konqueror Developers <konq-bugs>
Status: CONFIRMED ---    
Severity: normal CC: adawit, bugsnmd, guido-kdebugs, registrace, simonandric5
Priority: NOR    
Version: 4.12.97   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Florian Reinhard 2014-04-04 16:50:31 UTC
kcmshell4 file_types lists *.cert, *.crt, *.der, *.pem as valid file types. 

Reproducible: Always

Steps to Reproduce:
1. wget http://www.cacert.org/certs/root.crt
2. wget http://www.cacert.org/certs/root.der
3. kcmshell4 kcm_ssl
4. Click the "Add" button on the lower right corner.
5. choose root.der
Actual Results:  
1. root.der will not be imported. it fails silently, there's just a kDebug output in CaCertificatesPage::addCertificateClicked
2. root.crt will not be displayed in the KFileDialog. if you empty the "Filter" you'll be able to select it and sucessfully import it.

Expected Results:  
1. import root.der or display a message what's wrong, never ever fail silently!
2. display .pem, .crt, .cert files in the file dialog
Comment 1 Dawit Alemayehu 2014-11-07 03:15:12 UTC
The only valid things from this bug report today are:

1. There is no message shown when importing fails.
2. *.der files are not imported at all.

The second one seems to be a bug in QSslCertificate::fromPath. I have a patch that changes that to use QSslCertificate::fromDevice instead and that seems to work fine. The first issue is something that should be fixed, but due to message freezes, cannot be fixed in the current 4.x branch. Perhaps it can be resolved in the KDE frameworks branch.
Comment 2 Dawit Alemayehu 2014-11-17 05:32:32 UTC
Git commit 0d9d4ddd35e44ee811b43d93bb8e0968008ffa76 by Dawit Alemayehu.
Committed on 09/11/2014 at 06:13.
Pushed by adawit into branch 'KDE/4.14'.

Use QSslCertificate's fromDevice instead fromPath to import certificates.

QSslCertificate::fromPath seems to have problem importing certs in DER format.
REVIEW: 121092

M  +7    -3    kio/kssl/kcm/cacertificatespage.cpp

http://commits.kde.org/kdelibs/0d9d4ddd35e44ee811b43d93bb8e0968008ffa76
Comment 3 Dawit Alemayehu 2014-11-17 06:07:12 UTC
*** Bug 210356 has been marked as a duplicate of this bug. ***
Comment 4 NMD 2014-12-07 17:04:08 UTC
great, thanks for fixing that Dawit - look forwards to seeing the functionality make its way through.
Cheers.
Comment 5 Justin Zobel 2021-03-10 00:15:37 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.