Page MenuHome GnuPG

Kleopatra: X509 import needs to be offline
Open, NormalPublic

Description

With keyboxd now more ready for prime time we want users to try it out. The way to try it out will be to export all their certificates using Kleopatra and then reimporting them after switching to keyboxd.

For X509 this does not work well on reasonably dirty keyrings because it will both try to fetch missing issuer certificates and CRLs and run into a ton of dirmngr timeouts. On my Linux system the difference is 48 minutes to import my 800 S/MIME certificates. While it takes 1.6 seconds with --disable-dirmngr.

While it might be nice to have the CRL check / issuer certificate check done when importing only a one certificate i think it should be offline at first. This is anyway more in line with what kleopatra would show when the keyring was already imported because the initial keylisting would be offline.

Optionally If we then see in the import results that only, say less then 5 certificates were imported then we could maybe do a keylist with validation / crl checks on them right after import?

Event Timeline

aheinecke created this task.

There is already an additional handleExternalCMSImports which does

// For external CMS Imports we have to manually do a keylist
// with validation to get the intermediate and root ca imported
// automatically if trusted-certs and extra-certs are used.

But that step is part of the import and thus it won't make the import faster if we do this also for local imports. If we add a special case, then I'd add it just for a single leaf-certificate.

Note: The gpgsm engine of GpgME supports the offline flag (which maps to --disable-dirmngr) only for keylist operations. gpgsm_import doesn't even have an engine_flags argument.

Yes this is no longer required since we use a script now.

aheinecke lowered the priority of this task from High to Wishlist.

Well better to wishlist this. As a user might still import a bulk of S/MIME certificates.

aheinecke raised the priority of this task from Wishlist to Normal.Aug 14 2023, 10:18 AM
ikloecker added a subscriber: ikloecker.