-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add ecc extensions only if ecc ciphersuite is used #1378
Conversation
Fix compliancy to RFC4492. ECC extensions should be included only if ec ciphersuites are used. Interoperability issue with bouncy castle. Mbed-TLS#1157
Rebased and added an entry in the ChangeLog |
Add an entry in the ChangeLog, describing the fix.
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.
Besides the suggested improvements to the ChangeLog entry, I think this PR lacks a test.
It should be easy enough to add one in ssl-opt.sh
by forcing a non-ECC ciphersuite and then checking for the absence of the ECC extensions in the debug logs of the client and server. Also have a test where the client offers many suites, some of them ECC, and the server picks a non-ECC suite. (And perhaps, just to be sure, a test with an ECC suite just to be extra sure the extensions are present when they should be, and contrast with the other two tests.)
= mbed TLS x.x.x branch released xxxx-xx-xx | ||
|
||
Bugfix | ||
* Add ecc extensions only if an ecc based ciphersuite is used. |
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 think ChangeLog entries should provide more context. For example here, "In TLS, add ECC extensions to the ClientHello and ServerHello messages only if". (And ECC should be capitalized while at it.)
Also, "Affects interop" is ambiguous and not a complete sentence. How about: "This improves compliance to RFC 4492, and as a result, solves interoperability issues with BouncyCastle."?
Update ChangeLog with a less ambigous description.
Add test to verify if an ecc based extension exists or not if an ecc based ciphersuite is used or not.
@mpg I added a test i |
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 for adding the test!
I don't think interop tests are necessary here, as the test in ssl-opt.sh is enough to ensure we now behave in a compliant way, and adding Bouncycastle to compat.sh would be too much work for this PR.
Note: CI only failed in the timing test that is known to be flaky (#1517), so not a blocker for merging. |
I meant interop tests with openssl and GnuTLS, but I see your point. Thanks for approving! |
1. Update the test script to un the ECC tests only if the relevant configurations are defined in `config.h` file 2. Change the HASH of the ciphersuite from SHA1 based to SHA256 for better example
@mpg I updated the test to run conditionally only if the relevant modules are defined in the configuration. |
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.
Nice improvements.
This PR and its backports have been fully approved cc @sbutcher-arm |
Description
Fix compliancy to RFC4492. ECC extensions should be included
only if ec ciphersuites are used. Interoperability issue with
bouncy castle. Resolves #1157
Status
IN DEVELOPMENT
Requires Backporting
Yes
Which branch?
comments
Missing tests, ChangeLog
Todos
Steps to test or reproduce
Outline the steps to test or reproduce the PR here.