Skip to content

Possible bug in skipping keys when keyIDs don't match #85

@trishankatdatadog

Description

@trishankatdatadog

Currently, this line appears to be incorrectly skipping a key when its keyID don't match the one from the signature.

For example, if the key's keyID is missing and needs to be computed, then the error would be nonnil, and the keyID would be empty, but it appears that the IF condition above wouldn't catch it.

The IF condition above seems to be making the mistake of doing two things in one (handling edge cases and but also catching an error). The impact shouldn't be high as the next error handling should ultimately skip any mismatching keys anyway (unless there is a bug in the key's verifier itself). I recommend simplifying the IF condition do to what was actually intended.

Cc @adityasaky

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions