patch for autodetecting the signing key
Brought to you by:
ftobin
|
From: Friedhelm B. <bue...@ma...> - 2000-10-03 19:09:29
|
hi. i had the idea of making pine passing the header to pgpenvelope, and
having pgpenvelope figure out the from-line, so that it can choose the
right key for signing. the following patch does the right thing , when the
pine-config is changed to :
sending-filters=/usr/bin/pgpenvelope_encrypt _RECIPIENTS_ _INCLUDEALLHDRS_
--- pgpenvelope_encrypt Sun Jul 23 11:54:58 2000
+++ pgpenvelope_encrypt Tue Oct 3 20:30:07 2000
@@ -87,6 +90,13 @@
);
my $signing_key_id = $config->get( 'signing-key' ) || '';
+
+$_ = " ";
+while (! /^$/) {
+ $_ = <STDIN>;
+ if (/^From: .+ <(.+)>/) { $signing_key_id = $1; }
+ }
+
if ( $signing_key_id )
---
strange things happens : pgp4pine gets the right key, if you choose NOT to
encrypt nor sign, everything works perfectly. the mail is send as
normal. If you choose to encrypt or sign, an empty mail is send (as my
previous mail :) - but WHY ? the patch only strips of the headerlines from
stdin, so i assume pgpenvelope gets the data as usual - or not ?
greetings !
|