Edit report at http://pear.php.net/bugs/bug.php?id=16269&edit=1
ID: 16269
Updated by: mike@silverorange.com
Reported By: tmachado3 at gmail dot com
Summary: Dual Encrypt dont work
Status: Open
Type: Documentation Problem
Package: Crypt_GPG
Operating System: Ubuntu 9.04 x86
Package Version: 1.0.0
PHP Version: 5.2.9
Roadmap Versions:
New Comment:
What you're doing should be working. Can you share any information
about they key types used to encrypt?
Previous Comments:
------------------------------------------------------------------------
[2009-05-28 23:57:18] machado
Description:
------------
I want to encrypt data with 2 public keys, but I have the folowing
problem: I can encrypt with the two keys I choose, and I can decrypt
data using only one, but when I'm using some key manager (FireGPG for
example), it says always "wrong passphrase" about the second encrypt key
I had (in my case key with email tmachado3@gmail.com).
I've searched by the documentation, but cant found a solution. Its
obvious something is not going well.
Test script:
---------------
<?php
include("Connections/connectDB.php");
require_once 'Crypt/GPG.php';
$gpg = new Crypt_GPG(array('homedir' =>
'/media/Dados/Projecto/Files/gpg',
'debug' => false));
$gpg->addEncryptKey('rafaelsereno@gmail.com');
$gpg->addEncryptKey('tmachado3@gmail.com');
(...)
$gpg->addDecryptKey('tmachado3@gmail.com','1234');
(...)
Expected result:
----------------
Decrypted data
Actual result:
--------------
Bad passphrase
------------------------------------------------------------------------