From 43318dc09a9f988553fb0a88cc266f510f4e69b3 Mon Sep 17 00:00:00 2001 From: Nicolas Roman Date: Thu, 4 Jul 2019 15:52:55 +0200 Subject: [PATCH] add https prefix to getCertificate method --- lib/letsencrypt.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/letsencrypt.php b/lib/letsencrypt.php index 2862320..2550d0a 100644 --- a/lib/letsencrypt.php +++ b/lib/letsencrypt.php @@ -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;