{"action":"created","issue":{"url":"https://api.github.com/repos/Graylog2/gelf-rb/issues/45","repository_url":"https://api.github.com/repos/Graylog2/gelf-rb","labels_url":"https://api.github.com/repos/Graylog2/gelf-rb/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/Graylog2/gelf-rb/issues/45/comments","events_url":"https://api.github.com/repos/Graylog2/gelf-rb/issues/45/events","html_url":"https://github.com/Graylog2/gelf-rb/pull/45","id":155366668,"number":45,"title":"[WIP] Feature: TLS on TCP connections (includes certificate authentication)","user":{"login":"milgner","id":160025,"avatar_url":"https://avatars.githubusercontent.com/u/160025?v=3","gravatar_id":"","url":"https://api.github.com/users/milgner","html_url":"https://github.com/milgner","followers_url":"https://api.github.com/users/milgner/followers","following_url":"https://api.github.com/users/milgner/following{/other_user}","gists_url":"https://api.github.com/users/milgner/gists{/gist_id}","starred_url":"https://api.github.com/users/milgner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milgner/subscriptions","organizations_url":"https://api.github.com/users/milgner/orgs","repos_url":"https://api.github.com/users/milgner/repos","events_url":"https://api.github.com/users/milgner/events{/privacy}","received_events_url":"https://api.github.com/users/milgner/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-05-17T21:29:46Z","updated_at":"2016-06-23T23:20:48Z","closed_at":"2016-06-23T23:20:48Z","pull_request":{"url":"https://api.github.com/repos/Graylog2/gelf-rb/pulls/45","html_url":"https://github.com/Graylog2/gelf-rb/pull/45","diff_url":"https://github.com/Graylog2/gelf-rb/pull/45.diff","patch_url":"https://github.com/Graylog2/gelf-rb/pull/45.patch"},"body":"This has been successfully used with our Graylog 2.0.1 server but should be considered work in progress. I'd just like to get the discussion rolling and receive some feedback.\r\n\r\nThere are some changes in here which aren't related to TLS but which were convenient to make while the file was open anyway. If you want to extract these into a separate PR, let me know.\r\n\r\nChangelist:\r\n\r\n- make use of some `Enumerable` methods for more concise code\r\n- remove unnecessary uses of `self` and a `begin` block\r\n- fix `GELF::Transport::TCP#addresses`\r\n- extract some magic numbers into constants\r\n- replace `class_eval` with `define_method`\r\n- support setting keepalive flag on TCP connections\r\n- support TLS on TCP connections, including certificate authentication\r\n\r\nTodo:\r\n\r\n- [ ] Investigate why `connect_nonblock` raises `SSLErrorWaitReadable` and how to do it correctly\r\n- [ ] Tests - any ideas how to best test TCP/TLS code? Fake socket objects come to mind.\r\n- [ ] CLA?\r\n- [ ] Split into separate PR for \"drive-by\" changes\r\n\r\nLooking forward to hearing from you!"},"comment":{"url":"https://api.github.com/repos/Graylog2/gelf-rb/issues/comments/228214053","html_url":"https://github.com/Graylog2/gelf-rb/pull/45#issuecomment-228214053","issue_url":"https://api.github.com/repos/Graylog2/gelf-rb/issues/45","id":228214053,"user":{"login":"milgner","id":160025,"avatar_url":"https://avatars.githubusercontent.com/u/160025?v=3","gravatar_id":"","url":"https://api.github.com/users/milgner","html_url":"https://github.com/milgner","followers_url":"https://api.github.com/users/milgner/followers","following_url":"https://api.github.com/users/milgner/following{/other_user}","gists_url":"https://api.github.com/users/milgner/gists{/gist_id}","starred_url":"https://api.github.com/users/milgner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milgner/subscriptions","organizations_url":"https://api.github.com/users/milgner/orgs","repos_url":"https://api.github.com/users/milgner/repos","events_url":"https://api.github.com/users/milgner/events{/privacy}","received_events_url":"https://api.github.com/users/milgner/received_events","type":"User","site_admin":false},"created_at":"2016-06-23T23:20:48Z","updated_at":"2016-06-23T23:20:48Z","body":"Closing in favour of #46."}}
{"actor":{"display_login":"milgner"}}