Always an MPI for RSA

This commit is contained in:
Stephen Paul Weber 2013-06-24 11:21:26 -05:00
parent c341d7f09e
commit 26860d3b98

View File

@ -181,10 +181,10 @@ class OpenPGP_Crypt_RSA {
foreach($message as $p) {
if($p instanceof OpenPGP_AsymmetricSessionKeyPacket) {
if($keys instanceof Crypt_RSA) {
$sk = self::try_decrypt_session($keys, $p->encyrpted_data);
$sk = self::try_decrypt_session($keys, substr($p->encyrpted_data, 2));
} else if(strlen(str_replace('0', '', $p->keyid)) < 1) {
foreach($keys->key as $k) {
$sk = self::try_decrypt_session(self::convert_private_key($k), $p->encyrpted_data);
$sk = self::try_decrypt_session(self::convert_private_key($k), substr($p->encyrpted_data, 2));
if($sk) break;
}
} else {