Summary: | Kleopatra (and KMail) need about 5 minutes to receive CRLs when CACert certificates are involved | ||
---|---|---|---|
Product: | [Applications] kleopatra | Reporter: | kolAflash <kolAflash> |
Component: | general | Assignee: | Andre Heinecke <aheinecke> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aheinecke, mutz |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdepim/94cad004c62f05ce47a471fb892ef4ffd513b317 | Version Fixed In: | |
Sentry Crash Report: |
Description
kolAflash
2014-09-25 15:24:02 UTC
The problem here is the following: - Kleopatra wants to get the information which S/MIME Certificates are trusted and which are not. To get this information it used GPGME_KEYLIST_MODE_VALIDATE. This is the only keylist mode that did Trustchain checks. - When GPGME_KEYLIST_MODE_VALIDATE is used gpgsm also does CRL checks on the certificates. This is bad for a full keylisting. I have ~60 S/MIME Certs in my keyring and event with all CRLs cached it took 1m40s to list all certificates because of CRL Checks for expired / broken certificates where dirmngr was unable to obtain a CRL and thus could not cache it and ran into timeouts each time. But even without broken certificates, the mentioned CA Cert certificates can take ages. Disabling CRL checks altogether is obviously bad and can not be the default. We want a CRL check when we encrypt to a certificate or verify a signature from a certificate. As this is the usual workaround for this bug though, this bug is probably compromising security a bit. To properly fix this we will disable CRL checks for the initial keylisting but leave them active for normal operations. This is a bit involved as it requires API changes to GnuPG, GpgME, GpgME++ and Kleopatra. We are currently working on this. (Thats why I take this bug) The first change required for this was part of gnupg 2.1.6 http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=2c9c46e2a2b8f9a1bdc1ef46a135b5fc7d1a8073 Theres also a patch available for gpgme: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpg4win.git;a=blob;f=patches/gpgme-1.5.5/0001-Add-offline-mode-support-for-CMS-keylisting.patch I also have uncommited patches avaiable for gpgme++ and kleopatra. But this depends on getting the patch into gpgme first. A fix for this will probably be part of the next gpg4win release. For GNU/Linux it might make sense only to fix this for KDE 5 as it depends on GnuPG 2.1 which is not yet part of the stable distributions. Git commit 94cad004c62f05ce47a471fb892ef4ffd513b317 by Andre Heinecke. Committed on 28/08/2015 at 08:27. Pushed by aheinecke into branch 'master'. Use offline mode for keylist with validation We need to list keys in keylist mode validate to get trust and trustchain information for X509 certificates. By default this includes CRL / OCSP checks. The new "offline" mode introduced with gpgsm 2.1.6 allows us to list all keys with validation but without consulting remote sources. This speeds up the time until Kleopatra is usable as an application or as an UI Server drastically as CRL checks can be infinitley slow and old keyrings with a lot of certificates might also include a lot of broken CRL servers that would be queried until the fetch operation times out. REVIEW: 124950 M +1 -1 CMakeLists.txt M +7 -0 libkleo/backends/qgpgme/qgpgmebackend.cpp http://commits.kde.org/kdepim/94cad004c62f05ce47a471fb892ef4ffd513b317 |