diff --git a/composer.json b/composer.json index 3809941..04a4fc8 100644 --- a/composer.json +++ b/composer.json @@ -6,8 +6,8 @@ "ext-posix": "*", "ext-openssl": "*", "bramus/monolog-colored-line-formatter": "^2", - "kelunik/acme": "dev-master", - "kelunik/certificate": "dev-master", + "kelunik/acme": "^0.3", + "kelunik/certificate": "^1", "league/climate": "^3", "monolog/monolog": "^1.17", "psr/log": "^1", diff --git a/src/Commands/Issue.php b/src/Commands/Issue.php index c9301cc..7337498 100644 --- a/src/Commands/Issue.php +++ b/src/Commands/Issue.php @@ -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); diff --git a/src/Commands/Register.php b/src/Commands/Register.php index cf1de23..68902e6 100644 --- a/src/Commands/Register.php +++ b/src/Commands/Register.php @@ -69,7 +69,7 @@ class Register implements Command { chmod($pathPrivate, 0600); } - $acme = new AcmeService(new AcmeClient($server, $keyPair), $keyPair); + $acme = new AcmeService(new AcmeClient($server, $keyPair)); $this->logger->info("Registering with ACME server " . substr($server, 8) . " ..."); diff --git a/src/Commands/Revoke.php b/src/Commands/Revoke.php index 7b2f801..4fe1253 100644 --- a/src/Commands/Revoke.php +++ b/src/Commands/Revoke.php @@ -37,7 +37,7 @@ class Revoke implements Command { } $keyPair = $this->checkRegistration($args); - $acme = new AcmeService(new AcmeClient($server, $keyPair), $keyPair); + $acme = new AcmeService(new AcmeClient($server, $keyPair)); $this->logger->info("Revoking certificate ...");