Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JulienPalard opened this issue Jan 19, 2024 · 0 comments
Open

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

JulienPalard opened this issue Jan 19, 2024 · 0 comments

Comments

@JulienPalard
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant