Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport ALPN to v4.x LTS #10831

Closed
wants to merge 5 commits into from
Closed

Commits on Jan 16, 2017

  1. tls, crypto: add ALPN Support

    cherry-pick 802a2e7 from v6-staging.
    
    ALPN is added to tls according to RFC7301, which supersedes NPN.
    When the server receives both NPN and ALPN extensions from the client,
    ALPN takes precedence over NPN and the server does not send NPN
    extension to the client. alpnProtocol in TLSSocket always returns
    false when no selected protocol exists by ALPN.
    In https server, http/1.1 token is always set when no
    options.ALPNProtocols exists.
    
    PR-URL: nodejs#2564
    Reviewed-By: Fedor Indutny <[email protected]>
    Reviewed-By: Ben Noordhuis <[email protected]>
    Shigeki Ohtsu authored and shigeki committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    2feed57 View commit details
    Browse the repository at this point in the history
  2. tls,crypto: move NPN protcol data to hidden value

    cherry-pick 7eee372 from v6-staging.
    
    This fix is to be consistent implementation with ALPN. Tow NPN
    protocol data in the persistent memebers move to hidden variables in
    the wrap object.
    
    PR-URL: nodejs#2564
    Reviewed-By: Ben Noordhuis <[email protected]>
    Shigeki Ohtsu authored and shigeki committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    6b98429 View commit details
    Browse the repository at this point in the history
  3. test: fix alpn tests for openssl1.0.2h

    cherry-pick 65030c7 from v6-staging.
    
    openssl/openssl@af2db04
    changed some ALPN behaviors. The tests when ALPN has no selection
    should be fixed because openssl was changed NPN callback to be invoked
    in this case.
    
    Fixes: nodejs#6458
    PR-URL: nodejs#6550
    Reviewed-By: Myles Borins <[email protected]>
    Reviewed-By: Fedor Indutny <[email protected]>
    Reviewed-By: Ben Noordhuis <[email protected]>
    Shigeki Ohtsu authored and shigeki committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    3bd756c View commit details
    Browse the repository at this point in the history
  4. tls: copy the Buffer object before using

    cherry-pick c26b9af from v6-staging.
    
    `convertNPNProtocols` and `convertALPNProtocols' uses the `protocols`
    buffer object as it is, and if it is modified outside of core, it
    might have an impact. This patch makes a copy of the buffer object,
    before using it.
    
    PR-URL: nodejs#8055
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Ben Noordhuis <[email protected]>
    Reviewed-By: Franziska Hinkelmann <[email protected]>
    thefourtheye authored and shigeki committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    7c07184 View commit details
    Browse the repository at this point in the history
  5. crypto: remove unnecessary variables of alpn/npn

    The Local variables of `npn_buffer` and `alpn_buffer` are not
    necessary to be created from `args[0]`. Remove and fold them into the
    subsequent call.
    shigeki committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    4bdbb73 View commit details
    Browse the repository at this point in the history