% [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,cmd1,cmd2, i=0,key, tmpfile=".slrn.pgp-tmpfile"; 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="pgp +VERBOSE=0 -o /dev/null"; i = system(Sprintf("%s '%s'", cmd, tmpfile, 2)); % i = system(Sprintf("%s '%s' %s", cmd, tmpfile, "> /dev/null 2>&1", 3)); if(i==0) { s=sprintf("Returnvalue: %d (Good Signature)", i/256); } else { s=sprintf("Returnvalue: %d (something was wrong!)", i/256); } error(s); return(); } definekey ("pgp_check_signature", "\e[15~", "article"); % F5 % s=article_as_string(); % cmd="pgp-slrn-checksig"; % i = system(Sprintf("%s '%s'", cmd, s, 2)); % cmd1="/bin/echo"; % cmd2=" |pgp -f >/dev/null ; sleep 5"; % i = system(Sprintf("%s '%s' %s", cmd1, s, cmd2, 3)); % cmd1="/bin/echo"; % cmd2=" |pgp-slrn-checksig ; sleep 5"; % i = system(Sprintf("%s '%s' %s", cmd1, s, cmd2, 3)); % pipe_article("pgp -f >/dev/null"); %% pipe_article("pgp-slrn-checksig"); % s=getenv ("?"); % if (s!=NULL) % { % i=5; % } % s=sprintf("Return is: %d",i); % error(s); % key=getkey(); % ()=read_mini("(press return)",s,""); %}