[Rt-commit] r7381 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Thu Mar 29 11:03:48 EDT 2007
Author: ruz
Date: Thu Mar 29 11:03:47 2007
New Revision: 7381
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/Crypt/GnuPG.pm
Log:
r4827 at cubic-pc: cubic | 2007-03-29 02:18:46 +0400
* add GetPassphrase function
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 Thu Mar 29 11:03:47 2007
@@ -51,6 +51,10 @@
);
my $entity = $args{'Entity'};
+ if ( $args{'Sign'} && !defined $args{'Passphrase'} ) {
+ $args{'Passphrase'} = GetPassphrase();
+ }
+
my $gnupg = new GnuPG::Interface;
my %opt = RT->Config->Get('GnuPG');
$opt{'digest-algo'} ||= 'SHA1';
@@ -481,6 +485,9 @@
meta_interactive => 0,
);
+ $args{'Passphrase'} = GetPassphrase()
+ unless defined $args{'Passphrase'};
+
my ($tmp_fh, $tmp_fn) = File::Temp::tempfile();
binmode $tmp_fh, ':raw';
@@ -530,6 +537,10 @@
return %res;
}
+sub GetPassphrase {
+ return undef;
+}
+
my %inv_recp_reason = (
0 => "No specific reason given",
1 => "Not Found",
More information about the Rt-commit
mailing list