-
Notifications
You must be signed in to change notification settings - Fork 717
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
Re-enable TLS 1.3 SAW tests #3031
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lrstewart
reviewed
Sep 9, 2021
lrstewart
reviewed
Sep 13, 2021
You'll need to rebase to pick up 01b3c46 and get the integration tests to pass. |
Fortunately, these changes are backwards compatible with older versions of SAW as well.
z3 appears to bestow some performance gains over abc in these proofs.
This is needed to make the SAW proofs work after commit 9a4233e, which moves the logic for detecting QUIC support to `s2n_connection_is_quic_enabled` in `s2n_quic_support.c`.
lrstewart
approved these changes
Sep 15, 2021
feliperodri
approved these changes
Sep 27, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only minor comments.
This reverts commit 04e494e.
RyanGlScott
added a commit
to RyanGlScott/s2n-tls
that referenced
this pull request
Oct 1, 2021
Unfortunately, aws#3031 landed before it had a chance to be tested against c096a55, which alters the logic used to check whether QUIC is enabled `s2n_connection_is_quic_enabled`. This updates the corresponding SAW specification to take the new definition of `s2n_connection_is_quic_enabled` into account. This requires inspecting one more bitfield in `s2n_connection` to accomplish. While I was in town, I updated the relevant comments in the SAW specification that describe `quic_enabled` and friends.
dougch
added a commit
that referenced
this pull request
Oct 1, 2021
dougch
added a commit
to dougch/s2n-tls
that referenced
this pull request
Oct 1, 2021
dougch
added a commit
to dougch/s2n-tls
that referenced
this pull request
Oct 1, 2021
dougch
added a commit
to dougch/s2n-tls
that referenced
this pull request
Oct 1, 2021
RyanGlScott
added a commit
to RyanGlScott/s2n-tls
that referenced
this pull request
Oct 2, 2021
RyanGlScott
added a commit
to RyanGlScott/s2n-tls
that referenced
this pull request
Oct 2, 2021
Unfortunately, aws#3031 landed before it had a chance to be tested against c096a55, which alters the logic used to check whether QUIC is enabled `s2n_connection_is_quic_enabled`. This updates the corresponding SAW specification to take the new definition of `s2n_connection_is_quic_enabled` into account. This requires inspecting one more bitfield in `s2n_connection` to accomplish. While I was in town, I took the time to tidy up the various pieces of the SAW specification that involve bitfields. It's still not as pretty as it could be, but it's a sit better than it was before.
RyanGlScott
added a commit
to RyanGlScott/s2n-tls
that referenced
this pull request
Oct 5, 2021
RyanGlScott
added a commit
to RyanGlScott/s2n-tls
that referenced
this pull request
Oct 5, 2021
Unfortunately, aws#3031 landed before it had a chance to be tested against c096a55, which alters the logic used to check whether QUIC is enabled `s2n_connection_is_quic_enabled`. This updates the corresponding SAW specification to take the new definition of `s2n_connection_is_quic_enabled` into account. This requires inspecting one more bitfield in `s2n_connection` to accomplish. While I was in town, I took the time to tidy up the various pieces of the SAW specification that involve bitfields. It's still not as pretty as it could be, but it's a sit better than it was before.
RyanGlScott
added a commit
to RyanGlScott/s2n-tls
that referenced
this pull request
Oct 7, 2021
RyanGlScott
added a commit
to RyanGlScott/s2n-tls
that referenced
this pull request
Oct 7, 2021
Unfortunately, aws#3031 landed before it had a chance to be tested against c096a55, which alters the logic used to check whether QUIC is enabled `s2n_connection_is_quic_enabled`. This updates the corresponding SAW specification to take the new definition of `s2n_connection_is_quic_enabled` into account. This requires inspecting one more bitfield in `s2n_connection` to accomplish. While I was in town, I took the time to tidy up the various pieces of the SAW specification that involve bitfields. It's still not as pretty as it could be, but it's a sit better than it was before.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolved issues:
Resolves #1826.
Description of changes:
This PR re-enables the SAW tests that exercise TLS 1.3–specific code paths. In particular, we now:
s2n_conn_set_handshake_type
ands2n_advance_message
. The key change is insetup_connection
, which now checks all possibleactual_protocol_version
values instead of justS2N_TLS12
. I also modernized the implementations of the Cryptol TLS 1.3 code, especially tls13_state_machine_fnand
tls13_handshakes`.handshake_type
s ininitial_connection
, not justINITIAL
.APPLICATION_DATA
message, since going past that leads to strange results, especially for non-INITIAL
handshake_type
s. Thetrace_advance_message
function also now usess2nTrans
instead of simplyadvance_message
, which is a more accurate portrayal of what actually goes on in S2N.EARLY_CLIENT_CCS
,WITH_EARLY_DATA
, andMIDDLEBOX_COMPAT
.TLS_HELLO_RETRY_REQUEST
handshake_action
(which no longer exists in S2N) withTLS_SERVER_HELLO
.Call-outs:
I primarily tested against LLVM 3.9.1 and a nightly version of SAW (0.6.0.99), as this is what the CI currently uses. I have also verified that these changes work with a newer version of LLVM (10) and SAW (0.8), but I did not change the versions of these tools as part of this PR. If there is interest in updating the versions of these tools, I would be happy to do so.
Testing:
To check the proofs, run
make -C tests/saw tmp/verify_handshake.log
. This should be covered by CI, which runs this command as one of its steps.For the most part, this only changes SAW code. The one exception is a change that I made to
tls/Makefile
, which was only required to make sure thats2n_tls13.bc
is linked against in the bitcode file that SAW verifies against. None of the C code was changed.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.