index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | keys.php | 17 |
@@ -1,2 +1,3 @@ user-agent-log log +key-wishlist diff --git a/keys.php b/keys.php new file mode 100644 index 0000000..b5e6f8f --- /dev/null +++ b/keys.php @@ -0,0 +1,17 @@ +<?php + +require_once "init.php"; + +if (array_key_exists('k', $_GET) +&& (preg_match('/^[0-9A-Fa-f]{40}$/', $_GET['k']) !== false)) + $output = shell_exec('gpg -a --export ' . $_GET['k']); + print $output; + if (empty($output)) { + $fh = fopen('key-wishlist', 'a'); + if ($fh !== false) { + fwrite($fh, $_GET['k'] . "\n"); + fclose($fh); + } + } +else + print shell_exec('gpg --list-keys --with-colons'); |