add https prefix to getCertificate method

This commit is contained in:
Nicolas Roman 2019-07-04 15:52:55 +02:00
parent 3b9a534253
commit 43318dc09a

View file

@ -123,13 +123,13 @@ class LetsEncrypt
/**
* Retrieve the SSL certificate from the URL
* @param string $url
* @param string $domain
* @return Array|false $cont list of parameters of the certificate, or false
*/
public function getCertificate($url)
public function getCertificate($domain)
{
$stream = stream_context_create(array("ssl" => array("capture_peer_cert" => true)));
$read = fopen($url, "rb", false, $stream);
$read = fopen("https://" . $domain , "rb", false, $stream);
$cont = stream_context_get_params($read);
return $cont;