Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Lescript.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Lescript
// public $contact = array("mailto:[email protected]", "tel:+12025551212")

public $clientUserAgent = "analogic-lescript/0.3.0";

protected $certificatesDir;
protected $webRootDir;

Expand Down Expand Up @@ -130,7 +130,7 @@ function ($domain) {
$tokenPath = $directory . '/' . $challenge['token'];

if (!file_exists($directory) && !@mkdir($directory, 0755, true)) {
throw new RuntimeException("Couldn't create directory to expose challenge: ${tokenPath}");
throw new RuntimeException(sprintf("Couldn't create directory to expose challenge: %s", $tokenPath));
}

$header = array(
Expand All @@ -148,7 +148,7 @@ function ($domain) {
// 3. verification process itself
// -------------------------------

$uri = "http://${domain}/.well-known/acme-challenge/${challenge['token']}";
$uri = sprintf("http://%s/.well-known/acme-challenge/%s", $domain, $challenge['token']);

$this->log("Token for $domain saved at $tokenPath and should be available at $uri");
$this->log("Sending request to challenge");
Expand Down Expand Up @@ -183,7 +183,7 @@ function ($domain) {
throw new RuntimeException("Verification timed out");
}

$this->log("Verification ended with status: ${result['status']}");
$this->log(sprintf("Verification ended with status: %s", $result['status']));

@unlink($tokenPath);
}
Expand Down