[Rt-commit] r8590 - in rt/branches/3.7-EXPERIMENTAL-TUNIS:
lib/RT/Crypt lib/RT/Interface/Email/Auth
sartak at bestpractical.com
sartak at bestpractical.com
Thu Aug 16 16:58:10 EDT 2007
Author: sartak
Date: Thu Aug 16 16:58:10 2007
New Revision: 8590
Modified:
rt/branches/3.7-EXPERIMENTAL-TUNIS/ (props changed)
rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Crypt/GnuPG.pm
rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Interface/Email/Auth/GnuPG.pm
Log:
r30372 at caladan: sartak | 2007-08-16 16:42:06 -0400
Add an OutEntity that decrypted text will be saved in
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Crypt/GnuPG.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Crypt/GnuPG.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Crypt/GnuPG.pm Thu Aug 16 16:58:10 2007
@@ -853,12 +853,13 @@
return @res;
}
-=head2 VerifyDecrypt Entity => undef, [ Detach => 1, Passphrase => undef ]
+=head2 VerifyDecrypt Entity => undef, [ OutEntity => undef, Detach => 1, Passphrase => undef ]
=cut
sub VerifyDecrypt {
- my %args = ( Entity => undef, Detach => 1, @_ );
+ my %args = ( Entity => undef, OutEntity => undef, Detach => 1, @_ );
+ $args{'OutEntity'} ||= $args{'Entity'};
my @protected = FindProtectedParts( Entity => $args{'Entity'} );
my @res;
# XXX: detaching may brake nested signatures
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Interface/Email/Auth/GnuPG.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Interface/Email/Auth/GnuPG.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Interface/Email/Auth/GnuPG.pm Thu Aug 16 16:58:10 2007
@@ -91,7 +91,7 @@
);
my $raw_msg = $parser->Entity();
- my ($status, @res) = VerifyDecrypt( Entity => $raw_msg );
+ my ($status, @res) = VerifyDecrypt( Entity => $raw_msg, OutEntity => $args{'Message'} );
if ( $status && !@res ) {
$args{'Message'}->head->add(
'X-RT-Incoming-Encryption' => 'Not encrypted'
@@ -225,6 +225,7 @@
sub VerifyDecrypt {
my %args = (
Entity => undef,
+ OutEntity => undef,
@_
);
More information about the Rt-commit
mailing list