Page MenuHome GnuPG

Make Kleopatra group configuration exportable
Testing, HighPublic


There should be a GUI interface to export and import the group definition in Kleopatra. An export file format should also include the actual keys and thus this feature might go into regular export and import dialogs.

Revisions and Commits

rLIBKLEO Libkleo
rKLEOPATRA Kleopatra
rW Gpg4win

Event Timeline

werner triaged this task as High priority.Oct 5 2021, 4:36 PM
werner created this task.
werner created this object with edit policy "Contributor (Project)".

While we should have an explicit Import setting I would also like to have a file extension like "kgrp" for key group, cgrp for certificate group is already used by another software.
So that we can register this with a file handler in windows so that such files can get an icon and a double click handler.

I was planning to export the certificates in the usual textual formats (.asc, .pem) with the information about the groups added as armor headers for OpenPGP and explanatory text for CMS. This would allow the certificates to be imported with any software supporting OpenPGP or X.509 certificates. When importing certificates Kleopatra simply looks for the additional group information and adds/updates the groups (probably after asking the user).

How would you handle a combination of X509 Certificates and PGP Certificates in that case? Wouldn't that require two files?

Yes, no, maybe. :-) Thanks for asking!

The new plan is to combine the ini-style group configuration already used by Kleopatra with the textual export of OpenPGP and X.509 certificates in a single file. gpg and gpgsm can import the certificates stored in such a combined file without problems. I hope KConfig doesn't get confused by the certificates.

ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

A first version has landed.

There are a few things that are still to do:

  1. When importing certificate groups the kdeglobals configuration files are read additionally to the certificate files because I'm using KConfig. Obviously, that can lead to unexpected results, if any of the kdeglobals files contain groups. Moreover, KConfig doesn't really like the certificate data that's stored together with the exported certificate groups. It reads the files, but it prints a lot of warnings to stderr.
  2. Allow exporting multiple groups at the same time.
  3. Update the groups in the group configuration dialog when groups are imported. The group configuration dialog is just hidden, if one closes it. When reopening the group configuration after importing certificate groups it still shows the old groups.
ikloecker changed the task status from Open to Testing.Nov 17 2021, 12:27 PM
ikloecker removed ikloecker as the assignee of this task.
ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

Ready for testing

Importing exported certificate group files from the file manager now also works, at least on XDG-compatible systems. I have also made sure that the application-certificate icon is used for those files in the Breeze icon theme.

Your item "2. Allow exporting multiple groups at the same time." is not really important. If you want to do that, please make sure that each group is exported to a separate file.

Actually, I have already implemented 1, 2, and 3. For now, I will disallow exporting multiple groups at the same time.