summaryrefslogtreecommitdiff
path: root/scripts/pgp-list-keyids
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-15 16:53:59 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-15 16:53:59 -0400
commitc10faa5b2b617d5d62407567cd8d495d7ddddeb6 (patch)
tree6181f3a1e71403cc1e54c32ca244c819040c9562 /scripts/pgp-list-keyids
parent1a435c0f4b41904025d0f263734cb9aea6a03b13 (diff)
git mv bin scripts
Diffstat (limited to 'scripts/pgp-list-keyids')
-rwxr-xr-xscripts/pgp-list-keyids21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/pgp-list-keyids b/scripts/pgp-list-keyids
new file mode 100755
index 0000000..9682b1a
--- /dev/null
+++ b/scripts/pgp-list-keyids
@@ -0,0 +1,21 @@
+#!/usr/bin/env ruby
+# Usage: pgp-list-keyids
+
+load "#{File.dirname(__FILE__)}/common.rb"
+
+load_all_users.each do |uid,user|
+ if user["groups"]
+ if user["groups"].include?("keyring-trusted")
+ puts "trusted/#{user["username"]} #{user["pgp_keyid"]}"
+ elsif user["groups"].include?("keyring-secondary")
+ puts "secondary/#{user["username"]} #{user["pgp_keyid"]}"
+ elsif user["pgp_keyid"]
+ #puts "revoked/#{user["username"]} #{user["pgp_keyid"]}"
+ end
+ end
+ if user["pgp_revoked_keyids"]
+ user["pgp_revoked_keyids"].each do |keyid|
+ puts "revoked/#{user["username"]} #{keyid}"
+ end
+ end
+end