Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
inc-meta/mdx/_rules/check_algsupport.xsl
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

From commit hash ukf/ukf-testbed/517ac995365d5151f5e954f4c6f5eea05e2e3bf4 See ukf/ukf-meta#416 for details
64 lines (52 sloc)
2.07 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
check_algsupport.xsl | |
Checking ruleset for the SAML V2.0 Metadata Profile for Algorithm Support. | |
Author: Ian A. Young <ian@iay.org.uk> | |
--> | |
<xsl:stylesheet version="1.0" | |
xmlns:alg="urn:oasis:names:tc:SAML:metadata:algsupport" | |
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"> | |
<!-- | |
Common support functions. | |
--> | |
<xsl:import href="check_framework.xsl"/> | |
<!-- | |
2.3 md:EncryptionMethod should appear only in md:KeyDescriptor elements | |
whose @use is omitted or set to "encryption", i.e., not "signing". | |
--> | |
<xsl:template match="md:EncryptionMethod[../@use='signing']"> | |
<xsl:call-template name="error"> | |
<xsl:with-param name="m">EncryptionMethod should not be present on 'signing' KeyDescriptor</xsl:with-param> | |
</xsl:call-template> | |
</xsl:template> | |
<!-- | |
Check for duplicate SigningMethod or DigestMethod algorithms in any given list. | |
--> | |
<xsl:template match="md:Extensions[alg:*]"> | |
<!-- check individual alg:SigningMethod and alg:DigestMethod elements --> | |
<xsl:apply-templates/> | |
</xsl:template> | |
<!-- | |
2.4 Check for misplaced SigningMethod or DigestMethod elements. | |
--> | |
<xsl:template match="alg:*[count(parent::md:Extensions)=0]"> | |
<xsl:call-template name="error"> | |
<xsl:with-param name="m"> | |
<xsl:text>alg:</xsl:text> | |
<xsl:value-of select="local-name()"/> | |
<xsl:text> must only appear within an Extensions element</xsl:text> | |
</xsl:with-param> | |
</xsl:call-template> | |
</xsl:template> | |
<!-- | |
Check for duplicate EncryptionMethod elements in any given list. | |
--> | |
<xsl:template match="md:KeyDescriptor[md:EncryptionMethod]"> | |
<!-- check individual md:EncryptionMethod elements --> | |
<xsl:apply-templates/> | |
</xsl:template> | |
</xsl:stylesheet> |