2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
4 <xsl:output indent="yes" encoding="UTF-8" method="html" omit-xml-declaration="yes"/>
6 <!-- Format a date like "1960-02-10" into "February 10th, 1960" -->
7 <xsl:template name="dateformat">
8 <xsl:param name="date" select="."/>
9 <xsl:variable name="day" select="number(substring($date,7,2))"/>
10 <xsl:variable name="month" select="number(substring($date,5,2))"/>
11 <xsl:variable name="year" select="number(substring($date,1,4))"/>
13 <xsl:if test="$day > 0">
14 <xsl:value-of select="$day" />
16 <xsl:when test="$day=1 or $day=21 or $day=31">st</xsl:when>
17 <xsl:when test="$day=2 or $day=22">nd</xsl:when>
18 <xsl:when test="$day=3 or $day=23">rd</xsl:when>
19 <xsl:otherwise>th</xsl:otherwise>
21 <xsl:text> </xsl:text>
24 <xsl:when test="$month=01">January</xsl:when>
25 <xsl:when test="$month=02">February</xsl:when>
26 <xsl:when test="$month=03">March</xsl:when>
27 <xsl:when test="$month=04">April</xsl:when>
28 <xsl:when test="$month=05">May</xsl:when>
29 <xsl:when test="$month=06">June</xsl:when>
30 <xsl:when test="$month=07">July</xsl:when>
31 <xsl:when test="$month=08">August</xsl:when>
32 <xsl:when test="$month=09">September</xsl:when>
33 <xsl:when test="$month=10">October</xsl:when>
34 <xsl:when test="$month=11">November</xsl:when>
35 <xsl:when test="$month=12">December</xsl:when>
37 <xsl:if test="$year>0">
38 <xsl:text> </xsl:text>
39 <xsl:value-of select="$year"/>
43 <xsl:key name="unique-date" match="@public" use="substring(.,1,4)"/>
44 <xsl:key name="unique-base" match="@base" use="."/>
46 <xsl:template match="security">
48 Do not edit this file; edit vulnerabilities.xml
51 <h3><a name="toc">Table of Contents</a></h3>
53 <xsl:for-each select="issue/@public[generate-id()=generate-id(key('unique-date',substring(.,1,4)))]">
54 <xsl:sort select="." order="descending"/>
55 <xsl:variable name="year" select="substring(.,1,4)"/>
56 <li><a href="#y{$year}"><xsl:value-of select="$year"/></a></li>
60 <xsl:for-each select="issue/@public[generate-id()=generate-id(key('unique-date',substring(.,1,4)))]">
61 <xsl:sort select="." order="descending"/>
62 <xsl:variable name="year" select="substring(.,1,4)"/>
64 <h3><a name="y{$year}"><xsl:value-of select="$year"/></a>
65 <!-- don't need an UP on each year.
66 <xsl:text> </xsl:text><a href="#toc"><img src="/img/up.gif"/></a>
70 <xsl:apply-templates select="../../issue[substring(@public,1,4)=$year]">
71 <xsl:sort select="./@public" order="descending"/>
72 </xsl:apply-templates>
77 <xsl:template match="issue">
79 <xsl:apply-templates select="cve"/>
80 <xsl:text> </xsl:text>
81 <xsl:if test="advisory/@url">
82 <a href="{advisory/@url}">(OpenSSL advisory)</a><xsl:text> </xsl:text>
84 <xsl:if test="impact/@severity">
85 [<xsl:value-of select="impact/@severity"/> severity]
87 <xsl:call-template name="dateformat">
88 <xsl:with-param name="date" select="@public"/>
90 <xsl:text disable-output-escaping='yes'>: <a href="#toc"><img src="/img/up.gif"/></a></xsl:text>
93 <xsl:copy-of select="string(description)"/>
94 <xsl:for-each select="reported">
95 <xsl:if test="@source">
96 Reported by <xsl:value-of select="@source"/>
98 <xsl:text> on </xsl:text>
99 <xsl:call-template name="dateformat">
100 <xsl:with-param name="date" select="@date"/>
103 <xsl:text>.</xsl:text>
107 <xsl:for-each select="fixed">
109 <xsl:value-of select="@version"/>
110 <xsl:if test="git/@hash">
111 <xsl:text> </xsl:text><a href="https://github.com/openssl/openssl/commit/{git/@hash}">(git commit)</a><xsl:text> </xsl:text>
113 <xsl:variable name="mybase" select="@base"/>
114 <xsl:for-each select="../affects[@base=$mybase]|../maybeaffects[@base=$mybase]">
115 <xsl:sort select="@version" order="descending"/>
116 <xsl:if test="position() =1">
117 <xsl:text> (Affected </xsl:text>
119 <xsl:value-of select="@version"/>
120 <xsl:if test="name() = 'maybeaffects'">
121 <xsl:text>?</xsl:text>
123 <xsl:if test="position() != last()">
124 <xsl:text>, </xsl:text>
126 <xsl:if test="position() = last()">
127 <xsl:text>) </xsl:text>
136 <xsl:template match="cve">
137 <xsl:if test="@name != ''">
138 <b><a name="{@name}">
139 <xsl:if test="@description = 'full'">
140 The Common Vulnerabilities and Exposures project
141 has assigned the name
143 <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-{@name}">CVE-<xsl:value-of select="@name"/> </a>
144 <xsl:if test="@description = 'full'">