[Rt-commit] r7671 -
rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email/Auth
clkao at bestpractical.com
clkao at bestpractical.com
Tue Apr 24 12:54:46 EDT 2007
Author: clkao
Date: Tue Apr 24 12:54:30 2007
New Revision: 7671
Modified:
rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email/Auth/GnuPGNG.pm
Log:
Attach the original message after decrypting.
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email/Auth/GnuPGNG.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email/Auth/GnuPGNG.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email/Auth/GnuPGNG.pm Tue Apr 24 12:54:30 2007
@@ -33,6 +33,7 @@
for qw(X-RT-GnuPG-Status X-RT-Incoming-Encrypton
X-RT-Incoming-Signature X-RT-Privacy);
+ my $msg = $args{'Message'}->dup;
my ($status, @res) = VerifyDecrypt( Entity => $args{'Message'} );
if ( $status && !@res ) {
$args{'Message'}
@@ -50,6 +51,13 @@
return $args{'CurrentUser'}, -2;
}
+ # attach the original encrypted message
+ $args{'Message'}->attach(
+ Type => 'application/x-rt-original-message',
+ Disposition => 'inline',
+ Data => $msg->as_string,
+ );
+
$args{'Message'}->head->add( 'X-RT-GnuPG-Status' => $_->{'status'} )
foreach @res;
$args{'Message'}->head->add( 'X-RT-Privacy' => 'PGP' );
@@ -67,6 +75,7 @@
'X-RT-Incoming-Signature' => $_->{UserString} );
}
}
+
$args{'Message'}->head->add( 'X-RT-Incoming-Encryption' => $decrypted
? 'Success'
: 'Not encrypted' );
More information about the Rt-commit
mailing list