Page MenuHome GnuPG

GpgEX: internal error when trying to verify a non-signature file
Closed, ResolvedPublic

Description

I am using v3.0.2.
Let's say you have a file named A.exe and in the same folder a signature file named A.exe.asc.
If you right click on A.exe and do More GpgEX options -> Verify you get an error dialog reading:

Error returned by the GnuPG user interface (Kleopatra):
Internal error

If you do the same on A.exe.asc, verification works fine.

v2.3.3 verifies correctly the file even if you right click on A.exe instead of the signature file.

This is a regression.

Details

Version
3.0.2

Event Timeline

aheinecke triaged this task as Normal priority.
aheinecke added a project: kleopatra.
aheinecke added a subscriber: aheinecke.

Thank you for your report. I can reproduce this problem. Kleopatra correctly looks for the signature file but then fails to set the protocol. This results in an internal error.

Will be fixed.

@aheinecke thanks for the fix. But I have a suggestion for the code(I only looked at the diff):

Why not use the variable you created earlier?
So instead of

t->setProtocol(findProtocol(classification));

do

t->setProtocol(proto);

It seems simpler and more efficient, than performing the lookup again.

Indeed, thanks for the note. I added the variable only later on for the check of protocol unknown and overlooked to update the setProtocol call.
I've updated the code accordingly.