public function testContextOptionsAreSecureDefaults() { $context = $this->mozCertData->getStreamContext(); $opts = stream_context_get_options($context); $this->assertSame(true, $opts['ssl']['capture_peer_cert']); $this->assertSame(true, $opts['ssl']['verify_peer']); $this->assertSame(false, $opts['ssl']['allow_self_signed']); $this->assertRegExp('/^.+\\.(pem|crt)$/', $opts['ssl']['cafile']); $this->assertSame('mxr.mozilla.org', $opts['ssl']['CN_match']); }