[Rt-commit] r9023 - rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt

ruz at bestpractical.com ruz at bestpractical.com
Wed Sep 12 16:54:58 EDT 2007


Author: ruz
Date: Wed Sep 12 16:54:57 2007
New Revision: 9023

Modified:
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm

Log:
* return undef if there is no association for an id
* adopt callers

Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm	Wed Sep 12 16:54:57 2007
@@ -470,7 +470,7 @@
     if ( $args{'Encrypt'} ) {
         my %seen;
         $gnupg->options->push_recipients( $_ ) foreach 
-            map UseKeyForEncryption($_),
+            map UseKeyForEncryption($_) || $_,
             grep !$seen{ $_ }++, map $_->address,
             map Mail::Address->parse( $entity->head->get( $_ ) ),
             qw(To Cc Bcc);
@@ -593,7 +593,7 @@
 
     if ( $args{'Encrypt'} ) {
         $gnupg->options->push_recipients( $_ ) foreach 
-            map UseKeyForEncryption($_),
+            map UseKeyForEncryption($_) || $_,
             @{ $args{'Recipients'} || [] };
     }
 
@@ -683,7 +683,7 @@
     my $entity = $args{'Entity'};
     if ( $args{'Encrypt'} ) {
         $gnupg->options->push_recipients( $_ ) foreach
-            map UseKeyForEncryption($_),
+            map UseKeyForEncryption($_) || $_,
             @{ $args{'Recipients'} || [] };
     }
 
@@ -1567,7 +1567,7 @@
         %key = (%key, @_);
         $key{ lc($_) } = delete $key{ $_ } foreach grep lc ne $_, keys %key;
     } else {
-        return $key{ $_[0] } || $_[0];
+        return $key{ $_[0] };
     }
     return ();
 } }
@@ -1653,7 +1653,6 @@
         push @issues, \%issue;
     }
     return ($status, @issues);
-    
 }
 
 sub GetPublicKeyInfo {


More information about the Rt-commit mailing list