Rewrite to kelunik/acme version 0.3.0-dev
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user