From 299f7b554dc69b4fe9ffb8d85bb5eba920499305 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 3 Jan 2020 08:45:16 -0600 Subject: [PATCH] X509: fix bitwise mask for PSS / PKCS1 RSA mode checking --- phpseclib/File/X509.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index 4ae21291..ae61cdf6 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -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()) {