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

Throw SSLException if SSLEngine inbound is closed before outbound. #845

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on May 1, 2020

  1. Throw SSLException if SSLEngine inbound is closed before outbound.

    Fixes google#839.
    
    This should be _mostly_ uncontroversial as it is already documented
    to do so[1] but could cause app compat issues.  A quick scan of
    AOSP suggests no major issues however there is a CTS test for the
    old behaviour[2] which will need changing.
    
    The bulk of this change is regression tests for the correct behaviour
    for the various possible orderings of close calls and TLS close
    alerts. The behaviour change test is
    closingInboundBeforeClosingOutboundShouldFail() in place of
    closingInboundShouldOnlyCloseInbound().  Changes outside
    ConscryptEngineTest are minimal.
    
    Close behaviour before handshaking starts is undefined and we differ
    from the RI, but I don't think that's problematic.
    
    Obviously also needs documenting in Conscrypt and Android release
    notes.
    
    This also means that STATE_CLOSED_INBOUND is never reached, which
    means it can be eliminated in a future CL allowing some minor
    simplifications.
    
    NB This can be merged independently of google#844 and I'll rebase that
    change on top of it.
    
    [1] https://developer.android.com/reference/javax/net/ssl/SSLEngine#closeInbound()
    [2] https://cs.android.com/android/platform/superproject/+/master:libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java;l=611
    prbprbprb committed May 1, 2020
    Configuration menu
    Copy the full SHA
    4a57a16 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2020

  1. Configuration menu
    Copy the full SHA
    bf98bf9 View commit details
    Browse the repository at this point in the history