Thread View: news.software.readers
6 messages
6 total messages
Started by Felix von Leitner
Sun, 28 Apr 1996 00:00
PGP signing patch for slrn
Author: Felix von Leitner
Date: Sun, 28 Apr 1996 00:00
Date: Sun, 28 Apr 1996 00:00
103 lines
3354 bytes
3354 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hi folks,
I really like to be able to sign my postings. So I hacked slrn a
little. Really nothing much. Just apply the following diff to
slrn/src/post.c.
When it bothers me enough I'll hack a pgp signature check into slrn as
well ;)
Felix
281a282,283
> static char passphrase[1024];
>
298c300
< rsp = slrn_get_response ("yYnNeE", "Post the message? Y-es, N-o, E-dit");
- ---
> rsp = slrn_get_response ("yYnNeEsSpP", "Post the message? Y-es, N-o, E-dit, S-pell check, P-GP sign");
302c304,368
< if (slrn_edit_file (file, 1) < 0) return -1;
- ---
> if (rsp == 's') {
> char cmd[1024] = "ispell -x ";
> strcat( cmd, file );
> slrn_posix_system( cmd, 1 );
> }
> if (rsp == 'p') {
> char cmd[1024] = "pgp -als +batchmode ";
> char tmpfile[256];
> FILE *infp,*outfp,*pp;
> if (passphrase[0]==0) {
> if (slrn_read_input("Passphrase: ",passphrase,0) <= 0) continue;
> }
> if (NULL == (infp = fopen (file, "r+")))
> {
> slrn_error ("File not found: %s--- message not signed.", file);
> return -1;
> }
> outfp=slrn_open_tmpfile(tmpfile,"w");
> for(;;) {
> char line[1024];
> if (fgets(line,1024,infp)==NULL) {
> slrn_error ("No body--- message not signed.");
> return -1;
> }
> if (line[0]=='\n') break;
> }
> for(;;) {
> char line[1024];
> if (fgets(line,1024,infp)==NULL) break;
> fputs(line,outfp);
> }
> rewind(infp);
> fclose(outfp);
> strcat(cmd,tmpfile);
> putenv("PGPPASSFD=0");
> if ((pp=slrn_popen(cmd,"w"))==NULL) {
> fclose(pp);
> return -1;
> }
> fputs(passphrase,pp);
> slrn_pclose (pp);
> for(;;) {
> char line[1024];
> if (fgets(line,1024,infp)==NULL) {
> slrn_error ("No body--- message not signed.");
> return -1;
> }
> if (line[0]=='\n') break;
> }
> fseek(infp,0,1);
> unlink(tmpfile);
> strcat(tmpfile,".asc");
> if ((outfp=fopen(tmpfile,"r"))==NULL) {
> slrn_error ("Cannot open file:%s--- message not signed.",tmpfile);
> return -1;
> }
> for(;;) {
> char line[1024];
> if (fgets(line,1020,outfp)==NULL) break;
> fputs(line,infp);
> }
> fclose(outfp);
> fclose(infp);
> }
> if (rsp == 'e') if (slrn_edit_file (file, 1) < 0) return -1;
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
iQCVAwUBMYMMTR/Da1Yoy+f1AQFjLAP/RgFljerKWTmmrmazZZacBjclJQpPorOE
o4jyjG2xKwbjPr1H3dr4AyjE1lgu4jWdLLcSyAizCTr1B2j40qt8FZi9Ur1m4kVI
ugqilUoHcTlnwHhzmm3H3bzVzIeBwL1aNX5QFRwbUX5AgydYtGrXS/iO5VpaFLgs
h3CLCeUyOSs=
=Mpr1
-----END PGP SIGNATURE-----
Re: PGP signing patch for slrn
Author: Reality is a point of view
Date: Sun, 28 Apr 1996 00:00
Date: Sun, 28 Apr 1996 00:00
25 lines
1392 bytes
1392 bytes
+---- leitner@landau.math.fu-berlin.de wrote (28 Apr 1996 06:12:35 GMT):
| I really like to be able to sign my postings. So I hacked slrn a
| little. Really nothing much. Just apply the following diff to
| slrn/src/post.c.
Cool!
| > static char passphrase[1024];
...
| > if (passphrase[0]==0) {
| > if (slrn_read_input("Passphrase: ",passphrase,0) <= 0) continue;
| > }
+----
I can understand why you made it static. Some of the paranoid
among us are likely to write '\0''s to passphrase at some point . . .
--
Gary Johnson "There's no union called the AFL-CIA is there?"
gjohnson@season.com <a href="http://www.efm.org">Walk The Talk</a>
CAMPAIGN '96: Juck 'em if they can't fake a toke.
Re: New PGP signing patch for slrn 0.8.8
Author: Felix von Leitner
Date: Mon, 29 Apr 1996 00:00
Date: Mon, 29 Apr 1996 00:00
45 lines
2131 bytes
2131 bytes
-----BEGIN PGP SIGNED MESSAGE----- On 29 Apr 1996 17:10:37 GMT, Tony Nelson <tnelson@cherokee.cs.mci.com> wrote: > not cool.. i get... > > [...] > Key for user ID: Tony Nelson <tnelson@kktv.com> > 1024-bit key, Key ID 37BF4E71, created 1996/03/08 > Just a moment....tempfile: created '/tmp/SLRN5663a001OV.$01' > squish_file: infile = '/tmp/SLRN5663a001OV.$00', outfile = > '/tmp/SLRN5663a001OV.$01' > Compressing file...compressed. rmtemp: removing '/tmp/SLRN5663a001OV.$00' > > received signal 11 "Segmentation Fault" This is not my fault when PGP gets a segmentation fault. Maybe you installed it not correctly? > exitPGP: exitcode = 6 > rmtemp: removing '/tmp/SLRN5663a001OV.$01' > Command returned non-zero exit status. Press RETURN. > > hmmm.. not the expected output I'd bet.. any ideas? Well, as you might have noticed, I signed my announcement (and this message will be signed, too), so it works for me ;) Felix -----BEGIN PGP SIGNATURE----- Version: 2.6.3i Charset: noconv iQCVAwUBMYUSXx/Da1Yoy+f1AQFQmgP+MP03E9H2grwvhj+3Cgtk+Q9STFtbja6e oOX0klmtfetqjFu4rLmfa1r7wblPN3ql0VBp32N3YV34/ZvR7lxX/FgUbjBqmLbg EJzUkWrrJB48Uh9KLTNKjFtGDiusxjoKP0arB6PoVm+KhgRkfZgvkp/RX4qKq7B+ tx4ZVUaYGaY= =/ouo -----END PGP SIGNATURE-----
Re: PGP signing patch for slrn
Author: Felix von Leitner
Date: Mon, 29 Apr 1996 00:00
Date: Mon, 29 Apr 1996 00:00
31 lines
1755 bytes
1755 bytes
On 28 Apr 1996 17:09:39 GMT, Reality is a point of view <gjohnson@dream.season.com> wrote:
> +---- leitner@landau.math.fu-berlin.de wrote (28 Apr 1996 06:12:35 GMT):
> | I really like to be able to sign my postings. So I hacked slrn a
> | little. Really nothing much. Just apply the following diff to
> | slrn/src/post.c.
>
> Cool!
Unfortunately it has a few flaws. I forgot to delete the ".asc" temp
file. I will make a patch for 0.8.8 which fixes that ;)
> | > static char passphrase[1024];
> ...
> | > if (passphrase[0]==0) {
> | > if (slrn_read_input("Passphrase: ",passphrase,0) <= 0) continue;
> | > }
> +----
>
> I can understand why you made it static. Some of the paranoid
> among us are likely to write '\0''s to passphrase at some point . . .
You can still do that. Maybe we should make a "forget passphrase"
function to bind to some key. And we should definitely overwrite the
passphrase. And we should be able to ask for the keyphrase without Echo
(John? Please?).
Felix
Re: New PGP signing patch for slrn 0.8.8
Author: Tony Nelson
Date: Mon, 29 Apr 1996 00:00
Date: Mon, 29 Apr 1996 00:00
49 lines
2513 bytes
2513 bytes
On 29 Apr 1996 16:12:06 GMT, Felix von Leitner <leitner@stott.math.fu-berlin.de> wrote: >-----BEGIN PGP SIGNED MESSAGE----- > >Again, get and unpack slrn and run "patch slrn/src/post.c < slrn.diff" >where slrn.diff is the rest of this file. The tempfile is now properly >deleted. > >Felix > cool.. did that.. compiled and installed just fine... not cool.. i get... A secret key is required to make a signature. You specified no user ID to select your secret key, so the default user ID and key will be the most recently added key on your secret keyring. tempfile: created '/tmp/SLRN5663a001OV.$00' signfile: infile = '/tmp/SLRN5663a001OV', outfile = '/tmp/SLRN5663a001OV.$00', mode = 'b', literalfile = 'SLRN5663a001OV' searching key ring file '/home/dev/tnelson/.pgp/secring.pgp' for userid "" Pass phrase is good. searching key ring file '/home/dev/tnelson/.pgp/pubring.pgp' for keyID 37BF4E71 Key for user ID: Tony Nelson <tnelson@kktv.com> 1024-bit key, Key ID 37BF4E71, created 1996/03/08 Just a moment....tempfile: created '/tmp/SLRN5663a001OV.$01' squish_file: infile = '/tmp/SLRN5663a001OV.$00', outfile = '/tmp/SLRN5663a001OV.$01' Compressing file...compressed. rmtemp: removing '/tmp/SLRN5663a001OV.$00' received signal 11 exitPGP: exitcode = 6 rmtemp: removing '/tmp/SLRN5663a001OV.$01' Command returned non-zero exit status. Press RETURN. hmmm.. not the expected output I'd bet.. any ideas? -- Tony Nelson | Standard Disclaimers Apply | "Rose tint my world, Computer Consultant | tnelson@cherokee.cs.mci.com | keep me safe from my ComSys Tech Svcs | http://www.wp.com/TNTConsulting | trouble and pain" --------------------| PGP Key: finger tnelson@cherokee.cs.mci.com@PublicKey.com
New PGP signing patch for slrn 0.8.8
Author: Felix von Leitner
Date: Mon, 29 Apr 1996 00:00
Date: Mon, 29 Apr 1996 00:00
102 lines
3478 bytes
3478 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Again, get and unpack slrn and run "patch slrn/src/post.c < slrn.diff"
where slrn.diff is the rest of this file. The tempfile is now properly
deleted.
Felix
- --- save from here as slrn.diff ---
281a282
>
413a415,416
> static char passphrase[1024];
>
430c433
< rsp = slrn_get_response ("yYnNeE", "Post the message? Y-es, N-o, E-dit");
- ---
> rsp = slrn_get_response ("yYnNeEsSpP", "Post the message? Y-es, N-o, E-dit, S-pell check, P-GP sign");
434c437,502
< if (slrn_edit_file (file, 1) < 0)
- ---
> if (rsp == 's') {
> char cmd[1024] = "ispell -x ";
> strcat( cmd, file );
> slrn_posix_system( cmd, 1 );
> }
> if (rsp == 'p') {
> char cmd[1024] = "pgp -als +batchmode ";
> char tmpfile[256];
> FILE *infp,*outfp,*pp;
> if (passphrase[0]==0) {
> if (slrn_read_input("Passphrase: ",passphrase,0) <= 0) continue;
> }
> if (NULL == (infp = fopen (file, "r+")))
> {
> slrn_error ("File not found: %s--- message not signed.", file);
> return -1;
> }
> outfp=slrn_open_tmpfile(tmpfile,"w");
> for(;;) {
> char line[1024];
> if (fgets(line,1024,infp)==NULL) {
> slrn_error ("No body--- message not signed.");
> return -1;
> }
> if (line[0]=='\n') break;
> }
> for(;;) {
> char line[1024];
> if (fgets(line,1024,infp)==NULL) break;
> fputs(line,outfp);
> }
> rewind(infp);
> fclose(outfp);
> strcat(cmd,tmpfile);
> putenv("PGPPASSFD=0");
> if ((pp=slrn_popen(cmd,"w"))==NULL) {
> fclose(pp);
> return -1;
> }
> fputs(passphrase,pp);
> slrn_pclose (pp);
> for(;;) {
> char line[1024];
> if (fgets(line,1024,infp)==NULL) {
> slrn_error ("No body--- message not signed.");
> return -1;
> }
> if (line[0]=='\n') break;
> }
> fseek(infp,0,1);
> unlink(tmpfile);
> strcat(tmpfile,".asc");
> if ((outfp=fopen(tmpfile,"r"))==NULL) {
> slrn_error ("Cannot open file:%s--- message not signed.",tmpfile);
> return -1;
> }
> for(;;) {
> char line[1024];
> if (fgets(line,1020,outfp)==NULL) break;
> fputs(line,infp);
> }
> fclose(outfp);
> fclose(infp);
> unlink(tmpfile);
> }
> if (rsp=='e') if (slrn_edit_file (file, 1) < 0)
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
iQCVAwUBMYTqSx/Da1Yoy+f1AQHOjwP9FOkwO4p7IO3hhibTbW96/TjZl/jR/9vM
KPQHOpRg0n2uj59Bkl+/lu5oyqOxh4+J+hzVno0tcryUlPBXTt7KMpLSXmNFJmZD
TnlES5hGH7l618En1z9cK0NWotxNWah6xBtp/S/AMSAVZX7Jvk6bV9nPKsmueyJg
6zqckBsGPzs=
=Ikz2
-----END PGP SIGNATURE-----
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