-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
gpg modules list_keys function does not handle keys with a trust of 'revoked' #54347
Comments
Applying the following patch to salt/modules/gpg.py seems to address the issue:
|
looks like im also able to replicate this. mind pushing that up with as a PR with a regression test? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Thank you for updating this issue. It is no longer marked as stale. |
Try to present gpg to master:
|
Description of Issue
When attempting to use the gpg.list_keys() module (https://docs.saltstack.com/en/2018.3/ref/modules/all/salt.modules.gpg.html#salt.modules.gpg.list_keys), keys that have a 'revoked' trust cause a KeyError.
An example (heavily redacted) of a key that throws the above error:
Setup
Steps to Reproduce Issue
simplisticly:
create a gpg key with multiple pub and/or sub keys.
revoke one or more of them.
import the key into your ring.
run
salt-call gpg.list_keys
Versions Report
Master versions:
Minion versions:
The text was updated successfully, but these errors were encountered: