Mediawiki Scary Transclusion and SSL Self Signed Certificate

Mediawiki 1.26, Ubuntu 16.04.1. Scary transclusion ($wgEnableScaryTranscluding) stopped working when we moved Wikis to HTTPS only. Were getting error scarytranscludefailed ("[Template fetch failed for $1]"). Turned out being that we are using self signed certificates. Had to dive into includes/parser/Parser.php, function fetchScaryTemplateMaybeFromCache, and var_dump($status) after line 4125 to understand what was going on: object(Status)#405 (6) { ["sv":protected]=> object(StatusValue)#403 (6) { ["ok":protected]=> bool(false) ["errors":protected]=> array(1) { [0]=> array(3) { ["type"]=> string(5) "error" ["message"]=> string(15) "http-curl-error" ["params"]=> array(1) { ...