<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
- padding-bottom: 4em;
- padding-top: 10em;
+ padding-bottom: 2em;
+ padding-top: 7em;
}
.header {
top: 0;
bottom: 0;
width: 100%;
text-align: center;
+ font-size: .9em;
}
.header, .footer {
position: fixed;
- box-shadow: 0px 0px 1em .4em #89a;
+ box-shadow: 0px 0px .8em .4em #89a;
background: #62B3E7;
- padding: 1em 0;
+ padding: .5em 0;
}
.header h1 {
font-weight: bold;
}
.header h1 big {
/* normalize browser difference */
- font-size: 1.8em;
+ font-size: 1.3em;
}
.header h1 big, .footer, .footer a {
color: #fdfdfd;
}
.header h1 small {
color: #666;
+ font-size: 1.3rem;
text-shadow: white 0 0 .2em;
}
li {
list-style-type: circle;
}
+ pre.publickey {
+ font-size: .8rem;
+ line-height: 1rem;
+ word-wrap: none;
+ }
+ code {
+ background: #EEE;
+ padding: .1rem;
+ border-radius: 4px;
+ }
+ pre.code {
+ background: #333;
+ color: #62B3E7;
+ padding: 1em;
+ border-radius: 4px;
+ margin-right: 2em;
+ }
+ pre.code code {
+ background: transparent;
+ }
</style>
</head>
<body>
<?php foreach (array_map("array_values", $phars) as $ext => list($phar, $date, $size, $pharext)) : ?>
<td class="text-left">
- <a href="<?= htmlspecialchars($phar) ?>"
- >ext.phar<?= htmlspecialchars($ext) ?></a><br>
- <small>⤋ <?= human_size($size) ?></small>
+ ⤋ <a href="<?= htmlspecialchars($phar) ?>"
+ download>ext.phar<?= htmlspecialchars($ext) ?></a> <small>(<?= human_size($size) ?>)</small><br>
+
+ <?php foreach (SIGS as $typ => $sig) : ?>
+ <small># <a href="<?= sigof($phar, $sig) ?>" download><?= "$typ.$sig" ?></a></small>
+ <?php endforeach; ?>
</td>
<?php endforeach; ?>
<?php for($i = 0; $i < 3-count($phars); ++$i) : ?>
</ul>
<?php endif; ?>
</div>
+ <div class="container">
+ <h3>Public Keys</h3>
+ <div class="column-8">
+ <h4>RSA <small><a href="replicator.pub" download>replicator.pub</a></small></h4>
+ <p>Verify with:</p>
+ <pre class="code"><code># openssl dgst \
+ -verify replicator.pub \
+ -signature <?= isset($phar) ? htmlspecialchars(basename($phar)).".sig" : "apfd-1.0.1.ext.phar.sig" ?> \
+ <?= isset($phar) ? htmlspecialchars(basename($phar)): "apfd-1.0.1.ext.phar" ?></code></pre>
+ <pre class="publickey">
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnzsDXNox5V0V9GLcnXEu
+kxnhFs9+/AMm//1qJAoNwP6sgmYShuyI3NDZzCmT7tOIcpqW0I4P8D1Psrftyqbt
+spedAvyOLCLZXaOuE130aMlvfqEiO+s8ZVZL8aHLE/orLbpOexEs33a1j6shl5C6
+MoojzK3uYccL4XJfj0t2nrC+XMfWE9oQGvyLZv3tNCzH4Oy7knWVVy10EKbKgPft
+izCFR+0mPYw35RN3gAGrug+khnVRMRNpS7B0uZ6E29Bgsrud9l91mVbrL+DaoaSa
+IFGeYuFGe2ZpHUfxf16S0w7ybPrrJJsD6cYOtwXjRZo+4ux6PdKZ+m3hnKWoj9IF
+OwIDAQAB
+-----END PUBLIC KEY-----</pre>
+ </div>
+ <div class="column-8">
+ <h4>OpenPGP <small><a href="4093AEF6.pub" download>4093AEF6.pub</a></small></h4>
+ <p>Verify with:</p>
+ <pre class="code"><code># gpg --import 4093AEF6.pub
+
+# gpg --verify <?= isset($phar) ? htmlspecialchars(basename($phar)).".asc" : "apfd-1.0.1.ext.phar.asc" ?> \
+ <?= isset($phar) ? htmlspecialchars(basename($phar)): "apfd-1.0.1.ext.phar" ?></code></pre>
+ </p>
+ <pre class="publickey">
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQENBFcBXgsBCACfOwNc2jHlXRX0YtydcS6TGeEWz378Ayb//WokCg3A/qyCZhKG
+7Ijc0NnMKZPu04hympbQjg/wPU+yt+3Kpu2yl50C/I4sItldo64TXfRoyW9+oSI7
+6zxlVkvxocsT+istuk57ESzfdr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W558
+yImBVgJx
+=nFzc
+-----END PGP PUBLIC KEY BLOCK-----</pre>
+ </div>
+ <div style="clear:both"></div>
+ </div>
<div class="footer">
<footer>
- © 2015 m6w6, Michael Wallner — Powered by <a href="//github.com/m6w6/pharext">pharext
+ © 2015 <a href="https://m6w6.name">m6w6</a>, Michael Wallner — Powered by <a href="//github.com/m6w6/pharext">pharext
<?php
require_once "../vendor/autoload.php";
printf("v%s\n", pharext\Metadata::version());
</html>
<?php
$res->send();
-?>
\ No newline at end of file
+?>
use http\Header;
const UNITS = ["Bytes", "KB", "MB"];
+const SIGS = ["rsa" => "sig", "gpg" => "asc"];
function human_size($s) {
$l = floor(log10($s));
return gmdate("Y-m-d", $t);
}
+function sigof($phar, $typ) {
+ return str_replace("phars/", "sigs/", $phar) . ".$typ";
+}
+
function package_versions($package) {
$versions = [];
foreach (glob("phars/$package/*.ext.phar*") as $phar) {
$release = substr($name, strlen($package)+1);
}
+ foreach (SIGS as $sigtyp => $sigext) {
+ if (file_exists($sigdat = sigof($phar, $sigext))) {
+ $sigs[$sigtyp] = $sigdat;
+ }
+ }
$size = filesize($phar);
$date = isset($meta["date"]) ? strtotime($meta["date"]) : filemtime($phar);
$pharext = isset($meta["version"]) ? $meta["version"] : "2.0.1";
- $versions[$release][$enc] = compact("phar", "date", "size", "pharext");
+ $versions[$release][$enc] = compact("phar", "date", "size", "pharext", "sigs");
uksort($versions[$release], function($a, $b) {
$al = strlen($a);
$bl = strlen($b);
$neg = "html";
}
include_once "$neg.php";
-}
\ No newline at end of file
+}