Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jweveland (1446)

jweveland
  useperlNO@SPAMjwenet.net
http://jwenet.net/


yet another perl hacker...
local [perl.org]  journals [perl.org]  http://jwenet.net [jwenet.net]

Journal of jweveland (1446)

Monday October 25, 2004
01:49 PM

converting pgp to gnupg

[ #21509 ]
I have a large installed population of pgp keys that want to migrate to gpg / gnupg. This turns out to be easier to automate than I would have guessed... just run the following script over each set of keys:

#/bin/bash
gpg --import </dev/null      # force existence of dir, options, perms, etc.

KEYLIST=`pgp -kv 2>/dev/null |grep ' 0x' |cut -f4 -d' '`
KEYRINGS=".pgp/pubring.pkr .pgp/secring.skr"
TMPFILE=".gnupg/tmpkey$$"

for KEY in $KEYLIST ; do
    for RING in $KEYRINGS ; do
        pgp -kx $KEY $TMPFILE $RING
        if [ -r $TMPFILE ] ; then
            gpg --import $TMPFILE
            rm $TMPFILE
        fi
    done
done

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.