Skip to content

Commit

Permalink
Promote check for SAML 2.0 SPs without KeyDescriptor usable for encry…
Browse files Browse the repository at this point in the history
…ption to production.
  • Loading branch information
iay committed Apr 2, 2012
1 parent 065818c commit 7497bed
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
16 changes: 15 additions & 1 deletion build/check_saml2.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="urn:oasis:names:tc:SAML:2.0:metadata">

<!--
Expand Down Expand Up @@ -54,4 +55,17 @@
</xsl:call-template>
</xsl:template>


<!--
Check for SAML 2.0 SPs which lack an encryption key.
-->
<xsl:template match="md:SPSSODescriptor
[contains(@protocolSupportEnumeration, 'urn:oasis:names:tc:SAML:2.0:protocol')]
[not(md:KeyDescriptor[descendant::ds:X509Data][@use='encryption'])]
[not(md:KeyDescriptor[descendant::ds:X509Data][not(@use)])]">
<xsl:call-template name="error">
<xsl:with-param name="m">SAML 2.0 SP has no encryption key</xsl:with-param>
</xsl:call-template>
</xsl:template>

</xsl:stylesheet>
13 changes: 0 additions & 13 deletions mdx/check_future_0.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,4 @@
<xsl:import href="../build/check_framework.xsl"/>


<!--
Check for SAML 2.0 SPs which lack an encryption key.
-->

<xsl:template match="md:SPSSODescriptor
[contains(@protocolSupportEnumeration, 'urn:oasis:names:tc:SAML:2.0:protocol')]
[not(md:KeyDescriptor[descendant::ds:X509Data][@use='encryption'])]
[not(md:KeyDescriptor[descendant::ds:X509Data][not(@use)])]">
<xsl:call-template name="error">
<xsl:with-param name="m">SAML 2 SP has no encryption key</xsl:with-param>
</xsl:call-template>
</xsl:template>

</xsl:stylesheet>

0 comments on commit 7497bed

Please sign in to comment.