implement IANA cipher suite support for mbedtls backend #3537
implement IANA cipher suite support for mbedtls backend #3537pppaulpeter wants to merge 38 commits intowarmcat:mainfrom
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. |
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. |
fb3f410 to
d8c745e
Compare
2920c3f to
5d880a3
Compare
This changes the approach of Async DNS vs multiple DNS servers... - we will take all the platform tells us about - initially we will broadside the queries on all the servers - we'll measure the response performce over time, with decay - nonresponsive servers will get ignored and responsive ones will round-robin
88fcf83 to
7405b2e
Compare
f7c48e7 to
b0818f0
Compare
|
Hi Andy, I've rebased and squashed everything into a single commit on top of current main as you requested:
Please let me know if anything else needs adjustment. |
Implement parse_cipher_list_to_ids() using lws_tokenize to convert IANA-format cipher names (underscore-separated) and mbedTLS-format names (dash-separated) to mbedtls cipher IDs. Fix tokenizer flags: add LWS_TOKENIZE_F_MINUS_NONTERM, LWS_TOKENIZE_F_COMMA_SEP_LIST, and LWS_TOKENIZE_F_NO_INTEGERS so dash-separated cipher names are parsed as whole tokens. Add tests in api-test-gencrypto via the public SSL_CTX_set_cipher_list() API to verify mbedTLS format, IANA format, multiple ciphers, and rejection of invalid/empty inputs. Co-developed-by: Claude (Anthropic) Co-developed-by: ChatGPT (OpenAI)
b0818f0 to
c7cd8ad
Compare
|
Thanks. I pushed your patch currently on _temp (nothing is stopping it to go to main except time to deal with the CI fallout while in the middle of other stuff). However I added a second patch on top, this deals more carefully with the existing arrangements for openssl cipher, which probably has users... if you continue to use the 1.2 and 1.3 paths for that it should continue to work as before. But if you want to use the new IANA cipher path, it has its own context creation member now which will take precedence over the old way if it's used. It also clarifies that if you're using gnutls, you can use the old members and they will be passed to gnutls, but the string will be interpreted according to gnutls' rules alone. Schannel doesn't seem to offer cipher selection it's supposed to be done by the OS in its worldview. |
6790fe8 to
609de65
Compare
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"