[WIP] Some further sketch work on an C interface for TLS #1341
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Re #1323
To some extent I think this design should co-evolve with a curl backend implementation. Since curl already supports most TLS libraries with a C interface, whatever we do should fit into the same model.
Big question is if the C API should follow the C++ API with its callbacks for output, or if it would be better to just buffer outputs in the FFI object and then the application can call a function to find out if output is pending and call
SSL_read
when they feel like it. It looks like curl assumes it can do that; though of course it's possible to implement the same buffering just within curl's vtls layer.@lambdafu Don't know if you had any plans on taking this up, but feel free to fork from here and continue. I probably won't have time to work on this further before 2.4.0 release.