Commit 64cef2b5 authored by Denis Filatov's avatar Denis Filatov
Browse files

fix sspbitmask xslt

parent 8336936b
......@@ -201,13 +201,22 @@
<xsl:param name="certType"/>
<xsl:variable name="SSPValue">
<xsl:choose>
<xsl:when test="normalize-space(.) != ''"><xsl:value-of select="normalize-space(.)"/></xsl:when>
<xsl:when test="@value = 'CAM' or @value=$AID-CAM">01 FF FF</xsl:when>
<xsl:when test="normalize-space(.) != ''">
<xsl:choose>
<xsl:when test="contains(normalize-space(.), '/')">
<xsl:value-of select="substring-before(normalize-space(.),'/')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space(.)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="@value = 'CAM' or @value=$AID-CAM">01 FF FC</xsl:when>
<xsl:when test="@value = 'DENM' or @value=$AID-DENM">01 FF FF</xsl:when>
<xsl:when test="@value = 'TLM' or @value = 'SPAT' or @value=$AID-SPAT">01 FF FF FF</xsl:when>
<xsl:when test="@value = 'RLT' or @value = 'MAP' or @value=$AID-MAP">01 FF FF FF</xsl:when>
<xsl:when test="@value = 'IVI' or @value=$AID-IVI">01 FF FF FF</xsl:when>
<xsl:when test="@value = 'TLC' or @value=$AID-TLC">01 FF FF FF</xsl:when>
<xsl:when test="@value = 'TLM' or @value = 'SPAT' or @value=$AID-SPAT">01 E0</xsl:when>
<xsl:when test="@value = 'RLT' or @value = 'MAP' or @value=$AID-MAP">01 C0</xsl:when>
<xsl:when test="@value = 'IVI' or @value=$AID-IVI">01 00 00 00 FF F8</xsl:when>
<xsl:when test="@value = 'TLC' or @value=$AID-TLC">01 FF FF E0</xsl:when>
<xsl:when test="@value = 'CRT-REQ' or @value = $AID-CRT-REQ">
<xsl:choose>
<xsl:when test="$certType = 'ROOT'">01 FE</xsl:when>
......@@ -217,6 +226,33 @@
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="SSPBitmask">
<xsl:choose>
<xsl:when test="normalize-space(.) != ''">
<xsl:choose>
<xsl:when test="contains(normalize-space(.), '/')">
<xsl:value-of select="substring-after(normalize-space(.),'/')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="translate(normalize-space(.),'0123456789ABCDEF','FFFFFFFFFFFFFFFF')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="@value = 'CAM' or @value=$AID-CAM">FF 00 03</xsl:when>
<xsl:when test="@value = 'DENM' or @value=$AID-DENM">FF 00 00 00</xsl:when>
<xsl:when test="@value = 'TLM' or @value = 'SPAT' or @value=$AID-SPAT">FF 1F</xsl:when>
<xsl:when test="@value = 'RLT' or @value = 'MAP' or @value=$AID-MAP">FF 3F</xsl:when>
<xsl:when test="@value = 'IVI' or @value=$AID-IVI">FF 00 00 00 00 07</xsl:when>
<xsl:when test="@value = 'TLC' or @value=$AID-TLC">FF 00 00 1F</xsl:when>
<xsl:when test="@value = 'CRT-REQ' or @value = $AID-CRT-REQ">
<xsl:choose>
<xsl:when test="$certType = 'ROOT'">FF 01</xsl:when>
<xsl:when test="$certType = 'EA'">FF FF</xsl:when>
<xsl:otherwise>01 FF</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:variable>
<PsidSspRange>
<xsl:comment><xsl:value-of select="@value"/></xsl:comment>
<psid>
......@@ -238,7 +274,7 @@
<sspRange>
<bitmapSspRange>
<sspValue><xsl:value-of select="$SSPValue"/></sspValue>
<sspBitmask><xsl:value-of select="$SSPValue"/></sspBitmask>
<sspBitmask><xsl:value-of select="$SSPBitmask"/></sspBitmask>
</bitmapSspRange>
</sspRange>
</xsl:if>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment