Slash Boxes
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)


yet another perl hacker...
local []  journals [] []

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:

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"

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

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