% [gpg-stuff.sl] 16.10.2001 Ralf Hüls % % Stuff for calling GnuPG from slrn % % Adapted from: % % [pgp-stuff.sl] 10.03.1998 René Scholz % % Stuff for calling PGP (2.6.3in for me) from slrn define pgp_check_signature () { variable s, cmd, i=0, tmpfile=".slrn.pgp-tmpfile"; if (is_group_mode) return (); i=save_current_article(tmpfile); if(i!=0) { error("Error while writing tempfile!"); return(); } cmd="gpg -q --verify"; i = system(Sprintf("%s '%s'", cmd, tmpfile, 2)); if(i==0) { s=sprintf("Returnvalue: %d (Good Signature)", i/256); } else if(i==256) { s=sprintf("Returnvalue: %d (Bad Signature)", i/256); } else if(i==512) { s=sprintf("Returnvalue: %d (Missing Key!)", i/256); } else { s=sprintf("Returnvalue: %d (something was wrong!)", i/256); } error(s); return(); } definekey ("pgp_check_signature", "§", "article");