Skip to content

Make no assumption about the length of signature file name extension

Carlo Vanini requested to merge work/sign-file-extension into master

When verifying a detached signature, the length of the file name extension was assumed to be 3 characters. Four characters were stripped from the signature file name, and that is assumed to be the file to verify.

This fails for signatures named *.sign. For instance, Debian images are released along with respective SHA512SUMS and SHA512SUMS.sign. Kleopatra looks for a data file named SHA512SUMS. (notice the dot at the end).

Steps to reproduce

  • Place both files (SHA512SUMS, SHA512SUMS.sign) in the same directory
  • Open Kleopatra and click Decrypt/Verify
  • Select the signature file

A dialog appears saying the file [...]/SHA512SUMS. could not be found.

Merge request reports