Rewrite to kelunik/acme version 0.3.0-dev

This commit is contained in:
Ewoud Kohl van Wijngaarden
2016-02-23 14:11:20 +01:00
parent 1fcd437aaf
commit 8ed17841b8
4 changed files with 7 additions and 7 deletions

View File

@@ -57,7 +57,7 @@ class Issue implements Command {
$keyPair = $this->checkRegistration($args);
$acme = new AcmeService(new AcmeClient($server, $keyPair), $keyPair);
$acme = new AcmeService(new AcmeClient($server, $keyPair));
foreach ($domains as $domain) {
list($location, $challenges) = yield $acme->requestChallenges($domain);
@@ -75,7 +75,7 @@ class Issue implements Command {
}
$this->logger->debug("Generating payload...");
$payload = $acme->generateHttp01Payload($token);
$payload = $acme->generateHttp01Payload($keyPair, $token);
$docRoot = rtrim($args->get("path") ?? __DIR__ . "/../../data/public", "/\\");
$path = $docRoot . "/.well-known/acme-challenge";
@@ -102,7 +102,7 @@ class Issue implements Command {
chown("{$path}/{$token}", $userInfo["uid"]);
chmod("{$path}/{$token}", 0664);
yield $acme->selfVerify($domain, $token, $payload);
yield $acme->verifyHttp01Challenge($domain, $token, $payload);
$this->logger->info("Successfully self-verified challenge.");
yield $acme->answerChallenge($challenge->uri, $payload);