Skip to content
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

Allow user to pass a pre-configured SSL_CTX to the client. #456

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pgit
Copy link
Contributor

@pgit pgit commented Mar 21, 2022

When using a secure connection, the onSecuring() callback is invoked with a pointer to a freshly created OpenSSL SSL object. You can then install certificates etc. on this session object.

This session object is created from a 'template' SSL_CTX object, which stores the defaults for all newly created SSL sessions. Some applications might have a pre-configured SSL_CTX and use that for configuring the SSL connection.

This patch adds a way to pass a pre-configured SSL_CTX to the connection, which is used instead of the one that is constructed internally.

@pgit pgit changed the title Allow client to pass a pre-configured SSL_CTX to the client. Allow user to pass a pre-configured SSL_CTX to the client. Mar 21, 2022
@EmielBruijntjes
Copy link
Member

Have you also tried to add extra methods to the TcpHandler class for initialization/construction of the ssl context? I find the extra parameter a bit odd.

@pgit
Copy link
Contributor Author

pgit commented Mar 28, 2022

Added a new overload of onSecuring() that userspace can use to return a SSL_CTX. Not quite sure about naming here. Also, are there no concerns about ABI breakage from adding a new method to the vtable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants