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
7 changes: 6 additions & 1 deletion Lescript.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,14 @@ function ($domain) {

$result = null;
while ($loopCount < $maxAllowedLoops) {
// Only the first request may carry the trigger payload: the
// server accepts it while the authorization is "pending" and
// rejects it with 400 "Unable to update challenge ::
// authorization must be pending" as soon as validation has
// completed. Poll with POST-as-GET afterwards (RFC 8555 7.5.1).
$result = $this->signedRequest(
$challenge['url'],
array("keyAuthorization" => $payload)
$loopCount === 1 ? array("keyAuthorization" => $payload) : null
);

if (empty($result['status']) || $result['status'] == "invalid") {
Expand Down