[Rt-commit] r10105 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Mon Dec 24 18:52:25 EST 2007


Author: ruz
Date: Mon Dec 24 18:52:23 2007
New Revision: 10105

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm

Log:
 r10038 at cubic-pc (orig r10037):  ruz | 2007-12-21 18:25:51 +0300
 * gnupg report capability to sign even if public keys has no private key pair


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	Mon Dec 24 18:52:23 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