[Bps-public-commit] GnuPG-Interface branch, master, updated. 0.51

Alex Vandiver alexmv at bestpractical.com
Wed Dec 17 14:13:45 EST 2014


The branch, master has been updated
       via  8cf9d7374d4606da1e8d695c49608b0f1d7fd6ba (commit)
       via  67b05adc0547467ff4755c954db63fe983935440 (commit)
      from  1bda3fbf64d54730f649d24e35beadf3d20515c2 (commit)

Summary of changes:
 Changes                |  5 +++++
 MANIFEST               |  1 +
 lib/GnuPG/Interface.pm | 10 ++++++++--
 3 files changed, 14 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 67b05adc0547467ff4755c954db63fe983935440
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Dec 17 14:07:15 2014 -0500

    Omit --homedir for symmetric encryption, to work around gpg2 bug
    
    GnuPG 2.0.x contains a bug wherein providing a --homedir option to
    symmetric encryption (which is not necessary, as there are no keys
    involved) encrypts successfully, but errors because it cannot connect to
    the (unused) GPG agent:
    
        https://bugs.g10code.com/gnupg/issue1427
        https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=841588
    
    Work around this issue by clearing the homedir, if set, before symmetric
    encryption, and setting back to its previous value afterward.

diff --git a/lib/GnuPG/Interface.pm b/lib/GnuPG/Interface.pm
index 6a382d3..f28afb4 100644
--- a/lib/GnuPG/Interface.pm
+++ b/lib/GnuPG/Interface.pm
@@ -659,10 +659,16 @@ sub encrypt( $% ) {
 
 sub encrypt_symmetrically( $% ) {
     my ( $self, %args ) = @_;
-    return $self->wrap_call(
+    # Strip the homedir and put it back after encrpyting; gpg 2.0.x
+    # fails symmetric encryption when one is passed.
+    my $homedir = $self->options->homedir;
+    $self->options->clear_homedir;
+    my $pid = $self->wrap_call(
         %args,
         commands => ['--symmetric']
     );
+    $self->options->homedir($homedir);
+    return $pid;
 }
 
 sub sign( $% ) {

commit 8cf9d7374d4606da1e8d695c49608b0f1d7fd6ba
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Dec 17 14:13:20 2014 -0500

    Checking in changes prior to tagging of version 0.51.
    
    Changelog diff is:
    
    diff --git a/Changes b/Changes
    index 630ff3b..31e4d36 100644
    --- a/Changes
    +++ b/Changes
    @@ -1,5 +1,10 @@
     Revision history for GnuPG-Interface
    
    +0.51 - 2014-12-17
    + - Update README file
    + - Work around gpg2 bug by omitting --homedir during symmetric
    +   encryption
    +
     0.50 - 2014-03-14
      - Version 0.49 implicitly required Moose; switch to a technique that
        does not

diff --git a/Changes b/Changes
index 630ff3b..31e4d36 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,10 @@
 Revision history for GnuPG-Interface
 
+0.51 - 2014-12-17
+ - Update README file
+ - Work around gpg2 bug by omitting --homedir during symmetric
+   encryption
+
 0.50 - 2014-03-14
  - Version 0.49 implicitly required Moose; switch to a technique that
    does not
diff --git a/MANIFEST b/MANIFEST
index cb6b8c1..d331caf 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -5,6 +5,7 @@ inc/Module/Install/Can.pm
 inc/Module/Install/Fetch.pm
 inc/Module/Install/Makefile.pm
 inc/Module/Install/Metadata.pm
+inc/Module/Install/ReadmeFromPod.pm
 inc/Module/Install/Win32.pm
 inc/Module/Install/WriteAll.pm
 lib/GnuPG/Fingerprint.pm
diff --git a/lib/GnuPG/Interface.pm b/lib/GnuPG/Interface.pm
index f28afb4..b613680 100644
--- a/lib/GnuPG/Interface.pm
+++ b/lib/GnuPG/Interface.pm
@@ -28,7 +28,7 @@ use Math::BigInt try => 'GMP';
 use GnuPG::Options;
 use GnuPG::Handles;
 
-$VERSION = '0.50';
+$VERSION = '0.51';
 
 has $_ => (
     isa     => 'Any',

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


More information about the Bps-public-commit mailing list