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

feature/alpn support #143

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Commits on Jul 15, 2016

  1. Provide support for ALPN extensions

    To propagate the original ALPN extension we needed to make changes at
    four points:
    
    1. On original ClientHello. Here we piggyback on the early peak into the
    ClientHello message to extract SNI and also extract the full ALPN
    extension. We are not being too smart about it; if it is not fully
    available, we just skip it (thus falling back to the original
    behaviour). We store this in the ctx.
    
    2. On "fake" ClientHello to the original destination, we set the ALPN we
    extracted during (1) above (available in the ctx).
    
    3. On "fake" ServerHello from the original destination, we extract the
    ALPN that the real server accepted. We store this in the ctx, same
    location as (1) above (so original list is gone, but we don't need it
    anymore).
    
    4. On original connection establishment, we add a new callback (as the
    "fake" server) to choose protocol from the ALPN list provided by the
    original ClientHello (1). Here we just set whatever the real server
    chose in (3).
    
    We rely on libssl 1.0.2 for ALPN functions and callbacks. OPENSSL
    version checks added to toggle ALPN support.
    
    Change-Id: Iee7f240d98ae0d1af52e09ae1010242b9d4b9217
    Ilija Baniski committed Jul 15, 2016
    Configuration menu
    Copy the full SHA
    de90e82 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2016

  1. Update test suite for added ALPN support.

    Existing tests in the ssl_tls_client_hello_parse suite were modified to
    use the new interface of ssl_tls_clienthello_parse().
    
    Additional test was added to specifically exercise extraction of ALPN
    from a ClientHello message.
    
    Change-Id: Id7bfb3701f8db9b2b9bfb9fdbff3d217fe9dd4d6
    Ilija Baniski committed Jul 18, 2016
    Configuration menu
    Copy the full SHA
    90b5de2 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2016

  1. Only handle ALPN in non-http proxyspec

    In http/https proxyspec modes sslsplit parses HTTP and performs certain
    modifications (mostly in the HTTP headers). This parsing fails for
    HTTP/2 (as expected).
    
    Only perform ALPN forwarding for ssl proxyspec, where raw data is just
    proxied across the two connections without any modifications.
    
    Change-Id: I40ed058ffbf273d98bd8214ae654a8202dc5c5a8
    Ilija Baniski committed Jul 27, 2016
    Configuration menu
    Copy the full SHA
    efa84d7 View commit details
    Browse the repository at this point in the history