Skip to content

Commit

Permalink
Remove future check for algorithm support consistent with new saml2int
Browse files Browse the repository at this point in the history
Turns out that future checks are called during metadata import
  • Loading branch information
Alex Stuart committed Mar 8, 2018
1 parent e313b91 commit 0c4b489
Showing 1 changed file with 0 additions and 69 deletions.
69 changes: 0 additions & 69 deletions mdx/_rules/check_future_4.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -28,73 +28,4 @@
-->
<xsl:import href="check_framework.xsl"/>

<!--
If an entity has algorithmic agility metadata, check whether it has the algorithms
which are listed in the 2018 SAML V2.0 Interoperability Deployment Profile
See section 3.3 of https://kantarainitiative.github.io/SAMLprofiles/saml2int.html
and ukf/ukf-meta#157
-->
<xsl:template match="md:KeyDescriptor[count(md:EncryptionMethod) > 0]">

<xsl:variable name="gcm"
select="md:EncryptionMethod[
@Algorithm='http://www.w3.org/2009/xmlenc11#aes128-gcm' or
@Algorithm='http://www.w3.org/2009/xmlenc11#aes192-gcm' or
@Algorithm='http://www.w3.org/2009/xmlenc11#aes256-gcm'
]"/>

<xsl:variable name="keytransport"
select="md:EncryptionMethod[
@Algorithm='http://www.w3.org/2009/xmlenc11#rsa-oaep' or
@Algorithm='http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p'
]"/>

<xsl:if test="count($gcm) = 0">
<xsl:call-template name="error">
<xsl:with-param name="m">Does not contain a GCM EncryptionMethod specified in new saml2int</xsl:with-param>
</xsl:call-template>
</xsl:if>

<xsl:if test="count($keytransport) = 0">
<xsl:call-template name="error">
<xsl:with-param name="m">Does not contain a Key Transport EncryptionMethod specified in new saml2int</xsl:with-param>
</xsl:call-template>
</xsl:if>

</xsl:template>

<xsl:template match="md:Extensions
[
count(alg:DigestMethod) > 0 or
count(alg:SigningMethod) > 0
]">

<xsl:variable name="signing"
select="alg:SigningMethod[
@Algorithm='http://www.w3.org/2001/04/xmldsig-more#rsa-sha256' or
@Algorithm='http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256'
]"/>

<xsl:variable name="digest"
select="alg:DigestMethod[
@Algorithm='http://www.w3.org/2001/04/xmlenc#sha256'
]"/>

<xsl:if test="count($signing) = 0">
<xsl:call-template name="error">
<xsl:with-param name="m">Does not contain a SigningMethod specified in new saml2int</xsl:with-param>
</xsl:call-template>
</xsl:if>

<xsl:if test="count($digest) = 0">
<xsl:call-template name="error">
<xsl:with-param name="m">Does not contain a DigestMethod specified in new saml2int</xsl:with-param>
</xsl:call-template>
</xsl:if>

</xsl:template>

</xsl:stylesheet>

0 comments on commit 0c4b489

Please sign in to comment.