mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-03 18:18:05 +01:00
RSA: make sure that parameters is null for relaxed PKCS1 signatures
This commit is contained in:
parent
c6a22faf60
commit
42fc46e9a9
@ -188,6 +188,10 @@ class PublicKey extends RSA implements Common\PublicKey
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($decoded['digestAlgorithm']['parameters']) && $decoded['digestAlgorithm']['parameters'] !== ['null' => '']) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$hash = $decoded['digestAlgorithm']['algorithm'];
|
$hash = $decoded['digestAlgorithm']['algorithm'];
|
||||||
$hash = substr($hash, 0, 3) == 'id-' ?
|
$hash = substr($hash, 0, 3) == 'id-' ?
|
||||||
substr($hash, 3) :
|
substr($hash, 3) :
|
||||||
|
Loading…
Reference in New Issue
Block a user