GpgTar: S/MIME decryption fails with input/output error
Closed, ResolvedPublic

Assigned To
Authored By
• ebo
Nov 29 2023, 3:33 PM

Description

When decrypting a .p7m file which contains a deep folder structure you get the following error.
(Decrypting the .gpg file for the same folder runs without issues.)

Only the text:

unicode.tar.gz.p7m → Eingabe von C:/Program Files (x86)/GnuPG VS-Desktop/GnuPG//bin/gpgtar.exe --utf8-strings --cms --skip-crypto ...: 
Entschlüsseln fehlgeschlagen: Input/output error.
Eingabefehler: Fehler während der Ausführung von C:/Program Files (x86)/GnuPG VS-Desktop/GnuPG//bin/gpgtar.exe: gpgtar: note: ignoring option --set-filename gpgtar: error creating directory 'unicode_1_/unicode/abcdefghijklmnopqrstuvwxyz 123 öäöß/😁🤞😎❓⁉ abcdefghijklmnopqrstuvwxyz Ä/😎❓⁉ abcdefghijklmnopqrstuvwxyz 1/😎❓⁉ abcdefghijklmnopqrstuvwxyz 2/😎❓⁉ abcdefghijklmnopqrstuvwxyz 3': No such file or directory

On the commandline the following will work:

C:\Users\g10code.WIN-TEST3\Documents>gpgsm -d unicode.tar.gz.p7m > unicode.tar.gz

C:\Users\g10code.WIN-TEST3\Documents>gpgtar -dv --skip-crypto unicode.tar.gz
gpgtar: extracting to 'unicode.tar.gz_3_/'
gpgtar: created   'unicode.tar.gz_3_/unicode/'
gpgtar: created   'unicode.tar.gz_3_/unicode/abcdefghijklmnopqrstuvwxyz 123 öäöß/'
gpgtar: extracted 'unicode.tar.gz_3_/unicode/abcdefghijklmnopqrstuvwxyz 123 öäöß/ein Name mit Léer zeichen und 🐱‍🐉.txt'
[...]

Event Timeline

This was already present in 3.1.26, where the error message was missing the output from gpgtar. So there was an improvement

• aheinecke raised the priority of this task from Normal to High.
• aheinecke added a subscriber: • aheinecke.

Lets make sure that we look into this for 3.3

For S/MIME archives we still use the old code. gpgtar doesn't even support gpgsm.

What happens if you call gpgtar with --utf8-strings --cms additionally to the other options? And what happens if you pipe the archive to gpgtar's stdin?

In any case, this looks like a problem in gpgtar unless it's related to wrong command line options.

• werner lowered the priority of this task from High to Normal.Apr 17 2024, 5:20 PM
• werner added a subscriber: • werner.

Nobody uses gpgtar for S/MIME

timegrid edited projects, added gpd5x, gnupg26; removed gnupg, Restricted Project.Dec 15 2025, 11:17 AM
• ebo closed this task as Resolved.EditedWed, May 6, 12:04 PM
• ebo claimed this task.
• ebo moved this task from Backlog to Done on the gpd5x board.

I retested this with VSD 3.3.7 and VSD-4.0 Beta, with the same data:

This worked now without any issues. (Even when using a smart card certificate which should be almost identical to the one used for the original test.)