Skip to content

Commit

Permalink
Extend the trust fabric breakdown sections to add information about K…
Browse files Browse the repository at this point in the history
…eyName-only and no-KeyName descriptors. Highlight entities which have both, which seems unlikely to be intentional.
  • Loading branch information
iay committed Oct 23, 2012
1 parent 9e82e61 commit c2726c0
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions mdx/uk/statistics.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1379,6 +1379,12 @@


<!--
*******************************************************
*** ***
*** T R U S T M O D E L S B R E A K D O W N ***
*** ***
*******************************************************
Break down a set of entities by the trust models available.
-->
<xsl:template name="entity.breakdown.by.trust">
Expand Down Expand Up @@ -1419,6 +1425,40 @@
(<xsl:value-of select="format-number($dkeyEntityCount div $entityCount, '0.0%')"/>)
</p>
</li>

<xsl:variable name="e.keyonly" select="$entities[descendant::md:KeyDescriptor[not(descendant::ds:X509Data)]]"/>
<li>
<p>
At least one <code>KeyName</code>-only <code>KeyDescriptor</code>:
<xsl:value-of select="count($e.keyonly)"/>
</p>
</li>

<xsl:variable name="e.nokey" select="$entities[descendant::md:KeyDescriptor[not(descendant::ds:KeyName)]]"/>
<li>
<p>
At least one no-<code>KeyName</code>
<xsl:text> </xsl:text><code>KeyDescriptor</code>:
<xsl:value-of select="count($e.nokey)"/>
</p>
</li>

<xsl:variable name="e.oneofeach" select="set:intersection($e.keyonly, $e.nokey)"/>
<xsl:if test="count($e.oneofeach) != 0">
<li>
<p>
At least one <code>KeyName</code>-only <code>KeyDescriptor</code>
<xsl:text> </xsl:text><i>and</i> at least one no-<code>KeyName</code>
<xsl:text> </xsl:text><code>KeyDescriptor</code>:
<xsl:value-of select="count($e.oneofeach)"/>
</p>
<ul>
<xsl:for-each select="$e.oneofeach">
<li><code><xsl:value-of select="@entityID"/></code></li>
</xsl:for-each>
</ul>
</li>
</xsl:if>
</ul>

</xsl:template>
Expand Down Expand Up @@ -1756,6 +1796,13 @@
</xsl:if>
</xsl:template>

<!--
*********************************************************
*** ***
*** K E Y D E S C R I P T O R B R E A K D O W N ***
*** ***
*********************************************************
-->
<xsl:template name="keydescriptor.breakdown">
<xsl:param name="entities"/>
<xsl:variable name="kd" select="$entities//md:KeyDescriptor"/>
Expand Down

0 comments on commit c2726c0

Please sign in to comment.