Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Verify does not handle missing sig data well #191

@sebbASF

Description

@sebbASF

This relates to detached signature verification:

If the .asc file is empty, verification fails, and the status is set to 'error - verify 4294967295'

That is OK, although the status is not very helpful.
However, if the asc file contains some text (but is not a valid sig), then verification fails and status is not set.
This does not seem right.
If debug is enabled, the following messages are shown:

[GNUPG:] NODATA 3
message ignored: NODATA, 3
[GNUPG:] NODATA 4
message ignored: NODATA, 4
gpg: no signature found
gpg: the signature could not be verified.
Please remember that the signature file (.sig or .asc)
should be the first file given on the command line.
gpg returned a non-zero error code: 2

I think it would be useful to process the NODATA messages.
The value 3 means 'Invalid packet found'; 4 means 'Signature expected but not found'
Either of those would be better as a status than None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions