X509: CS adjustments

This commit is contained in:
terrafrost 2014-06-05 08:33:27 -05:00
parent aabc5cf822
commit b1ad911d20

View File

@ -3041,8 +3041,9 @@ class File_X509
return false; return false;
} }
$algorithm = $this->_subArray($spkac, 'publicKeyAndChallenge/spki/algorithm/algorithm');
switch (true) { switch (true) {
case !($algorithm = $this->_subArray($spkac, 'publicKeyAndChallenge/spki/algorithm/algorithm')): case !$algorithm:
case is_object($spkac['publicKeyAndChallenge']['spki']['subjectPublicKey']); case is_object($spkac['publicKeyAndChallenge']['spki']['subjectPublicKey']);
break; break;
default: default:
@ -3450,7 +3451,8 @@ class File_X509
$this->publicKey = new $class(); $this->publicKey = new $class();
$this->publicKey->loadKey($this->privateKey->getPublicKey()); $this->publicKey->loadKey($this->privateKey->getPublicKey());
$this->publicKey->setPublicKey(); $this->publicKey->setPublicKey();
if (!($publicKey = $this->_formatSubjectPublicKey())) { $publicKey = $this->_formatSubjectPublicKey();
if (!$publicKey) {
return false; return false;
} }
$this->publicKey = $origPublicKey; $this->publicKey = $origPublicKey;