Skip to content

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