While I can determine the trust level I have placed on an individual OpenPGP public key by using the --edit-key command, is there a simple way to list all the public keys along with their trust levels from the command line?
Asked
Active
Viewed 1.0k times
2 Answers
14
You can export all configured owner trust through gpg --export-ownertrust. The output is of the form
FINGERPRINT:TRUST:
For my own key (which has ultimate trust on my machine), there is following line included:
0D69E11F12BDBA077B3726AB4E1F799AA4FF2279:6:
It seems the trust level is corresponds to the number entered in the trust edit command plus one:
1 = I don't know or won't say (export: 2)
2 = I do NOT trust (export: 3)
3 = I trust marginally (export: 4)
4 = I trust fully (export: 5)
5 = I trust ultimately (export: 6)
The output of this command can also be imported again through gpg --import-ownertrust.
Jens Erat
- 18,485
- 14
- 68
- 80
1
I wrote a small script to do this more easily: gpg-list-ownertrust.py
It is based on the python-gnupg library, which fortunately makes access to the ownertrust level very convenient.
F30
- 111