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 <p><a name="toc">Jump to year: </a>
52 <xsl:for-each select="issue/@public[generate-id()=generate-id(key('unique-date',substring(.,1,4)))]">
53 <xsl:sort select="." order="descending"/>
54 <xsl:variable name="year" select="substring(.,1,4)"/>
55 <a href="#y{$year}"><xsl:value-of select="$year"/></a>
56 <xsl:if test="position() != last()">
57 <xsl:text>, </xsl:text>
62 <xsl:for-each select="issue/@public[generate-id()=generate-id(key('unique-date',substring(.,1,4)))]">
63 <xsl:sort select="." order="descending"/>
64 <xsl:variable name="year" select="substring(.,1,4)"/>
66 <h3><a name="y{$year}"><xsl:value-of select="$year"/></a>
67 <!-- don't need an UP on each year.
68 <xsl:text> </xsl:text><a href="#toc"><img src="/img/up.gif"/></a>
72 <xsl:apply-templates select="../../issue[substring(@public,1,4)=$year]">
73 <xsl:sort select="./@public" order="descending"/>
74 </xsl:apply-templates>
79 <xsl:template match="issue">
81 <xsl:apply-templates select="cve"/>
82 <xsl:text> </xsl:text>
83 <xsl:if test="advisory/@url">
84 <a href="{advisory/@url}">(OpenSSL advisory)</a><xsl:text> </xsl:text>
86 <xsl:if test="impact/@severity">
87 [<xsl:value-of select="impact/@severity"/> severity]
89 <xsl:call-template name="dateformat">
90 <xsl:with-param name="date" select="@public"/>
92 <xsl:text disable-output-escaping='yes'>: <a href="#toc"><img src="/img/up.gif"/></a></xsl:text>
95 <xsl:copy-of select="string(description)"/>
96 <xsl:for-each select="reported">
97 <xsl:if test="@source">
98 Reported by <xsl:value-of select="@source"/>
100 <xsl:text> on </xsl:text>
101 <xsl:call-template name="dateformat">
102 <xsl:with-param name="date" select="@date"/>
105 <xsl:text>.</xsl:text>
109 <xsl:for-each select="fixed">
111 <xsl:value-of select="@version"/>
112 <xsl:if test="git/@hash">
113 <xsl:text> </xsl:text><a href="https://github.com/openssl/openssl/commit/{git/@hash}">(git commit)</a><xsl:text> </xsl:text>
115 <xsl:variable name="mybase" select="@base"/>
116 <xsl:for-each select="../affects[@base=$mybase]|../maybeaffects[@base=$mybase]">
117 <xsl:sort select="@version" order="descending"/>
118 <xsl:if test="position() =1">
119 <xsl:text> (Affected </xsl:text>
121 <xsl:value-of select="@version"/>
122 <xsl:if test="name() = 'maybeaffects'">
123 <xsl:text>?</xsl:text>
125 <xsl:if test="position() != last()">
126 <xsl:text>, </xsl:text>
128 <xsl:if test="position() = last()">
129 <xsl:text>) </xsl:text>
138 <xsl:template match="cve">
139 <xsl:if test="@name != ''">
140 <b><a name="{@name}">
141 <xsl:if test="@description = 'full'">
142 The Common Vulnerabilities and Exposures project
143 has assigned the name
145 <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-{@name}">CVE-<xsl:value-of select="@name"/> </a>
146 <xsl:if test="@description = 'full'">