[Rt-commit] r16085 - rt/3.8/trunk/lib/RT/Crypt
ruz at bestpractical.com
ruz at bestpractical.com
Thu Sep 25 22:43:36 EDT 2008
Author: ruz
Date: Thu Sep 25 22:43:35 2008
New Revision: 16085
Modified:
rt/3.8/trunk/lib/RT/Crypt/GnuPG.pm
Log:
* don't passphrase from the config as extra args to gpg, always
pass it via passphrase-fd
* shouldn't affect 1.4.x and 2.x, but fix 1.2.x
Modified: rt/3.8/trunk/lib/RT/Crypt/GnuPG.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Crypt/GnuPG.pm (original)
+++ rt/3.8/trunk/lib/RT/Crypt/GnuPG.pm Thu Sep 25 22:43:35 2008
@@ -435,6 +435,11 @@
my $gnupg = new GnuPG::Interface;
my %opt = RT->Config->Get('GnuPGOptions');
+
+ # handling passphrase in GnuPGOptions
+ $args{'Passphrase'} = delete $opt{'passphrase'}
+ if !defined $args{'Passphrase'};
+
$opt{'digest-algo'} ||= 'SHA1';
$opt{'default_key'} = $args{'Signer'}
if $args{'Sign'} && $args{'Signer'};
@@ -446,10 +451,6 @@
my $entity = $args{'Entity'};
- # handling passphrase in GnuPGOptions
- $args{'Passphrase'} = delete $opt{'passphrase'}
- if !defined $args{'Passphrase'};
-
if ( $args{'Sign'} && !defined $args{'Passphrase'} ) {
$args{'Passphrase'} = GetPassphrase( Address => $args{'Signer'} );
}
@@ -616,6 +617,11 @@
my $gnupg = new GnuPG::Interface;
my %opt = RT->Config->Get('GnuPGOptions');
+
+ # handling passphrase in GnupGOptions
+ $args{'Passphrase'} = delete $opt{'passphrase'}
+ if !defined($args{'Passphrase'});
+
$opt{'digest-algo'} ||= 'SHA1';
$opt{'default_key'} = $args{'Signer'}
if $args{'Sign'} && $args{'Signer'};
@@ -625,10 +631,6 @@
meta_interactive => 0,
);
- # handling passphrase in GnupGOptions
- $args{'Passphrase'} = delete $opt{'passphrase'}
- if !defined($args{'Passphrase'});
-
if ( $args{'Sign'} && !defined $args{'Passphrase'} ) {
$args{'Passphrase'} = GetPassphrase( Address => $args{'Signer'} );
}
@@ -703,6 +705,11 @@
my $gnupg = new GnuPG::Interface;
my %opt = RT->Config->Get('GnuPGOptions');
+
+ # handling passphrase in GnupGOptions
+ $args{'Passphrase'} = delete $opt{'passphrase'}
+ if !defined($args{'Passphrase'});
+
$opt{'digest-algo'} ||= 'SHA1';
$opt{'default_key'} = $args{'Signer'}
if $args{'Sign'} && $args{'Signer'};
@@ -712,10 +719,6 @@
meta_interactive => 0,
);
- # handling passphrase in GnupGOptions
- $args{'Passphrase'} = delete $opt{'passphrase'}
- if !defined($args{'Passphrase'});
-
if ( $args{'Sign'} && !defined $args{'Passphrase'} ) {
$args{'Passphrase'} = GetPassphrase( Address => $args{'Signer'} );
}
@@ -804,6 +807,11 @@
my $gnupg = new GnuPG::Interface;
my %opt = RT->Config->Get('GnuPGOptions');
+
+ # handling passphrase in GnupGOptions
+ $args{'Passphrase'} = delete $opt{'passphrase'}
+ if !defined($args{'Passphrase'});
+
$opt{'digest-algo'} ||= 'SHA1';
$opt{'default_key'} = $args{'Signer'}
if $args{'Sign'} && $args{'Signer'};
@@ -813,10 +821,6 @@
meta_interactive => 0,
);
- # handling passphrase in GnupGOptions
- $args{'Passphrase'} = delete $opt{'passphrase'}
- if !defined($args{'Passphrase'});
-
if ( $args{'Sign'} && !defined $args{'Passphrase'} ) {
$args{'Passphrase'} = GetPassphrase( Address => $args{'Signer'} );
}
@@ -1152,6 +1156,11 @@
my $gnupg = new GnuPG::Interface;
my %opt = RT->Config->Get('GnuPGOptions');
+
+ # handling passphrase in GnupGOptions
+ $args{'Passphrase'} = delete $opt{'passphrase'}
+ if !defined($args{'Passphrase'});
+
$opt{'digest-algo'} ||= 'SHA1';
$gnupg->options->hash_init(
_PrepareGnuPGOptions( %opt ),
@@ -1163,10 +1172,6 @@
RT::EmailParser->_DecodeBody($args{'Data'});
}
- # handling passphrase in GnupGOptions
- $args{'Passphrase'} = delete $opt{'passphrase'}
- if !defined($args{'Passphrase'});
-
$args{'Passphrase'} = GetPassphrase()
unless defined $args{'Passphrase'};
@@ -1229,6 +1234,11 @@
my $gnupg = new GnuPG::Interface;
my %opt = RT->Config->Get('GnuPGOptions');
+
+ # handling passphrase in GnuPGOptions
+ $args{'Passphrase'} = delete $opt{'passphrase'}
+ if !defined($args{'Passphrase'});
+
$opt{'digest-algo'} ||= 'SHA1';
$gnupg->options->hash_init(
_PrepareGnuPGOptions( %opt ),
@@ -1240,10 +1250,6 @@
RT::EmailParser->_DecodeBody($args{'Data'});
}
- # handling passphrase in GnuPGOptions
- $args{'Passphrase'} = delete $opt{'passphrase'}
- if !defined($args{'Passphrase'});
-
$args{'Passphrase'} = GetPassphrase()
unless defined $args{'Passphrase'};
@@ -1360,6 +1366,11 @@
my $gnupg = new GnuPG::Interface;
my %opt = RT->Config->Get('GnuPGOptions');
+
+ # handling passphrase in GnuPGOptions
+ $args{'Passphrase'} = delete $opt{'passphrase'}
+ if !defined($args{'Passphrase'});
+
$opt{'digest-algo'} ||= 'SHA1';
$gnupg->options->hash_init(
_PrepareGnuPGOptions( %opt ),
@@ -1371,10 +1382,6 @@
RT::EmailParser->_DecodeBody($args{'Data'});
}
- # handling passphrase in GnuPGOptions
- $args{'Passphrase'} = delete $opt{'passphrase'}
- if !defined($args{'Passphrase'});
-
$args{'Passphrase'} = GetPassphrase()
unless defined $args{'Passphrase'};
@@ -1410,16 +1417,17 @@
my $gnupg = new GnuPG::Interface;
my %opt = RT->Config->Get('GnuPGOptions');
+
+ # handling passphrase in GnupGOptions
+ $args{'Passphrase'} = delete $opt{'passphrase'}
+ if !defined($args{'Passphrase'});
+
$opt{'digest-algo'} ||= 'SHA1';
$gnupg->options->hash_init(
_PrepareGnuPGOptions( %opt ),
meta_interactive => 0,
);
- # handling passphrase in GnupGOptions
- $args{'Passphrase'} = delete $opt{'passphrase'}
- if !defined($args{'Passphrase'});
-
$args{'Passphrase'} = GetPassphrase()
unless defined $args{'Passphrase'};
More information about the Rt-commit
mailing list