From bd22abe778ffc79d092efd0cfd57669b1bf66d70 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Wed, 31 Jan 2024 14:05:20 +0100 Subject: [PATCH] MDL-80784 behat: Disable SSL checks for app initialization --- lib/behat/classes/behat_config_util.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/behat/classes/behat_config_util.php b/lib/behat/classes/behat_config_util.php index b0091944911..7c404b8e05b 100644 --- a/lib/behat/classes/behat_config_util.php +++ b/lib/behat/classes/behat_config_util.php @@ -762,7 +762,8 @@ class behat_config_util { // Get app version from env.json inside wwwroot. $jsonurl = $CFG->behat_ionic_wwwroot . '/assets/env.json'; - $json = @file_get_contents($jsonurl); + $streamcontext = stream_context_create(['ssl' => ['verify_peer' => false, 'verify_peer_name' => false]]); + $json = @file_get_contents($jsonurl, false, $streamcontext); if (!$json) { throw new coding_exception('Unable to load app version from ' . $jsonurl);