-
Notifications
You must be signed in to change notification settings - Fork 726
Fix RFC 7250 Compliance (#2257) #2274
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2274 +/- ##
==========================================
- Coverage 94.88% 94.88% -0.01%
==========================================
Files 103 103
Lines 24204 24201 -3
==========================================
- Hits 22965 22962 -3
Misses 1239 1239 ☔ View full report in Codecov by Sentry. |
a88b6e5
to
1cd38da
Compare
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.
This seems reasonable to me. Thanks for the quick fix!
rustls/src/client/hs.rs
Outdated
(true, false) => CertificateTypeExtensionNegotationResult::Err( | ||
Error::PeerIncompatible(PeerIncompatible::IncorrectCertificateTypeExtension), | ||
), | ||
(false, true) => CertificateTypeExtensionNegotationResult::Err( |
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.
The coverage gap flagged for this branch seems worth considering if it isn't too tricky. WDYT?
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.
To be honest I'm not sure if it should be possible to get to the (false, true)
arm.
There are already api tests sending an unsolicited certificate type extension in the ServerHello
, but then an UnsolicitedEncryptedExtension
error is raised before even negotiating the certificate type.
If there is no way to get to that situation we could maybe remove the UnsolicitedCertificateTypeExtension
, or I can write a small unit test.
Benchmark resultsInstruction countsSignificant differencesClick to expand
Other differencesClick to expand
Wall-timeSignificant differencesClick to expand
Other differencesClick to expand
Additional informationCheckout details:
|
d66af8b
to
28515ec
Compare
28515ec
to
0d5ccd9
Compare
b7fb5f6
to
ac45f3d
Compare
Just to check my understanding here: is this blocked on another round of iteration based on djc's most recent feedback? |
22fc4ac
to
9c80f10
Compare
The semver test is failing, with the message |
@holodorum you can ignore that, sorry about the noise. It's a side-effect from #2288 (upstream issue: obi1kenobi/cargo-semver-checks#638) that will be resolved once we cut a rustls/rustls-post-quantum release, which should happen soon. |
9c80f10
to
e94b32b
Compare
I tried merging this with recent updates from main in brody4hire#8 - semver seems to be OK now. But codecov does seem to indicate some missing test coverage. I tried a couple mutations in brody4hire#8 based on the missing test coverage, they do not seem to trigger any CI testing failures. I think we need to add the missing test coverage. |
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.
I'm pretty happy with this. One comment, and then I feel this is mergable. A rebase will fix the CI issue now.
e94b32b
to
2f28d35
Compare
Updated logic to validate `client_certificate_type_extension` and `server_certificate_type_extension` in the ClientHello. Added an openssl interop test to replicate the issue and verify it's handled correctly. Co-authored-by: Adolfo Ochagavía <github@adolfo.ochagavia.nl>
2f28d35
to
fa3e317
Compare
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.
Thanks! Appreciate your patience.
Thank you all too for the feedback and patience😁 |
This pull requests fixes issue #2257 by changing the way the server validates the
client_certificate_type_extension
and theserver_certificate_type_extension
in theServerHello
.Considerations
common_state
and validated the negotation of raw keys only, hence we called the structRawKeyNegotationParams
. The validation logic is different for the server and client now and we are not only negotiating raw keys, I moved this toclient::hs::CertificateTypeExtensionParams
andserver::hs::CertificateTypeExtensionParams
.