diff --git a/lib/classes/ssl/class.lescript.php b/lib/classes/ssl/class.lescript.php index 3090bcfa..16db00e3 100644 --- a/lib/classes/ssl/class.lescript.php +++ b/lib/classes/ssl/class.lescript.php @@ -102,6 +102,13 @@ class lescript array("resource" => "new-authz", "identifier" => array("type" => "dns", "value" => $domain)) ); + // if response is not an array but a string, it's most likely a server-error, e.g. + //
Reference #179.d8be1402.1458059103.3613c4db + if (!is_array($response)) { + throw new RuntimeException("Invalid response from LE for domain $domain. Whole response: ".$response); + } + if (!array_key_exists('challenges', $response)) { throw new RuntimeException("No challenges received for $domain. Whole response: ".json_encode($response)); } @@ -205,7 +212,7 @@ class lescript $privateDomainKey = openssl_pkey_get_private($domainkey); $this->client->getLastLinks(); - + if (empty($csrfile) || Settings::Get('system.letsencryptreuseold') == 0) { $csr = $this->generateCSR($privateDomainKey, $domains); }