Put this in the try block of getDiscovery method in lib/Controller/DocumentController.php:
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>true,
"allow_self_signed"=>true,
),
);
$discovery = file_get_contents($wopiDiscovery, false, stream_context_create($arrContextOptions));
instead of this line:
$discovery = file_get_contents($wopiDiscovery);