mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-02 17:52:59 +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;
|
||||
}
|
||||
|
||||
if (isset($decoded['digestAlgorithm']['parameters']) && $decoded['digestAlgorithm']['parameters'] !== ['null' => '']) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$hash = $decoded['digestAlgorithm']['algorithm'];
|
||||
$hash = substr($hash, 0, 3) == 'id-' ?
|
||||
substr($hash, 3) :
|
||||
|
Loading…
Reference in New Issue
Block a user