diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2009-02-19 01:17:11 -0500 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2009-02-19 01:17:11 -0500 |
commit | dd1914ec0225cca711508dfd1351502040b6ec87 (patch) | |
tree | 960d0450fc5a88b52600d1ed328dd060e3c7c6cb /src/share/common | |
parent | 68299f9faebcf3c54382aca3d662b35172f6a968 (diff) |
made gpg_sphere use --quiet again, and now doing more explicit extraction of key fingerprint during add-certifier from file.
Diffstat (limited to 'src/share/common')
-rw-r--r-- | src/share/common | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/share/common b/src/share/common index 6b7d51b..b78f64a 100644 --- a/src/share/common +++ b/src/share/common @@ -1100,3 +1100,14 @@ process_authorized_user_ids() { update_authorized_keys "${userIDs[@]}" } + +# takes a gpg key or keys on stdin, and outputs a list of +# fingerprints, one per line: +list_primary_fingerprints() { + local file="$1" + local fake=$(msmktempdir) + GNUPGHOME="$fake" gpg --no-tty --quiet --import + GNUPGHOME="$fake" gpg --with-colons --fingerprint --list-keys | \ + awk -F: '/^fpr:/{ print $10 }' + rm -rf "$fake" +} |