{"action":"created","issue":{"url":"https://api.github.com/repos/bobbypriambodo/ocaml-tls/issues/1","repository_url":"https://api.github.com/repos/bobbypriambodo/ocaml-tls","labels_url":"https://api.github.com/repos/bobbypriambodo/ocaml-tls/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/bobbypriambodo/ocaml-tls/issues/1/comments","events_url":"https://api.github.com/repos/bobbypriambodo/ocaml-tls/issues/1/events","html_url":"https://github.com/bobbypriambodo/ocaml-tls/pull/1","id":325721636,"number":1,"title":"Thanks again for your PR.  I re-read your changes and tested it locally.","user":{"login":"hannesm","id":228456,"avatar_url":"https://avatars1.githubusercontent.com/u/228456?v=4","gravatar_id":"","url":"https://api.github.com/users/hannesm","html_url":"https://github.com/hannesm","followers_url":"https://api.github.com/users/hannesm/followers","following_url":"https://api.github.com/users/hannesm/following{/other_user}","gists_url":"https://api.github.com/users/hannesm/gists{/gist_id}","starred_url":"https://api.github.com/users/hannesm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannesm/subscriptions","organizations_url":"https://api.github.com/users/hannesm/orgs","repos_url":"https://api.github.com/users/hannesm/repos","events_url":"https://api.github.com/users/hannesm/events{/privacy}","received_events_url":"https://api.github.com/users/hannesm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-23T14:04:59Z","updated_at":"2018-05-29T13:54:05Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/bobbypriambodo/ocaml-tls/pulls/1","html_url":"https://github.com/bobbypriambodo/ocaml-tls/pull/1","diff_url":"https://github.com/bobbypriambodo/ocaml-tls/pull/1.diff","patch_url":"https://github.com/bobbypriambodo/ocaml-tls/pull/1.patch"},"body":"I tweaked the code a bit to use stricter types and conform more cleanly with\r\nthe RFC.\r\n\r\nIn RFC 7301, it says 'The protocol identified in the\r\n\"application_layer_protocol_negotiation\" extension type in the ServerHello\r\nSHALL be definitive for the connection, until renegotiated.'.\r\n\r\nThis means, the alpn_protocol is local to each renegotiation (instead of global\r\nfor a complete TLS session):\r\n- move alpn_protocol from handshake_state (which is TLS-session global, such\r\n  as protocol version that may not change during a renegotiation) to\r\n  session_data (where all the other parameters of a negotiation are kept)\r\n\r\nFrom RFC 7301 'except that the \"ProtocolNameList\" MUST contain exactly one\r\n\"ProtocolName\".'  To ensure this invariant, Core.server_extension now contains\r\n`` `ALPN of string `` -- and the Reader and Writer are adjusted to deal with it.\r\nThis is similar to how `` `Hostname `` works: the client_extension carries a single\r\nstring, while the server_extension must be empty (`` `Hostname `` is a constructor\r\nof cardinality 0).  The Reader and Writer are adapted for this change.\r\n\r\nIn epoch_data, I renamed peer_alpn to alpn_protocol.  The prefix `peer_` is used\r\nfor information about the other endpoint, but alpn is (similar to ciphersuite)\r\nnegotiated once.\r\n\r\nHandshake_client safety: if server responded with a alpn protocol, ensure it is\r\none we actually asked for.\r\n\r\nBoth Handshake_client and Handshake_server now include the negotiated\r\nalpn_protocol in the session_data.\r\n\r\nHandshake_server processes the ALPN extension in answer_client_hello_common,\r\nwhich is used for every renegotiation.  Previously, the ALPN was only processed\r\n\r\nRemoved `type alpn_protocol = string`, no reason to alias the type.\r\nin the initial handshake.  Also, `first_match` (from Utils) is reused."},"comment":{"url":"https://api.github.com/repos/bobbypriambodo/ocaml-tls/issues/comments/392785054","html_url":"https://github.com/bobbypriambodo/ocaml-tls/pull/1#issuecomment-392785054","issue_url":"https://api.github.com/repos/bobbypriambodo/ocaml-tls/issues/1","id":392785054,"user":{"login":"bobbypriambodo","id":4920820,"avatar_url":"https://avatars1.githubusercontent.com/u/4920820?v=4","gravatar_id":"","url":"https://api.github.com/users/bobbypriambodo","html_url":"https://github.com/bobbypriambodo","followers_url":"https://api.github.com/users/bobbypriambodo/followers","following_url":"https://api.github.com/users/bobbypriambodo/following{/other_user}","gists_url":"https://api.github.com/users/bobbypriambodo/gists{/gist_id}","starred_url":"https://api.github.com/users/bobbypriambodo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobbypriambodo/subscriptions","organizations_url":"https://api.github.com/users/bobbypriambodo/orgs","repos_url":"https://api.github.com/users/bobbypriambodo/repos","events_url":"https://api.github.com/users/bobbypriambodo/events{/privacy}","received_events_url":"https://api.github.com/users/bobbypriambodo/received_events","type":"User","site_admin":false},"created_at":"2018-05-29T13:54:05Z","updated_at":"2018-05-29T13:54:05Z","author_association":"OWNER","body":"I will merge this so we can continue the review on the original PR."}}
{"actor":{"display_login":"bobbypriambodo"}}