{"action":"created","issue":{"url":"https://api.github.com/repos/erlang/otp/issues/631","labels_url":"https://api.github.com/repos/erlang/otp/issues/631/labels{/name}","comments_url":"https://api.github.com/repos/erlang/otp/issues/631/comments","events_url":"https://api.github.com/repos/erlang/otp/issues/631/events","html_url":"https://github.com/erlang/otp/pull/631","id":59113347,"number":631,"title":"ssl: Add TLS-ALPN support","user":{"login":"essen","id":141739,"avatar_url":"https://avatars.githubusercontent.com/u/141739?v=3","gravatar_id":"","url":"https://api.github.com/users/essen","html_url":"https://github.com/essen","followers_url":"https://api.github.com/users/essen/followers","following_url":"https://api.github.com/users/essen/following{/other_user}","gists_url":"https://api.github.com/users/essen/gists{/gist_id}","starred_url":"https://api.github.com/users/essen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/essen/subscriptions","organizations_url":"https://api.github.com/users/essen/orgs","repos_url":"https://api.github.com/users/essen/repos","events_url":"https://api.github.com/users/essen/events{/privacy}","received_events_url":"https://api.github.com/users/essen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-26T18:10:24Z","updated_at":"2015-03-03T15:31:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/erlang/otp/pulls/631","html_url":"https://github.com/erlang/otp/pull/631","diff_url":"https://github.com/erlang/otp/pull/631.diff","patch_url":"https://github.com/erlang/otp/pull/631.patch"},"body":"This commit adds support for RFC7301, application-layer protocol\r\nnegotiation. ALPN is the standard based approach to the NPN\r\nextension, and is required for HTTP/2.\r\n\r\nALPN lives side by side with NPN and provides an equivalent\r\nfeature but in this case it is the server that decides what\r\nprotocol to use, not the client.\r\n\r\nWhen both ALPN and NPN are sent by a client, and the server is\r\nconfigured with both ALPN and NPN options, ALPN will always\r\ntake precedence. This behavior can also be found in the OpenSSL\r\nimplementation of ALPN.\r\n\r\nALPN and NPN share the ssl:negotiated_protocol/1 function for\r\nretrieving the negotiated protocol. The previously existing\r\nfunction ssl:negotiated_next_protocol/1 still exists, but has\r\nbeen deprecated and removed from the documentation.\r\n\r\nThe tests against OpenSSL require OpenSSL version 1.0.2+.\r\n\r\n-----------------------------------\r\n\r\nThe changes in this PR were first discussed with @IngelaAndin by email, including the deprecation of the ssl:negotiated_next_protocol/1 function.\r\n\r\nWe are hoping this can make it into OTP 18."},"comment":{"url":"https://api.github.com/repos/erlang/otp/issues/comments/76967218","html_url":"https://github.com/erlang/otp/pull/631#issuecomment-76967218","issue_url":"https://api.github.com/repos/erlang/otp/issues/631","id":76967218,"user":{"login":"IngelaAndin","id":294507,"avatar_url":"https://avatars.githubusercontent.com/u/294507?v=3","gravatar_id":"","url":"https://api.github.com/users/IngelaAndin","html_url":"https://github.com/IngelaAndin","followers_url":"https://api.github.com/users/IngelaAndin/followers","following_url":"https://api.github.com/users/IngelaAndin/following{/other_user}","gists_url":"https://api.github.com/users/IngelaAndin/gists{/gist_id}","starred_url":"https://api.github.com/users/IngelaAndin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IngelaAndin/subscriptions","organizations_url":"https://api.github.com/users/IngelaAndin/orgs","repos_url":"https://api.github.com/users/IngelaAndin/repos","events_url":"https://api.github.com/users/IngelaAndin/events{/privacy}","received_events_url":"https://api.github.com/users/IngelaAndin/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T15:31:26Z","updated_at":"2015-03-03T15:31:26Z","body":"I think it looks good. I have one little request, and it is in tls_connection.erl   where you have enumerated versions of the Protocol variable, we have followed the convention: When we have several instances of a variable with enumeration we give the inputed variable to the function version 0\r\nand updated versions 1,2,3... until the last version that should be the returned version (the new state variable) will be called only the variable name so that it shall be clear that this is the intended return value.  It would be nice if you can also follow this convention.\r\n"}}