Skip to content

Commit 55defa2

Browse files
committed
Add ds:MgmtData element
1 parent bf9e836 commit 55defa2

File tree

8 files changed

+20
-1
lines changed

8 files changed

+20
-1
lines changed

src/XML/ds/AbstractKeyInfoType.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ abstract class AbstractKeyInfoType extends AbstractDsElement
3636
* \SimpleSAML\XMLSecurity\XML\ds\RetrievalMethod|
3737
* \SimpleSAML\XMLSecurity\XML\ds\X509Data|
3838
* \SimpleSAML\XMLSecurity\XML\ds\PGPData|
39+
* \SimpleSAML\XMLSecurity\XML\ds\MgmtData|
3940
* \SimpleSAML\XML\SerializableElementInterface
4041
* )[] $info
4142
* @param string|null $Id
@@ -65,7 +66,15 @@ final public function __construct(
6566
if ($item instanceof AbstractDsElement) {
6667
Assert::isInstanceOfAny(
6768
$item,
68-
[KeyName::class, KeyValue::class, RetrievalMethod::class, X509Data::class, PGPData::class],
69+
[
70+
KeyName::class,
71+
KeyValue::class,
72+
RetrievalMethod::class,
73+
X509Data::class,
74+
PGPData::class,
75+
// SPKIData::class,
76+
MgmtData::class,
77+
],
6978
SchemaViolationException::class,
7079
);
7180
}

tests/XML/ds/KeyInfoTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use SimpleSAML\XMLSecurity\XML\ds\AbstractKeyInfoType;
1717
use SimpleSAML\XMLSecurity\XML\ds\KeyInfo;
1818
use SimpleSAML\XMLSecurity\XML\ds\KeyName;
19+
use SimpleSAML\XMLSecurity\XML\ds\MgmtData;
1920
use SimpleSAML\XMLSecurity\XML\ds\PGPData;
2021
use SimpleSAML\XMLSecurity\XML\ds\PGPKeyID;
2122
use SimpleSAML\XMLSecurity\XML\ds\PGPKeyPacket;
@@ -105,6 +106,7 @@ public function testMarshalling(): void
105106
new PGPKeyPacket('GpM8'),
106107
[new P('/CTj03d1DB5e2t7CTo9BEzCf5S9NRzwnBgZRlm32REI=')],
107108
),
109+
new MgmtData('ManagementData'),
108110
new Chunk(DOMDocumentFactory::fromString(
109111
'<ssp:Chunk xmlns:ssp="urn:x-simplesamlphp:namespace">some</ssp:Chunk>',
110112
)->documentElement),

tests/XML/xenc/OriginatorKeyInfoTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement;
1515
use SimpleSAML\XMLSecurity\XML\ds\AbstractKeyInfoType;
1616
use SimpleSAML\XMLSecurity\XML\ds\KeyName;
17+
use SimpleSAML\XMLSecurity\XML\ds\MgmtData;
1718
use SimpleSAML\XMLSecurity\XML\ds\PGPData;
1819
use SimpleSAML\XMLSecurity\XML\ds\PGPKeyID;
1920
use SimpleSAML\XMLSecurity\XML\ds\PGPKeyPacket;
@@ -101,6 +102,7 @@ public function testMarshalling(): void
101102
new PGPKeyPacket('GpM8'),
102103
[new P('/CTj03d1DB5e2t7CTo9BEzCf5S9NRzwnBgZRlm32REI=')],
103104
),
105+
new MgmtData('ManagementData'),
104106
new Chunk(DOMDocumentFactory::fromString(
105107
'<ssp:Chunk xmlns:ssp="urn:x-simplesamlphp:namespace">some</ssp:Chunk>',
106108
)->documentElement),

tests/XML/xenc/RecipientKeyInfoTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement;
1515
use SimpleSAML\XMLSecurity\XML\ds\AbstractKeyInfoType;
1616
use SimpleSAML\XMLSecurity\XML\ds\KeyName;
17+
use SimpleSAML\XMLSecurity\XML\ds\MgmtData;
1718
use SimpleSAML\XMLSecurity\XML\ds\PGPData;
1819
use SimpleSAML\XMLSecurity\XML\ds\PGPKeyID;
1920
use SimpleSAML\XMLSecurity\XML\ds\PGPKeyPacket;
@@ -101,6 +102,7 @@ public function testMarshalling(): void
101102
new PGPKeyPacket('GpM8'),
102103
[new P('/CTj03d1DB5e2t7CTo9BEzCf5S9NRzwnBgZRlm32REI=')],
103104
),
105+
new MgmtData('ManagementData'),
104106
new Chunk(DOMDocumentFactory::fromString(
105107
'<ssp:Chunk xmlns:ssp="urn:x-simplesamlphp:namespace">some</ssp:Chunk>',
106108
)->documentElement),

tests/resources/xml/ds_KeyInfo.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
<ds:PGPKeyPacket>GpM8</ds:PGPKeyPacket>
1010
<xenc:P xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">/CTj03d1DB5e2t7CTo9BEzCf5S9NRzwnBgZRlm32REI=</xenc:P>
1111
</ds:PGPData>
12+
<ds:MgmtData xmlns:ds="http://www.w3.org/2000/09/xmldsig#">ManagementData</ds:MgmtData>
1213
<ssp:Chunk xmlns:ssp="urn:x-simplesamlphp:namespace">some</ssp:Chunk>
1314
</ds:KeyInfo>

tests/resources/xml/ds_Signature.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<ds:PGPKeyPacket>GpM8</ds:PGPKeyPacket>
2424
<xenc:P xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">/CTj03d1DB5e2t7CTo9BEzCf5S9NRzwnBgZRlm32REI=</xenc:P>
2525
</ds:PGPData>
26+
<ds:MgmtData>ManagementData</ds:MgmtData>
2627
<ssp:Chunk xmlns:ssp="urn:x-simplesamlphp:namespace">some</ssp:Chunk>
2728
</ds:KeyInfo>
2829
<ds:Object>

tests/resources/xml/xenc_OriginatorKeyInfo.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
<ds:PGPKeyPacket>GpM8</ds:PGPKeyPacket>
1010
<xenc:P xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">/CTj03d1DB5e2t7CTo9BEzCf5S9NRzwnBgZRlm32REI=</xenc:P>
1111
</ds:PGPData>
12+
<ds:MgmtData xmlns:ds="http://www.w3.org/2000/09/xmldsig#">ManagementData</ds:MgmtData>
1213
<ssp:Chunk xmlns:ssp="urn:x-simplesamlphp:namespace">some</ssp:Chunk>
1314
</xenc:OriginatorKeyInfo>

tests/resources/xml/xenc_RecipientKeyInfo.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
<ds:PGPKeyPacket>GpM8</ds:PGPKeyPacket>
1010
<xenc:P xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">/CTj03d1DB5e2t7CTo9BEzCf5S9NRzwnBgZRlm32REI=</xenc:P>
1111
</ds:PGPData>
12+
<ds:MgmtData xmlns:ds="http://www.w3.org/2000/09/xmldsig#">ManagementData</ds:MgmtData>
1213
<ssp:Chunk xmlns:ssp="urn:x-simplesamlphp:namespace">some</ssp:Chunk>
1314
</xenc:RecipientKeyInfo>

0 commit comments

Comments
 (0)