10
10
use SimpleSAML \XML \Constants as C ;
11
11
use SimpleSAML \XML \Exception \InvalidDOMElementException ;
12
12
use SimpleSAML \XMLSecurity \Exception \InvalidArgumentException ;
13
+ use SimpleSAML \XMLSecurity \XML \dsig11 \X509Digest ;
13
14
14
15
/**
15
16
* Class representing a ds:X509Data element.
@@ -24,15 +25,16 @@ final class X509Data extends AbstractDsElement
24
25
* @param (\SimpleSAML\XML\Chunk|
25
26
* \SimpleSAML\XMLSecurity\XML\ds\X509Certificate|
26
27
* \SimpleSAML\XMLSecurity\XML\ds\X509IssuerSerial|
27
- * \SimpleSAML\XMLSecurity\XML\ds\X509SubjectName)[] $data
28
+ * \SimpleSAML\XMLSecurity\XML\ds\X509SubjectName|
29
+ * \SimpleSAML\XMLSecurity\XML\dsig11\X509Digest)[] $data
28
30
*/
29
31
public function __construct (
30
32
protected array $ data ,
31
33
) {
32
34
Assert::maxCount ($ data , C::UNBOUNDED_LIMIT );
33
35
Assert::allIsInstanceOfAny (
34
36
$ data ,
35
- [Chunk::class, X509Certificate::class, X509IssuerSerial::class, X509SubjectName::class],
37
+ [Chunk::class, X509Certificate::class, X509IssuerSerial::class, X509SubjectName::class, X509Digest::class ],
36
38
InvalidArgumentException::class,
37
39
);
38
40
}
@@ -44,7 +46,8 @@ public function __construct(
44
46
* @return (\SimpleSAML\XML\Chunk|
45
47
* \SimpleSAML\XMLSecurity\XML\ds\X509Certificate|
46
48
* \SimpleSAML\XMLSecurity\XML\ds\X509IssuerSerial|
47
- * \SimpleSAML\XMLSecurity\XML\ds\X509SubjectName)[]
49
+ * \SimpleSAML\XMLSecurity\XML\ds\X509SubjectName|
50
+ * \SimpleSAML\XMLSecurity\XML\dsig11\X509Digest)[]
48
51
*/
49
52
public function getData (): array
50
53
{
@@ -80,6 +83,7 @@ public static function fromXML(DOMElement $xml): static
80
83
'X509Certificate ' => X509Certificate::fromXML ($ n ),
81
84
'X509IssuerSerial ' => X509IssuerSerial::fromXML ($ n ),
82
85
'X509SubjectName ' => X509SubjectName::fromXML ($ n ),
86
+ 'X509Digest ' => X509Digest::fromXML ($ n ),
83
87
default => new Chunk ($ n ),
84
88
};
85
89
}
0 commit comments