Skip to content

Commit

Permalink
Tiny code style rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks3w committed Nov 5, 2013
1 parent 6e68544 commit 96b8d60
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/FR3D/XmlDSig/Adapter/XmlseclibsAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ public function verify(DOMDocument $data)
if (!$this->getPublicKey()) {
// try to get the public key from the certificate
$objKey = $objXMLSecDSig->locateKey();
if ($objKey) {
XMLSecEnc::staticLocateKeyInfo($objKey, $objDSig);
$this->publicKey = $objKey->getX509Certificate();
$this->keyAlgorithm = $objKey->getAlgorith();
} else {
if (!$objKey) {
throw new RuntimeException(
'There is no set either private key or public key for signature verification.'
);
}

XMLSecEnc::staticLocateKeyInfo($objKey, $objDSig);
$this->publicKey = $objKey->getX509Certificate();
$this->keyAlgorithm = $objKey->getAlgorith();
}

if (!$objKey) {
Expand Down

0 comments on commit 96b8d60

Please sign in to comment.