diff options
author | Werner Koch <[email protected]> | 2006-08-21 20:20:23 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2006-08-21 20:20:23 +0000 |
commit | 0ebd23fa76e5af72ad3dc33144efa45500101a1b (patch) | |
tree | f5b5f10a242e8d597c7fc599663a455350f0c43b /tools/lspgpot | |
parent | disconnectafter wake-up bug fix by Bob Dunlop. (diff) | |
download | gnupg-0ebd23fa76e5af72ad3dc33144efa45500101a1b.tar.gz gnupg-0ebd23fa76e5af72ad3dc33144efa45500101a1b.zip |
Migrated more stuff to doc/
Migrated the gpg regression tests.
Some changes tp the gpg code to fix bugs and
for the use in testing.
make distcheck works now with gpg enabled.
Diffstat (limited to 'tools/lspgpot')
-rwxr-xr-x | tools/lspgpot | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/lspgpot b/tools/lspgpot new file mode 100755 index 000000000..f406392eb --- /dev/null +++ b/tools/lspgpot @@ -0,0 +1,27 @@ +#!/bin/sh +# lspgpot - script to extract the ownertrust values +# from PGP keyrings and list them in GnuPG ownertrust format. +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +if ! gpg --version > /dev/null 2>&1 ; then + echo "GnuPG not available!" + exit 1 +fi + +gpg --dry-run --with-fingerprint --with-colons $* | awk ' +BEGIN { FS=":" + printf "# Ownertrust listing generated by lspgpot\n" + printf "# This can be imported using the command:\n" + printf "# gpg --import-ownertrust\n\n" } +$1 == "fpr" { fpr = $10 } +$1 == "rtv" && $2 == 1 && $3 == 2 { printf "%s:3:\n", fpr; next } +$1 == "rtv" && $2 == 1 && $3 == 5 { printf "%s:4:\n", fpr; next } +$1 == "rtv" && $2 == 1 && $3 == 6 { printf "%s:5:\n", fpr; next } +' |