Kleopatra: Don't use dirmngr if it has been disabled
Testing, NormalPublic

Assigned To
Authored By
ebo
Tue, Jun 23, 2:55 PM

Description

We have some customers who have an offline computer for sensitive data. There, dirmngr should not be started except to manually import crls retrieved via another machine. We advise such customers to set disable-dirmngr in gpg.conf and gpgsm.conf and set disable-crl-checks in the latter file, too.

There are some occasions where the dirmngr is started, for regular S/MIME CRL-checks (those arecovered by the above settings) for pubkey search or -update via WKD and (on current master) to connect to AD on Windows, when suggesting Name an Mail when generating a keypair or CSR.

At the very least Kleopatra should honor the disable-dirmngr settings in gpg.conf and gpgsm.conf in all cases. For 3.3.7 and 5.0.2 the dirmngr is startet for WKD searches despite the settings and for master later than 5.0.2 dirmngr is started generally after startup (for the AD search which then needs dirmngr because of T6094).

But I would like to have a Registry key for Kleopatra, e.g. "Offline", which would with one setting set all the sensible settings for that case at once without needing to go to the config files. This would be easier for customers to configure. The regkey should set disable-dirmngr for gpg and gpgsm and disable-crl-checks, too.

Details

Version
Gpg4win-5.0.2 and VSD 3.3.7

Event Timeline

ebo created this object with edit policy "Contributor (Project)".

If a general "offline" option is wanted then it has to be in GnuPG. Kleopatra shouldn't mess with the configuration of GnuPG by setting disable-dirmngr for gpg and gpgsm. In any case, in my opinion, such an option deserves a ticket of its own. For this ticket I will only ensure that the disable-dirmngr options are respected by Kleopatra.

ikloecker renamed this task from Draft: Kleopatra: Don't use dirmngr if it has been disabled to Kleopatra: Don't use dirmngr if it has been disabled.Wed, Jun 24, 3:15 PM
ikloecker triaged this task as Normal priority.
ikloecker changed the task status from Open to Testing.Wed, Jun 24, 3:27 PM
ikloecker claimed this task.
ikloecker moved this task from Backlog to WIP on the gpd5x board.

Fixed.

  • Kleopatra won't start dirmngr on start-up on Windows if dirmngr is disabled for gpg and gpgsm.
  • gpgmeqt's AD query job will fail with "no dirmngr" error if dirmngr is disabled for gpg and gpgsm. Kleopatra ignores this error (after logging it) and will try the next source for prefilling name and email of new certificates.
  • Lookup on server and updating of certificates will give appropriate error messages if dirmngr is disabled for gpg and/or gpgsm.

I haven't touched any other actions that might trigger network access because those use gpg or gpgsm which should fail with an appropriate error if dirmngr is disabled.

The update check uses gpg-agent-connect --dirmngr "loadswdb --force" /bye to check for updates which very likely doesn't check if dirmngr is disabled. Since the update check is disabled for VSD and GPD (?) I chose not to touch the update check.