From 283f76540af1bddebb18a45b7bc8ba06c7ad2d9a Mon Sep 17 00:00:00 2001 From: Nicolas Roman Date: Mon, 15 Jul 2019 17:08:47 +0200 Subject: [PATCH] uses stream_socket_client instead of fopen --- lib/letsencrypt.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/letsencrypt.php b/lib/letsencrypt.php index 86cade5..99de7f9 100644 --- a/lib/letsencrypt.php +++ b/lib/letsencrypt.php @@ -174,9 +174,9 @@ class LetsEncrypt public function getCertificate($domain) { $stream = stream_context_create(array("ssl" => array("capture_peer_cert" => true))); - $read = fopen("https://" . $domain, "rb", false, $stream); + $read = stream_socket_client("ssl://" . $domain . ":443", $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $stream); $cont = stream_context_get_params($read); - + return $cont; }