-
Notifications
You must be signed in to change notification settings - Fork 1.6k
implement IANA cipher suite support for mbedtls backend #3537
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks... as I mentioned I was hoping to avoid a migraine.
In order to remove all the churn (your delta was 13 patches...) I did a git diff from the basis point from main you used to your HEAD, this is a single patch capturing your changes that is a lot simpler than what you pushed. Layered patches are good but if it just obscures the effect of your patch it is bad and I would much rather have one patch.
In summary: Please a) convert away from strtok to struct lws_tokenize, b) squash everything to one patch like I described above and c) push it on top of today's main branch, test then d) push again to your PR branch with that. |
yes, i use chatgpt5.2, claude,grok etc. i will check your valuable comment carefully and since this is my first git push for pull request, there must be a lot of problem. |
- Add IANA cipher suite parsing for mbedtls backend using lws_tokenize - Implement ssl_pm_set_ciphersuites() to apply cipher IDs to SSL config - Apply cipher list during TLS handshake in lws_tls_server_vhost_backend_init() - Fix missing mbedtls_ssl_session_save() call in session update case - Add CMake detection for mbedtls_ssl_conf_ciphersuites and mbedtls_ssl_session_save - Standardize macro naming to follow lowercase function pattern This implementation aligns the mbedtls backend with OpenSSL and Schannel by supporting standard IETF/IANA cipher names. The lws_tokenize API provides robust, non-destructive tokenization and eliminates hardcoded cipher lists, allowing automatic updates when new ciphers are added to mbedtls.
c510a77 to
f7c48e7
Compare
|
Thanks. I split this out into two patches, one to deal with handling missing session support and the other your main patch. I pushed where I am at with it on lws _temp branch, you can switch to patching on top of that. I think it's generally good, but I noticed 1) This is a bit of a no-no, the api claims to affect the SSL but it actually affects the ctx, which is to say the vhost. If the guy wants to change the vhost in a sticky way, he should use the api with _ctx in the name, not one that looks like it only affects the one connection he passes to it. For server, it makes sense to have the _ctx api and be able to adjust the vhost, since you are setting up your server and the whole vhost behaviours. If you want to control the client alg binding per connection, it doesn't make sense to touch the _ctx / vhost. IIUI the cipher list should be bound to the SSL, not the "SSL_CTX" in that case. At any rate it seems wrong as it is with the SSL api affecting the SSL_CTX.
|
|
OK I followed your removal of the SSL api.
Please ask whoever you have to ask to get permission to explain this in a word or two in the patch as shown above. My email address is everywhere in the code and I explain my LLM usage, since I don't take anyone's money because the code is given for free, I don't care about anyone else's policies except my own. The test stuff can't build because it can't touch private apis / headers from lws. The test apps are essentially "user code" and link against the library without any special access inside. So it should just use whatever the public api is for your thing that's accessible to user code, using public headers etc. If there's no public api because you talk to it by an info struct or whatever, then you have to test it from that perspective. |
260929d to
f06bf53
Compare
sorry, i just update the unit test code. |
Implement parse_cipher_list_to_ids() to convert IANA names to mbedtls IDs
Update SSL_set_cipher_list() to apply ciphersuites immediately when active
Add cipher list application in server vhost initialization
Add capability guards for mbedtls session functions (compatible with 2.16.3)
Verified: cipher restrictions properly enforced during TLS handshake"