mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-02-03 20:38:29 +00:00
X509: getPublicKey() didn't work for SPKAC
This commit is contained in:
parent
97ab584c63
commit
844d7ab539
@ -2101,7 +2101,12 @@ class X509
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->currentCert) && is_array($this->currentCert)) {
|
if (isset($this->currentCert) && is_array($this->currentCert)) {
|
||||||
foreach (['tbsCertificate/subjectPublicKeyInfo', 'certificationRequestInfo/subjectPKInfo'] as $path) {
|
$paths = [
|
||||||
|
'tbsCertificate/subjectPublicKeyInfo',
|
||||||
|
'certificationRequestInfo/subjectPKInfo',
|
||||||
|
'publicKeyAndChallenge/spki'
|
||||||
|
];
|
||||||
|
foreach ($paths as $path) {
|
||||||
$keyinfo = $this->subArray($this->currentCert, $path);
|
$keyinfo = $this->subArray($this->currentCert, $path);
|
||||||
if (!empty($keyinfo)) {
|
if (!empty($keyinfo)) {
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user