1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-12 09:09:39 +01:00

X509: fix bitwise mask for PSS / PKCS1 RSA mode checking

This commit is contained in:
terrafrost 2020-01-03 08:45:16 -06:00
parent c4e07725aa
commit 299f7b554d

View File

@ -2948,7 +2948,7 @@ class X509
private static function identifySignatureAlgorithm(PrivateKey $key)
{
if ($key instanceof RSA) {
if ($key->getPadding() | RSA::SIGNATURE_PSS) {
if ($key->getPadding() & RSA::SIGNATURE_PSS) {
return 'id-RSASSA-PSS';
}
switch ($key->getHash()) {