Skip to content

Commit 12c48c0

Browse files
committed
Sign and validate XML from memory #5
1 parent 05e73b3 commit 12c48c0

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

src/XmlSignatureValidator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ public function verifyXmlFile(string $filename): bool
176176
*/
177177
public function verifyXml(string $xmlContent): bool
178178
{
179+
if (!$this->publicKeyId) {
180+
throw new XmlSignatureValidatorException('No public key provided');
181+
}
182+
179183
// Read the xml file content
180184
$xml = new DOMDocument();
181185
$xml->preserveWhiteSpace = true;

tests/test.php

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)