Skip to content

invalid user ID when a revoked key is listed after a good key #35

Description

@JulienPalard

My gpg --lisk-keys lists a revoked key after my current key.

The current implementation for isvalid:

            for line in out.split('\n'):
                record = line.split(':')
                if record[0] == 'pub':
                    trust = record[1]
            if trust not in trusted:
                return False

only checks the trust level of the last found key, so in my setup I'm getting the "invalid user ID" error.

It looks like LBYL to me: code hard to implement that miss some cases. Should the EAFP style be used instead by just trying to access the password store, and catching an exception as needed? I haven't read the project history I bet this code is here for a reason.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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