[Rt-commit] rt branch, 4.4/set-gnupg-path-in-constructor, created. rt-4.4.4-137-g7688610239

Dianne Skoll dianne at bestpractical.com
Thu Oct 1 14:04:57 EDT 2020


The branch, 4.4/set-gnupg-path-in-constructor has been created
        at  768861023940d8297fc45bf2d14dcdc198030a38 (commit)

- Log -----------------------------------------------------------------
commit 768861023940d8297fc45bf2d14dcdc198030a38
Author: Andrew Ruthven <aruthven at gmail.com>
Date:   Tue Sep 8 16:16:44 2020 -0400

    Set path to GnuPG binary in GnuPG::Interface constructor.
    
    Old versions of GnuPG::Interface would check the GnuPG version in the
    constructor.  If the path is not supplied in the constructor, it would
    attempt to execute the default gpg binary and potentially error out.
    
    While there is a fix for the problem in GnuPG::Interface, this change
    should let RT work properly with unfixed versions of GnuPG::Interface
    
    Fixes: I#36623

diff --git a/lib/RT/Crypt/GnuPG.pm b/lib/RT/Crypt/GnuPG.pm
index 8ebfbf938e..988af8741a 100644
--- a/lib/RT/Crypt/GnuPG.pm
+++ b/lib/RT/Crypt/GnuPG.pm
@@ -333,8 +333,7 @@ sub CallGnuPG {
         %GnuPGOptions,
         %{ $args{Options} || {} },
     );
-    my $gnupg = GnuPG::Interface->new;
-    $gnupg->call( $self->GnuPGPath );
+    my $gnupg = GnuPG::Interface->new( call => $self->GnuPGPath );
     $gnupg->options->hash_init(
         _PrepareGnuPGOptions( %opt ),
     );
@@ -1848,7 +1847,6 @@ sub GnuPGPath {
 
 sub Probe {
     my $self = shift;
-    my $gnupg = GnuPG::Interface->new;
 
     my $bin = $self->GnuPGPath();
     unless ($bin) {
@@ -1878,7 +1876,7 @@ sub Probe {
         $self->GnuPGPath( $bin = $path );
     }
 
-    $gnupg->call( $bin );
+    my $gnupg = GnuPG::Interface->new( call => $bin );
     $gnupg->options->hash_init(
         _PrepareGnuPGOptions( RT->Config->Get('GnuPGOptions') )
     );

-----------------------------------------------------------------------


More information about the rt-commit mailing list