If session decryption fails, return NULL
Otherwise it returns false, we try to unpack that, and generally bad things happen.
This commit is contained in:
@@ -208,7 +208,8 @@ class OpenPGP_Crypt_RSA {
|
||||
|
||||
static function try_decrypt_session($key, $edata) {
|
||||
$key->setEncryptionMode(CRYPT_RSA_ENCRYPTION_PKCS1);
|
||||
$data = $key->decrypt($edata);
|
||||
$data = @$key->decrypt($edata);
|
||||
if(!$data) return NULL;
|
||||
$sk = substr($data, 1, strlen($data)-3);
|
||||
$chk = unpack('n', substr($data, -2));
|
||||
$chk = reset($chk);
|
||||
|
Reference in New Issue
Block a user