Fix for PHP 5.3 grammar
This commit is contained in:
parent
cd15aec6f9
commit
ae062433b7
@ -95,7 +95,8 @@ class Decryption extends PHPUnit_Framework_TestCase {
|
|||||||
public function testDecryptAsymmetric() {
|
public function testDecryptAsymmetric() {
|
||||||
$m = OpenPGP_Message::parse(file_get_contents(dirname(__FILE__) . '/data/hello.gpg'));
|
$m = OpenPGP_Message::parse(file_get_contents(dirname(__FILE__) . '/data/hello.gpg'));
|
||||||
$key = OpenPGP_Message::parse(file_get_contents(dirname(__FILE__) . '/data/helloKey.gpg'));
|
$key = OpenPGP_Message::parse(file_get_contents(dirname(__FILE__) . '/data/helloKey.gpg'));
|
||||||
$m2 = (new OpenPGP_Crypt_RSA($key))->decrypt($m);
|
$decryptor = new OpenPGP_Crypt_RSA($key);
|
||||||
|
$m2 = $decryptor->decrypt($m);
|
||||||
while($m2[0] instanceof OpenPGP_CompressedDataPacket) $m2 = $m2[0]->data;
|
while($m2[0] instanceof OpenPGP_CompressedDataPacket) $m2 = $m2[0]->data;
|
||||||
foreach($m2 as $p) {
|
foreach($m2 as $p) {
|
||||||
if($p instanceof OpenPGP_LiteralDataPacket) {
|
if($p instanceof OpenPGP_LiteralDataPacket) {
|
||||||
|
Loading…
Reference in New Issue
Block a user