🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
6 messages
6 total messages Started by Graham Hughes Wed, 06 Nov 1996 00:00
Saving an article in a macro
#8141
Author: Graham Hughes
Date: Wed, 06 Nov 1996 00:00
50 lines
2328 bytes
-----BEGIN PGP SIGNED MESSAGE-----

Here's the idea:

I'm in comp.os.linux.announce, and I see a PGP signed message.  I want
to check the signature, but nn doesn't allow me to pipe the message body
through another command, and since I'm reading over NNTP, $A doesn't
exist.  So I try to save the article out to a temporary file, run pgp on
that, and delete the temporary file afterwards.

My current macro looks like this:

map show ^x (
	:save-body /tmp/nn.article-graham
	:!pgp /tmp/nn.article-graham
	:!rm /tmp/nn.article-graham
)

This is unsatisfactory on a couple of points.  First; the temporary file
could easily get nuked if I start nn twice, which has been known to
happen.  Second, it simply doesn't work.

Basically, I'm trying to write Mailcrypt for nn :).  Anybody know what I
could do to get this to work, or where I can find some existing
documentation on this sort of thing?  I'd like to do the same thing with
metamail.  I can't use NN-TK and exmh for this because I can't always
rely on having an X terminal.
- -- 
Graham Hughes (graham.hughes@resnet.ucsb.edu)
http://A-abe.resnet.ucsb.edu/~graham/ for HTML
``Unix is many things to many people, but | finger graham@A-abe.resnet
it's never been everything to anybody.''  | for PGP key

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMoD9tyqNPSINiVE5AQEdNgP+LZk7wl3EYjrkTYrDuxxoyDSm6nSKAsjT
J3SaCdJcg2EGPyAt2pz8diYkdu+EkK7aNkFt2VAKqxhAYnAhmzyo+NArRc91uANI
Iq566Xf9JXmrFEMbNwJ7AiBdD+BbAg2Z5LSDdonZfG5X+7Bo/nsxfbeEjL32rLfY
9GPeH7GeeOE=
=jm4e
-----END PGP SIGNATURE-----
--
Graham Hughes (graham.hughes@resnet.ucsb.edu)
http://A-abe.resnet.ucsb.edu/~graham/ for HTML
``Unix is many things to many people, but | finger graham@A-abe.resnet
it's never been everything to anybody.''  | for PGP key

[nn] pgp support (Re: Saving an article in a macro)
#8147
Author: Sven Guckes
Date: Thu, 07 Nov 1996 00:00
36 lines
1828 bytes
graham.hughes@resnet.ucsb.edu (Graham Hughes):
> I'm in comp.os.linux.announce, and I see a PGP signed message.
> I want to check the signature, but nn doesn't allow me to pipe
> the message body through another command, ...

I beg your pardon?  NN certainly has piping!  :-)

To quote the manual:

	FILE NAME EXPANSION

	[...]
	|command-line
	Instead of writing to a file, the articles are piped to the given
	shell (/bin/sh) command-line. Each save or write command will create
	a separate pipe, but all articles saved or written in one command
	(in selection mode) are given as input to the same shell command.
	Example: "| pr | lp"
	This will print the articles on the printer after they have been piped
	through pr.  It is possible to create separate pipes for each saved
	article by using a double pipe symbol in the beginning of the command,
	e.g.     "|| cd ~/src/nn ; patch"

All "save commands" (oOsSww) indicate this in their prompt with a '|':

	Output on (+~|) +news.software.nn
	Save   on (+~|) +news.software.nn
	Write  on (+~|) +news.software.nn

Incidentally - what are the plans for PGP support for NN? (paging Mr Pins)

Sven


Re: [nn] pgp support (Re: Saving an article in a macro)
#8148
Author: Graham Hughes
Date: Thu, 07 Nov 1996 00:00
54 lines
2585 bytes
-----BEGIN PGP SIGNED MESSAGE-----

guckes@somerville.math.fu-berlin.de (Sven Guckes) writes:

>I beg your pardon?  NN certainly has piping!  :-)

Oops. <blush>  See what happens if you read USENET at 2 in the morning?
;)

>Incidentally - what are the plans for PGP support for NN? (paging Mr Pins)

Actually...

Here's what I see as necessary to create a good PGP interface.  Most of
it may actually have been done before.  This is slightly modeled after
Mailcrypt, but we really don't need all its hairiness.

    - signing outgoing posts/mail
        The easiest way to do this is to enable new keybindings for the
        post-editing prompt, so (p) PGP sign is an option
    - way of passing arguments to Ww and co.
        May already be done
    - method of extracting information about an article.
        I refer here to grabbing (e.g.) the To: line and fingering that
        user for their PGP key, or doing the httpd thing.

The rest I can do with standard nn stuff, and these modifications may be
a good thing to do for nn anyway.

Basically, the interface is quite easy if you approach it correctly.
(i.e. we're not writing a mailcrypt clone).
- -- 
Graham Hughes (graham.hughes@resnet.ucsb.edu)
http://A-abe.resnet.ucsb.edu/~graham/ for HTML
``Unix is many things to many people, but | finger graham@A-abe.resnet
it's never been everything to anybody.''  | for PGP key

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMoIbNyqNPSINiVE5AQG2AwP+PVyRw22XqsCbXjCjSUr6i1goObJ4g7jd
1CrxQWI6oJmZcO5InlQqjVsPAR50hKi/rQp3vzrpF7udZ0uTXKhzimp+qvdFNqmP
G3D/QmmHju6A2VvONusvazy80H/uvXgcnhA/aui2D+J/geSVznZghRGqFXnP2OBT
gO6TG5h5ZEk=
=QjAW
-----END PGP SIGNATURE-----
--
Graham Hughes (graham.hughes@resnet.ucsb.edu)
http://A-abe.resnet.ucsb.edu/~graham/ for HTML
``Unix is many things to many people, but | finger graham@A-abe.resnet
it's never been everything to anybody.''  | for PGP key

Re: [nn] pgp support (Re: Saving an article in a macro)
#8156
Author: Michael T Pins
Date: Fri, 08 Nov 1996 00:00
15 lines
1186 bytes
guckes@somerville.math.fu-berlin.de (Sven Guckes) writes:

>Incidentally - what are the plans for PGP support for NN? (paging Mr Pins)

The plans are: eventually.
Likely not in 6.6, which means not until 7.0.

-- 
**************************************************************************
*  Michael T Pins                  |        mtpins@isca.uiowa.edu        *
*  keeper of the nn sources        |        mtpins@winternet.com         *
*  ftp.isca.uiowa.edu              |      #include <std.disclaimer>      *

Re: [nn] pgp support (Re: Saving an article in a macro)
#8154
Author: John Henders
Date: Sat, 09 Nov 1996 00:00
61 lines
1994 bytes
In <55u190$r4s@server05.icaen.uiowa.edu> mtpins@icaen.uiowa.edu (Michael T Pins) writes:

>guckes@somerville.math.fu-berlin.de (Sven Guckes) writes:

>>Incidentally - what are the plans for PGP support for NN? (paging Mr Pins)

>The plans are: eventually.
>Likely not in 6.6, which means not until 7.0.

How's this for now. Diffs against aux to add a pgp sign option to the
posting menu.








*** aux	Wed Jun 26 16:20:32 1996
--- /home/jhenders/aux.pgp	Fri Aug 16 07:05:56 1996
***************
*** 152,159 ****
--- 166,174 ----
  ?*)
    pr="$pr i)spell"
    ;;
  esac
+ pr="$pr S)ign"
  pr="$pr m)ail"
  case "$OPERATION" in
  post|follow)
    pr="$pr p)ost"

***************
*** 344,351 ****
--- 359,374 ----
        ;;
      esac
      ;;
  
+   S*)
+     sed -e '/^$/q' < $WORK > $WORK.HDRS
+     awk '{if (S== 1)  print $0; if ($0 == "")  S=1}' < $WORK > $WORK.BDY
+     pgp -stfaw < $WORK.BDY > $WORK.SGN
+     cat $WORK.HDRS $WORK.SGN > $WORK
+     rm -f $WORK.*
+     ;;
+ 
    h*)
      $AWK 'END{printf "Complete response later: (y) "}' < /dev/null
      read act
      case "$act" in
-- 
      Artificial Intelligence stands no chance against Natural Stupidity.
                GAT d- -p+(--) c++++ l++ u++ t- m--- W--- !v
                     b+++ e* s-/+ n-(?) h++ f+g+ w+++ y*


Re: [nn] pgp support (Re: Saving an article in a macro)
#8158
Author: John Henders
Date: Sun, 10 Nov 1996 00:00
25 lines
1518 bytes
In <563ak0$spp@drum.msfc.nasa.gov> jpc@drum.msfc.nasa.gov (J. Porter Clark) writes:

>I can't make it work without adding my .sig *after* the PGP signature.
>Ugh.  But workable.

You could add an extra sed and awk line to split out the sig from
$WORK.BDY. Have it look for the "-- " that starts the sig line. I have
my sig auto added so I never noticed.

>I can't use MIT PGP because of licensing restrictions.  I can use
>ViaCrypt PGP, but 4.0 doesn't work with your diff.  I need to
>investigate this a little further...

The flags passed to pgp may be different in the ViaCrypt version. 



-- 
      Artificial Intelligence stands no chance against Natural Stupidity.
                GAT d- -p+(--) c++++ l++ u++ t- m--- W--- !v
                     b+++ e* s-/+ n-(?) h++ f+g+ w+++ y*


Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads