Skip to content

Commit 9594c6f

Browse files
committed
Add assertion
1 parent dc493bc commit 9594c6f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/XML/ds/X509Certificate.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ public function getCertificate(): string
5252
*/
5353
private function setCertificate(string $certificate): void
5454
{
55+
Assert::notEmpty($digest, 'DigestValue cannot be empty');
56+
Assert::stringPlausibleBase64($digest, 'ds:X509Certificate is not a valid Base64 encoded string');
57+
5558
$this->certificate = $certificate;
5659
}
5760

0 commit comments

Comments
 (0)