[Discussion] Add ENABLE_TLS option
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 179
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 26
Description
We already have the `ENABLE_SASL` option which is default OFF, and we used to regard that SSL module is a MUST HAVE.
But the SSL init in `net/security-context/tls-stream.cpp` will register Photon mutex, and will potentially cause core dumps if the app has used other third-party libs depends on SSL.
Since we can't remove all the third-party which might still be using std::threads, we sometimes need to disable SSL in Photon.
The new `ENABLE_TLS` option will only affect RPC client and HTTP client, and can defaults to ON.
----------
Another option is not to add this option, but to change RPC client API. If not passing a `TLSContext*`, the TLS stream will not be initialized, so the SSL global init will not be called.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading net/security-context/tls-stream.cpp and locating the existing ENABLE_SASL option, then inspect the RPC client and HTTP client entry points mentioned in the issue. Compare the proposed ENABLE_TLS option with the alternative TLSContext API change; the work is done only after one approach is selected and its effect on SSL initialization and both clients is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend-api-design, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100