## openssl.wml -- WML Template for the www.openssl.org website
## Written by Ralf S. Engelschall <rse@engelschall.com>
##
-## Usage: #use wml::tpl::openssl area=<area_name> [page=<page_name>]
+## Usage: #use wml::openssl area=<area_name> [page=<page_name>]
##
#use wml::std::tags
# insert information about the webpage
<info style=comment domainname="openssl.org"
- copyright="1998,1999 The OpenSSL Project, http://www.openssl.org/">
+ copyright="1998-2014 The OpenSSL Project, http://www.openssl.org/">
<info style=meta domainname="openssl.org"
- copyright="1998,1999 The OpenSSL Project, http://www.openssl.org/">
+ copyright="1998-2014 The OpenSSL Project, http://www.openssl.org/">
# insert overideable title container
-<title*>OpenSSL: <<PAGE_TITLE>></title*>
+<title*>OpenSSL: {#PAGE_TITLE#}</title*>
# predefine it to show errors
..PAGE_TITLE!>>Error: Undefined Title !!<<..
# define override tag
-<define-container title>
+<define-tag title endtag=required>
..PAGE_TITLE>>%body<<..
-</define-container>
+</define-tag>
# define a style-sheet for adjusting some HTML layouting things
# to conform to some typographically stronger conventions.
<style type="text/css"><!--
BODY { position: absolute; left: 0px; top: 0px; background: #666699; }
-A:link { color: #6666cc; }
-A:active { color: #6666cc; }
-A:visited { color: #6666cc; }
-\#red { color: #cc3333 }
+A { text-decoration: none; font-weight: bold; }
+A:link { text-decoration: none; font-weight: bold; color: #666699; }
+A:visited { text-decoration: none; font-weight: bold; color: #666699; }
+A:hover { text-decoration: none; font-weight: bold; color: #666699; text-decoration: underline; }
+\#red { color: #cc3333; }
\#sf { font-family: arial,helvetica; font-variant: normal; font-style: normal; }
\#sfl { font-weight: bold; font-family: arial,helvetica; font-size: 16pt; \
line-height: 16pt; font-variant: normal; font-style: normal; }
# end of header and start of physical body
# (use additionally use colors here for older browsers)
</head>
-<body link="#6666cc" alink="#6666cc" vlink="#6666cc" bgcolor="#666699">
+<body link="#6666cc" alink="#6666cc" vlink="#6666cc" bgcolor="#666699" text="#000000"
+ marginheight=0 leftmargin=0 rightmargin=0 topmargin=0>
-# now define the page layout by a nested table
+# now define the page layout by a nested table
# structure consisting of a 5x5 cell grid.
<table width=100% cellspacing=0 cellpadding=0 border=0>
# visually: the top line of the page
<td align=left width=100><img src="$(IMG)/page-head-bl.jpg"></td>\
<td align=left width=20><img src="$(IMG)/page-head-bm.jpg"></td>\
<td align=left width=100% bgcolor="#ffffff">\
- <<PAGE_SUBNAVBAR>>\
+ {#PAGE_SUBNAVBAR#}\
</td>\
<td align=right width=20><img src="$(IMG)/page-corner-tr.gif"></td>\
<td align=right width=50 bgcolor="#666699"> </td>\
</tr>
# visually: the left main navigation bar and the white body
<tr>\
- <td align=left valign=top width=100 bgcolor="#666699"><<PAGE_NAVBAR>></td>\
+ <td align=left valign=top width=100 bgcolor="#666699">{#PAGE_NAVBAR#}</td>\
<td align=left valign=top width=20 bgcolor="#ffffff"> </td>\
<td align=left valign=top bgcolor="#ffffff">\
<br>
:PAGE_HEAD][PAGE_BODY:
- <<PAGE_BODY>>
+ {#PAGE_BODY#}
:PAGE_BODY][PAGE_FOOT:\
</td>\
<td align=right width=20 bgcolor="#ffffff"> </td>\
<tr><td>
</navbar:prolog>
# the buttons itself
- <navbar:button id=title url="" txt="Title" img=page-navbar-ti-*.jpg>
+ <navbar:button id=title url="." txt="Home" img=page-navbar-ti-*.jpg>
+ <navbar:button id=source url=source/ txt="Download" img=page-navbar-so-*.jpg>
<navbar:button id=about url=about/ txt="About" img=page-navbar-ab-*.jpg>
<navbar:button id=news url=news/ txt="News" img=page-navbar-ne-*.jpg>
+ <navbar:button id=FAQ url=support/faq.html txt="FAQ" img=page-navbar-fq-*.jpg>
<navbar:button id=docs url=docs/ txt="Documents" img=page-navbar-do-*.jpg>
- <navbar:button id=source url=source/ txt="Source" img=page-navbar-so-*.jpg>
- <navbar:button id=contrib url=contrib/ txt="Contribution" img=page-navbar-co-*.jpg>
<navbar:button id=support url=support/ txt="Support" img=page-navbar-su-*.jpg>
- <navbar:button id=related url=related/ txt="Related" img=page-navbar-re-*.jpg>
# button epilog
<navbar:epilog>
</td></tr>
##
# define the <snb>...</snb> container tag
-<define-container snb>
+<define-tag snb endtag=required>
# 1. define the navigation bar through a grammar
- <navbar:define name=snb urlbase="$(SNB_ROOT)"
+ <navbar:define name=snb urlbase="$(SNB_ROOT)"
txtcol_normal="#666666" txtcol_select="#000000">
# bar header
<navbar:header>\
..PAGE_SUBNAVBAR>>\
<navbar:render name=snb select="$(page)">\
<<..
-</define-container>
+</define-tag>
# define the <snb_button> tag for the <snb> container
# (this is for consistency with the tag names)
@T = localtime($S[9]);
my @moy = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
- push(@R, sprintf("%"."8d %"."s %"."2d %"."02d:%"."02d:%"."02d %"."d %"."s\n",
+ push(@R, sprintf("%"."8d %"."s %"."2d %"."02d:%"."02d:%"."02d %"."d %"."s\n",
$S[7], $moy[$T[4]], $T[3], $T[2], $T[1], $T[0], 1900+$T[5], $f));
}
return @R;
$l =~ s|(\s+)(\S+[^/])(\s*\n)$|$1."<a href=\"$2\">$2</a>".$3|e;
$l =~ s|(\s+)(\S+/)(\s*\n)$|$1."<a href=\"$2\"><b>$2</b></a>".$3|e;
foreach $hi (@HI) {
- $l =~ s|^(.*$hi.*)$|<font color="#cc3333">$1 [LATEST]</font>|;
+ $l =~ s|^(.*$hi.*)$|<font color="#cc3333">$1 <b>[LATEST]</b></font>|;
$l =~ s|>($hi)<|><font color="#cc3333">$1</font><|;
}
print $l;
</pre>
</define-tag>
-# define a <cvs> container which can be used to reference
-# files within the CVS repository similar to <a>.
-<define-container cvs>
-<preserve href>\
-<set-var %attributes>\
- <a href="$(ROOT)/source/exp/<get-var href>"><get-var href></a>\
-<restore href>\
-</define-container>
+<define-tag rfilelist>
+<pre>
+<b> Bytes Timestamp Filename</b>
+<b>________ ____________________ ____________________________</b>
+<:
+@HI = ();
+open(FP, "<index.current");
+while (<FP>) {
+ s|\s*\n$||;
+ s/#.*$//;
+ next if (/^\s*$/);
+ # If line is of form "last <regex>" look for last
+ # matching filename in the list.
+ # This means "last openssl-1*.tar.gz" will automatically
+ # mark the last version of OpenSSL as the latest without
+ # the need to manually update index.current on each release.
+ if (/^\s*last\s*(\S+)\s*$/) {
+ # Get list of all file, skip betas
+ my @list = sort grep(!/beta/, glob($1));
+ my $lastfile = pop @list;
+ push(@HI, $lastfile) if (-f $lastfile);
+ } elsif (-f $_) {
+ push(@HI, $_);
+ }
+}
+close(FP);
+sub ls {
+ my ($pat) = @_;
+ my (@F, @R, $f, @S, @T);
+ @F = sort { (stat($b))[9] <=> (stat($a))[9]; } (glob($pat));
+ @R = ();
+ foreach $f (@F) {
+ next if ($f =~ m|^index.*|);
+ if ('%1' ne '') {
+ if (! %1 $f) {
+ next;
+ }
+ }
+ @S = stat($f);
+ $f = "$f/" if (-d $f);
+ @T = localtime($S[9]);
+ my @moy = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
+ push(@R, sprintf("%"."8d %"."s %"."2d %"."02d:%"."02d:%"."02d %"."d %"."s\n",
+ $S[7], $moy[$T[4]], $T[3], $T[2], $T[1], $T[0], 1900+$T[5], $f));
+ }
+ return @R;
+}
+@L = &ls("%0");
+foreach $l (@L) {
+ next if ($l =~ m|^\s*$|);
+ if ($l =~ m|(\s+)(\S+[^/])(\s*\n)$|) {
+ my $h = $`.$1;
+ my $f = $2;
+ my $t = $3;
+ my $r = "<a href=\"$f\">$f</a>";
+ if (-f "$f.md5") { $r .= " (<a href=\"$f.md5\">MD5</a>)"; }
+ if (-f "$f.sha1") { $r .= " (<a href=\"$f.sha1\">SHA1</a>)"; }
+ if (-f "$f.sha256") { $r .= " (<a href=\"$f.sha256\">SHA256</a>)"; }
+ if (-f "$f.asc") { $r .= " (<a href=\"$f.asc\">PGP sign</a>)"; }
+ $l = $h.$r.$t;
+ }
+ $l =~ s|(\s+)(\S+/)(\s*\n)$|$1."<a href=\"$2\"><b>$2</b></a>".$3|e;
+ foreach $hi (@HI) {
+ $l =~ s|^(.*$hi.*)$|<font color="#cc3333">$1 <b>[LATEST]</b></font>|;
+ $l =~ s|>($hi)<|><font color="#cc3333"><span class="latest">$1</span></font><|;
+ }
+ print $l;
+}
+:>
+</pre>
+</define-tag>
+
+<define-tag notes>
+<preserve minversion>
+<preserve maxversion>
+<preserve filename>
+<set-var %attributes>
+<:
+
+my $minversion = "<get-var minversion>";
+my $maxversion = "<get-var maxversion>";
+my $dirname = "<get-var dirname>";
+my $file;
+my $custompage = 0;
+
+if ($maxversion eq "") {
+ $minversion="<get-var WML_SRC_FILENAME>";
+ $minversion =~ s/^.*-(\d+\.\d+\.\d+)-.*$/$1/;
+ $maxversion = $minversion;
+} else {
+ $custompage = 1;
+}
+
+
+my $dir = defined $ENV{PODSHOME} ? "$ENV{PODSHOME}/../.." : "/var/cache/openssl/checkouts";
+if ($dirname ne "") {
+ $file = "${dir}/$dirname/NEWS";
+ $custompage = 1;
+} else {
+ $file = "${dir}/openssl-${minversion}-stable/NEWS";
+}
+# For testing
+$file = $ENV{NEWSTEST} if defined $ENV{NEWSTEST};
+if ($custompage == 0) {
+ my $brname = $minversion;
+ $brname =~ tr/./_/;
+ $brname = "OpenSSL_${brname}-stable";
+ print <<"END"
+<title>OpenSSL $minversion Release Notes.</title>
+<h1>OpenSSL $minversion Branch Release notes</h1>
+
+The major changes and known issues for the $minversion branch of the OpenSSL
+toolkit are summarised below. The contents reflect the current state of the
+<tt>NEWS</tt> file inside the git repository.
+<p>
+Additional details of changes can be found in the
+<a href="https://github.com/openssl/openssl/blob/$brname/CHANGES">
+change log.</a>.
+<p>
+The complete list of changes can be found in the
+<a href="https://github.com/openssl/openssl/commits/$brname">commit log</a>.
+<p>
+
+END
+}
+
+my $copy = 0;
+my $in_ul = 0;
+open(FP, "<$file") || die "Can't open $file";
+while (<FP>) {
+ if (/^\s*Major changes between.*(\d+\.\d+\.\d+)\D.*$/ ||
+ /^\s*Known issues in.*(\d+\.\d+\.\d+)\D.*$/) {
+ if ($1 ge $minversion && $1 le $maxversion) {
+ $copy = 1;
+ s|^(.*)$|<b>$1</b>|;
+ if ($in_ul) {
+ print "</ul>\n";
+ $in_ul = 0;
+ }
+ print;
+ next;
+ } elsif ($copy) {
+ last;
+ }
+ }
+ if ($copy) {
+ s/&/&/g;
+ s/</</g;
+ s/>/>/g;
+ if (s/^\s+o\s+/<li>/ && !$in_ul) {
+ print "<ul>\n";
+ $in_ul = 1;
+ }
+ s/CVE-(\d{4}-\d{4})/<a href=vulnerabilities.html#$1>CVE-$1<\/a>/g;
+ print;
+ }
+
+}
+close(FP);
+print "</ul>";
+:>
+<restore minversion>
+<restore maxversion>
+<restore filename>
+</define-tag>
#
<define-tag newsflash>
<preserve max>
<preserve more>
<set-var %attributes>
-<table width=500 cellspacing=0 cellpadding=1 border=0>
+<table width=550 cellspacing=0 cellpadding=1 border=0>
<tr><td><font face="Arial,Helvetica"><b>Date</b></font></td> <td> <font face="Arial,Helvetica"><b>Newsflash</b></font></td></tr>
<tr><td><hr noshade size=1></td> <td><hr noshade size=1></td></tr>
<:
$ncol = ($ncol + 1) % 2;
$col = $COL[$ncol];
s|="ROOT|="$(ROOT)|g;
- s|="CVS|="$(ROOT)/source/exp/|g;
if (m|^(.+?):(.+)|) {
print "<tr bgcolor=\"$col\">\n";
print " <td align=right><font face=\"Arial,Helvetica\"><b>$1:</b></font></td> <td> $2</td>\n";
}
close(FP);
:>
-<ifeq "<get-var more>" "" "" <prog
+<ifeq "<get-var more>" "" "" <group
<tr>
- <td> </td> <td align=right><td><a href="<get-var more>">more...</a></td>
+ <td> </td> <td align=right><a href="<get-var more>">more...</a></td>
</tr>
>>
</table>
THERE OR EVEN JUST EMAIL TECHNICAL SUGGESTIONS OR EVEN SOURCE PATCHES TO THE
AUTHOR OR OTHER PEOPLE YOU ARE STRONGLY ADVISED TO PAY CLOSE ATTENTION TO
ANY EXPORT/IMPORT AND/OR USE LAWS WHICH APPLY TO YOU. THE AUTHORS OF OPENSSL
-ARE NOT LIABLE FOR ANY VIOLATIONS YOU MAKE HERE. SO BE CAREFULLY YOURSELF, IT
+ARE NOT LIABLE FOR ANY VIOLATIONS YOU MAKE HERE. SO BE CAREFUL, IT
IS YOUR RESPONSIBILITY.
</font>
<p>
<font face="Arial,Helvetica" size=-1>
CREDIT INFORMATION:
-This product includes cryptographic software written by Eric A. Young
-(eay@cryptsoft.com). This product includes software written by Tim J. Hudson
-(tjh@cryptsoft.com).
+This product includes cryptographic software written by Eric Young.
+This product includes software written by Tim Hudson (tjh@cryptsoft.com).
</font>
</define-tag>
+# a tag displaying the used tools
<define-tag website-tools>
-<font face="Arial,Helvetica" size=-1> Website designed and generated with <a
-href="http://www.engelschall.com/sw/wml/"><font color="#000000">Website META
-Language</font></a> (WML) and served by <a href="http://www.apache.org/"><font
-color="#000000">Apache</font></a> webserver.
+<font face="Arial,Helvetica" size=-1>
+Website designed by
+<a href="http://www.engelschall.com/">Ralf S. Engelschall</a>
+and generated with
+<a href="http://thewml.org/"><font color="#000000">
+Website META Language</font></a> (WML).<br>
+All markup code and graphics on this website
+are Copyright © 1999-2014 <a href="http://www.openssl.org/">The OpenSSL Project</a>,
+All rights reserved.<br>
+This website is served by an
+<a href="http://www.apache.org/"><font color="#000000">Apache</font></a>/
+<a href="http://www.modssl.org/"><font color="#000000">mod_ssl</font></a>
+webserver environment.<br>
</font>
</define-tag>
+# construct an absolute URL out of a relative URL
+# (essential for the mirroring of the website!)
+<define-tag absolute>
+<:{
+ my ($cwd, $baseurl, $basedir, $subdir, $page, $url);
+
+ # determine current working directory
+ $cwd = '<get-var WML_SRC_DIRNAME>';
+
+ # determine base URL
+ $baseurl = '<get-var BASE_URL>' || 'file://';
+
+ # determine base directory
+ $basedir = '<get-var BASE_DIR>' || '<get-var WML_SRC_DIRNAME>';
+ $basedir = &canonpath("$cwd/$basedir") if ($basedir !~ m|^/|);
+
+ # determine subdir from base dir to current working dir
+ $subdir = &relpath($basedir, $cwd);
+
+ # determine document
+ $page = '%0';
+
+ # construct final URL
+ $url = "$baseurl/$subdir/$page";
+ $url = &canonurl($url);
+
+ # replace this tag with the constructed URL
+ print $url;
+}:>
+</define-tag>
+
##
## Finally, the layout is now rendered, so divert all
-## following stuff (the code in the local file after the #use
+## following stuff (the code in the local file after the #use
## for this template!) into the white body area.
##