Re: BUG #7923: PGP secret key with password decryption not working - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: BUG #7923: PGP secret key with password decryption not working
Date
Msg-id 20131128173740.GA20216@momjian.us
Whole thread Raw
In response to BUG #7923: PGP secret key with password decryption not working  (keith@omniti.com)
List pgsql-bugs
On Wed, Mar  6, 2013 at 11:31:25PM +0000, keith@omniti.com wrote:
> The following bug has been logged on the website:
>
> Bug reference:      7923
> Logged by:          Keith Fiske
> Email address:      keith@omniti.com
> PostgreSQL version: 9.2.3
> Operating system:   Debian/Ubuntu/Solaris
> Description:
>
> Running into an issue when we tried to add a password to a gpg secret key
> used to encrypt data in the database. Things have been working fine with no
> password on they key, but that isn't ideal. I was able to recreate this
> issue on my local install of postgres, so it's not just an issue on the
> server where I first noticed it. Below is the process I went through,
> generating a key, moving it to where postgres can read it, encrypting and
> then attempting to decrypt the data. I know the password I gave is correct
> because I used the same password to remove it from the key and then things
> just worked.
>
> Ran into someone else reporting pretty much the same issue but no resolution
> other than removing the password.
> http://bytes.com/topic/postgresql/answers/943536-corrupt-data-error-decryption-postgresql-using-gnupg

FYI, I believe this was fixed here:

    commit 477b5a0e24f3b62a470f9684e22e36a2c7735274
    Author: Tom Lane <tgl@sss.pgh.pa.us>
    Date:   Fri May 10 13:06:48 2013 -0400

        Fix pgp_pub_decrypt() so it works for secret keys with passwords.

        Per report from Keith Fiske.

        Marko Kreen

Here are the details:

    http://www.postgresql.org/message-id/20130506193940.GA3078@gmail.com

The fix is included in all releases done on Oct. 10, 2013.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: PostgreSQL 6.2.5 Visual Studio Build does not pass the regression tests.
Next
From: Tomonari Katsumata
Date:
Subject: Re: BUG #8434: Why does dead lock occur many times ?