mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-05 13:07:53 +00:00
X509: getPublicKey() didn't return correct RSA key type
This commit is contained in:
parent
a8a13ae7c9
commit
f0736a8828
@ -2203,8 +2203,10 @@ class X509
|
||||
$key = $keyinfo['subjectPublicKey'];
|
||||
|
||||
switch ($keyinfo['algorithm']['algorithm']) {
|
||||
case 'id-RSASSA-PSS':
|
||||
return RSA::loadFormat('PSS', $key);
|
||||
case 'rsaEncryption':
|
||||
return RSA::loadFormat('PKCS8', $key);
|
||||
return RSA::loadFormat('PKCS8', $key)->withPadding(RSA::SIGNATURE_PKCS1);
|
||||
case 'id-ecPublicKey':
|
||||
case 'id-Ed25519':
|
||||
case 'id-Ed448':
|
||||
|
Loading…
Reference in New Issue
Block a user