{"action":"opened","issue":{"url":"https://api.github.com/repos/mongofill/mongofill/issues/80","labels_url":"https://api.github.com/repos/mongofill/mongofill/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/mongofill/mongofill/issues/80/comments","events_url":"https://api.github.com/repos/mongofill/mongofill/issues/80/events","html_url":"https://github.com/mongofill/mongofill/issues/80","id":95866372,"number":80,"title":"Unable to connect over TLS/SSL","user":{"login":"doublecompile","id":4267230,"avatar_url":"https://avatars.githubusercontent.com/u/4267230?v=3","gravatar_id":"","url":"https://api.github.com/users/doublecompile","html_url":"https://github.com/doublecompile","followers_url":"https://api.github.com/users/doublecompile/followers","following_url":"https://api.github.com/users/doublecompile/following{/other_user}","gists_url":"https://api.github.com/users/doublecompile/gists{/gist_id}","starred_url":"https://api.github.com/users/doublecompile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doublecompile/subscriptions","organizations_url":"https://api.github.com/users/doublecompile/orgs","repos_url":"https://api.github.com/users/doublecompile/repos","events_url":"https://api.github.com/users/doublecompile/events{/privacy}","received_events_url":"https://api.github.com/users/doublecompile/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-18T23:02:24Z","updated_at":"2015-07-18T23:02:24Z","closed_at":null,"body":"Mongofill seems to be unable to to connect to a MongoDB instance via TLS/SSL.\r\n\r\n##  Source to reproduce\r\n\r\n```hack\r\n<?hh\r\n\r\nnamespace Foo;\r\n\r\nclass Test\r\n{\r\n    public static function test()\r\n    {\r\n        $connection = \"mongodb://myhostname:27017/mydatabase?ssl=true\";\r\n        $mc = new \\MongoClient(\r\n            $connection,\r\n            ['ssl' => true]\r\n        );\r\n        $coll = $mc->mydatabase->mycoll;\r\n        var_dump($coll->find());\r\n        $doc = ['email' => 'user@example.com'];\r\n        $coll->insert($doc);\r\n        var_dump($coll->find());\r\n    }\r\n}\r\n```\r\n```hack\r\n<?hh\r\nFoo\\Test::test();\r\n```\r\n\r\n## Results\r\n```\r\nFatal error: Uncaught exception 'RuntimeException' with message 'unhandled socket read error: Success' in :\r\nStack trace:\r\n#0 (): Mongofill\\Socket->readFromSocket()\r\n#1 (): Mongofill\\Socket->readHeaderFromSocket()\r\n#2 (): Mongofill\\Socket->getMessage()\r\n#3 (): Mongofill\\Socket->putReadMessage()\r\n#4 (): Mongofill\\Protocol->putReadMessage()\r\n#5 (): Mongofill\\Protocol->opQuery()\r\n#6 (): MongoDB->command()\r\n#7 (): MongoDB->authenticate()\r\n#8 (): MongoClient->connectToHost()\r\n#9 (): MongoClient->connect()\r\n#10 Test.hh(16): MongoClient->__construct()\r\n```\r\n\r\n## Extras\r\n* If I disable SSL, the connection works as expected.\r\n* Looking at the source for `MongoClient`, I don't see any mention of the SSL option. I'm guessing this feature isn't implemented at all?"}}