Remove renew and replace with check mechanism, remove sudo requirement, add multiple accounts again

This commit is contained in:
Niklas Keller
2016-03-12 16:26:49 +01:00
parent 37d054975c
commit 68afa4e0e9
14 changed files with 260 additions and 197 deletions

View File

@@ -34,15 +34,9 @@ class Setup implements Command {
yield \Amp\resolve($this->checkEmail($email));
$server = $args->get("server");
$protocol = substr($server, 0, strpos("://", $server));
$keyFile = \Kelunik\AcmeClient\serverToKeyname($server);
if (!$protocol || $protocol === $server) {
$server = "https://" . $server;
} elseif ($protocol !== "https") {
throw new \InvalidArgumentException("Invalid protocol, only https is allowed!");
}
$path = "account/key.pem";
$path = "accounts/{$keyFile}.pem";
$bits = 4096;
$keyStore = new KeyStore(dirname(dirname(__DIR__)) . "/data");