[Rt-commit] r10037 - rt/branches/3.7-RTIR-RELENG/lib/RT/Crypt

ruz at bestpractical.com ruz at bestpractical.com
Fri Dec 21 10:25:52 EST 2007


Author: ruz
Date: Fri Dec 21 10:25:51 2007
New Revision: 10037

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

Log:
* gnupg report capability to sign even if public keys has no private key pair

Modified: rt/branches/3.7-RTIR-RELENG/lib/RT/Crypt/GnuPG.pm
==============================================================================
--- rt/branches/3.7-RTIR-RELENG/lib/RT/Crypt/GnuPG.pm	(original)
+++ rt/branches/3.7-RTIR-RELENG/lib/RT/Crypt/GnuPG.pm	Fri Dec 21 10:25:51 2007
@@ -1644,23 +1644,7 @@
 
 sub GetKeysForSigning {
     my $key_id = shift;
-    my %res = GetKeysInfo( $key_id, 'public', @_ );
-    return %res if $res{'exit_code'};
-    return %res unless $res{'info'};
-
-    foreach my $key ( splice @{ $res{'info'} } ) {
-        # skip disabled keys
-        next if $key->{'Capabilities'} =~ /D/;
-        # skip keys not suitable for signing
-        next unless $key->{'Capabilities'} =~ /s/i;
-        # skip disabled, expired, revoke and keys with no trust,
-        # but leave keys with unknown trust level
-        next if $key->{'TrustLevel'} < 0;
-
-        push @{ $res{'info'} }, $key;
-    }
-    delete $res{'info'} unless @{ $res{'info'} };
-    return %res;
+    return GetKeysInfo( $key_id, 'private', @_ );
 }
 
 sub CheckRecipients {


More information about the Rt-commit mailing list