Kleopatra: On Linux, creating S/MIME encrypted archive of multiple files for certificate with bad CRL fails with input/output error
Closed, ResolvedPublic

Assigned To
Authored By
• ikloecker
Apr 21 2026, 4:45 PM

Description

I ran into this problem while testing my changes for T6702: Kleopatra: Offer retry of S/MIME encryption if encryption failed with "not trusted". I'm pretty sure that this also happens with Gpg4win 5.0.2.

To reproduce:

  • Configure de-vs compliance for gpg and gpgsm and force beta compliance. (This step might be optional.)
  • Import the certificates from T6702#216065.
  • Try to encrypt multiple files with one of the Bob certificates.

Expected result:
Encryption fails with some CRL related error (e.g. "host not found"). (This could then be handled as in T6702: Kleopatra: Offer retry of S/MIME encryption if encryption failed with "not trusted".)

Actual result:
Encryption fails with "Input/output error".

Event Timeline

• ebo triaged this task as Normal priority.Apr 23 2026, 3:00 PM

I do not see this in Gpg4win 5.0.2. For me the result is "unknown host" without the beta compliance for one of the certificates, "invalid CRL object" for the other.

After setting compliance for gpg, the operation hangs (seemingly forever) at "C:\Program Files\GnuPG\bin\gpgtar.exe" --utf8-strings --cms --skip-crypto --output - --encrypt -T- --null -- for the the first invalid certificate. After aborting this, the gpgtar process is gone, but the gpgsm process remains.
This should be due to T8187: Kleopatra: File encryption with invalid S/MIME certificate hangs indefinitely. The other certificate again returns the expected "invalid CRL object"

This seems to happen only on Linux where tar is used for creating the archive. If I change pack-command-cms (in libkleopatrarc) to 0|gpgtar --utf8-strings --cms --skip-crypto --output - --encrypt -T- --null -- (which is basically the same as used on Windows) then the problem doesn't occur. Apparently, tar behaves differently than gpgtar.

I'll create a blocking ticket which proposes to use gpgtar also on Linux.

• ikloecker renamed this task from Kleopatra: Creating S/MIME encrypted archive of multiple files for certificate with bad CRL fails with input/output error to Kleopatra: On Linux, creating S/MIME encrypted archive of multiple files for certificate with bad CRL fails with input/output error.May 5 2026, 12:12 PM
• ikloecker added a project: Linux.

Further tests show that this has nothing to do with tar vs. gpgtar. It turns out that the "Input/output error" does *not* occur if the archive file already exists and Kleopatra asks if the file should be overwritten. Further tests show that this seems to be a timing issue.

The current working hypothesis is:
If tar/gpgtar has finished archiving the input files before gpgsm exits with an error then tar/gpgtar don't "crash" and no "Input/output error" occurs. Otherwise, tar/gpgtar "crash" (according to QProcess) which might actually be a SIGPIPE because the stdout pipe is closed.

• ikloecker changed the task status from Open to Testing.May 7 2026, 5:45 PM
• ikloecker moved this task from Backlog to WIP on the gpd5x board.

Fixed. This only occurred on Linux, i.e. it should be tested with the AppImage.

• ikloecker mentioned this in Unknown Object (Maniphest Task).May 11 2026, 9:54 AM
timegrid changed the edit policy from "All Users" to "Contributor (Project)".
timegrid added projects: AppImage, test on hold.

Question:


Looks good to me on gpg4linux-5.2.0-beta890 (gpg-2.5.24) @ ubuntu26.04:

  • inaccessible

  • invalid

Note: On gpg4linux-5.2.0-beta890 (gpg-2.5.24) @ kubuntu26.04 for the inaccessible case I got: "Keine Route zum Zielrechner"

Maybe on ubuntu some system gpg component interfered.

timegrid closed this task as Resolved.EditedTue, Nov 17, 11:53 AM
timegrid claimed this task.

Ok, i think, everything is fine. Given crlDistributionPoints = URI:http://gnupg.test/crl.pem and:

  • no gnupg.test entry in /etc/hosts -> "Unbekannter Rechner"
  • gnupg.test entry in /etc/hosts to an ip in a virtualbox host only network
    • without virtualbox host only network attached -> "Verbindungsaufbau abgelehnt".
    • with virtualbox host only network attached and
      • no webserver running -> "Keine Route zum Zielrechner"
      • webserver running (but file not found) -> "Keine CRL bekannt"
timegrid edited projects, added gpd5x (gpd-5.2); removed gpd5x.

no gnupg.test entry in /etc/hosts -> "Unbekannter Rechner"

I really hate that translation of "Unknown Host". It is coming from kio6. I'd suggest a change in the German KDE translators list, ideas: "Unbekannter Anbieter", "Server nicht gefunden", "Unbekannter Servername".
Any more ideas? If you agree, I'll propose the above or whatever else we come up with.

"Unknown host" and the translation are both from libgpg-error. There's no KF involved.