🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #82734

Re: [slrn] How do I get slrn to check PGP signatures ?

#82734
From: Jurriaan (note: this is a workin...
Date: Fri, 10 Aug 2001 18:45
78 lines
3882 bytes
On Fri, 10 Aug 2001 01:57:36 +0000 (UTC), Walter Dnes
<waltdnes@waltdnes.org> wrote:
> On Mon, 6 Aug 2001 02:21:33 +0200, Alexander Wasmuth, <alex@whizzo.wasmuth.org> wrote:
>>  * Walter Dnes <waltdnes@waltdnes.org>:
>>  
>> >   The manual and FAQ and example slrn.rc mention turning the display of
>> > PGP signatures on and off.  There is no mention of actually checking a
>> > PGP signature.  Does somebody have any pointers ?  If it involves slang
>> > macros, I'll need extensive hand-holding.
>>  
>>  Take a look at this page:
>>  
>>      http://digilander.iol.it/ebassi/slrn/index.html#macros
> 
> 
>   I looked it over and distilled it down to...
> 
> define verify_pgp ()
> {
>  pipe_article ("gpg --verify -;exit 1");
> }
> definekey ("verify_pgp", "v", "article");
> 
>   I find that I have to deliberately force an error status (non-zero
> exit) and a bash error message in order to see the output...
> 
> gpg: Signature made Sun 05 Aug 2001 07:05:02 PM EDT using DSA key ID 3DD0EEDC
> gpg: Good signature from "Walter Dnes <waltdnes@waltdnes.org>"
> Command gpg --verify -;exit 1 returned exit status 1.  Press RETURN.
> 
>   If I use the nicer looking...
> 
> define verify_pgp ()
> {
>  pipe_article ("gpg --verify -");
>  read_mini_no_echo("Press ENTER to continue", "", "");
> }
> definekey ("verify_pgp", "v", "article");
> 
> ...then the screen is refreshed immediately after gpg confirms the
> signature, and I only see the "Press ENTER to continue" prompt,
> which defeats the whole point of outputting gpg status.  Since the
> pipe_article command invokes a *NON* interactive shell, bash is not
> happy about me using the "read" command to prompt to continue.  Any
> ideas from the s-lang gurus out there ?
> 
Did you try piping the output to some file, then reading that file as a
single string and using the slrn_popup() function (new in 0.9.7.1pl2 and
newer)?

Something like this:


            () = system ("cat /home/jurriaan/News/hdr_xface | view-x-face > /home/jurriaan/News/rslt_xface");
            face = "";
            xfce_fp = fopen("/home/jurriaan/News/rslt_xface", "r");
            if (xfce_fp == NULL)
              return;
            while (fgets(&line, xfce_fp) != -1)
            {
               face = strcat(face, line);
            }
            () = fclose(xfce_fp);
            popup_window("X-Face:", face);

[adapt as needed]

Good luck,
Jurriaan

-- 
Searchin' for something
In a world that's dark and strange
When you think you've found answers
That's when the questions change
	Triumph - Surveillance : Carry on the flame.
GNU/Linux 2.4.7-ac9 SMP/ReiserFS 2x1402 bogomips load av: 0.00 0.00 0.00
Technical Details
Message-ID: <slrn9n8a5r.98u.no_spam_here@middle.of.nowhere>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!transit.news.xs4all.nl!not-for-mail
References: <9kklf9$2cqf$1@news.tht.net> <slrn9mrooa.cq.alex@whizzo.wasmuth.org> <9kvf2g$1fl2$1@news.tht.net>

Show Full Headers
Complete Article Headers
Message-ID: <slrn9n8a5r.98u.no_spam_here@middle.of.nowhere>
Subject: Re: [slrn] How do I get slrn to check PGP signatures ?
Date: Fri, 10 Aug 2001 18:45:37 +0000
From: "Jurriaan (note: this is a working address!)" <no_spam_here@rivierenland.xs4all.nl>
References: <9kklf9$2cqf$1@news.tht.net> <slrn9mrooa.cq.alex@whizzo.wasmuth.org> <9kvf2g$1fl2$1@news.tht.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!transit.news.xs4all.nl!not-for-mail
Newsgroups: news.software.readers
Organization: XS4ALL Internet BV
Lines: 77
NNTP-Posting-Host: rivierenland.xs4all.nl
X-Trace: news1.xs4all.nl 997469137 10353 194.109.14.47 (10 Aug 2001 18:45:37 GMT)
X-Complaints-To: abuse@xs4all.nl
NNTP-Posting-Date: 10 Aug 2001 18:45:37 GMT
X-Face: b$-F+98,@$_I=*ODq'<K2(OA)qC&,(GP=z2^`4dwQwy&e;!|R?>")k9FH3?YC+%*kF\=<Rx"Hy2_eyMtnFSiO8
User-Agent: slrn/0.9.7.1jwk-pl3 (Linux)