-
Notifications
You must be signed in to change notification settings - Fork 148
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
Re-using http connection with custom ssl callback / custom certificate validation #384
Comments
Hi @plougue , how did you copy the |
Hello ! My However on API calls, the callback object seems to be copied from the Because cpprest's The key for retrieving the existing connection is made using the address of the std::function inside the |
Yeah, I got it. |
But how can we fix this issue? I'm thinking maybe adding another parameter |
Hello again. |
Hi !
I'm trying to work within a context in which I need to customize certificate validation. For this I use operation_context::set_ssl_context_callback to work directly with the boost::asio::ssl::context object and it works.
However it seems like it's impacting performances by preventing existing connections from being reused. Specifically, it looks like it's because the key used to retrieve a connection is using an std::function object's address :
azure-storage-cpp/Microsoft.WindowsAzure.Storage/src/util.cpp
Line 487 in 5b1c159
This std::function has been copied from my context into the http::config object right here
azure-storage-cpp/Microsoft.WindowsAzure.Storage/src/executor.cpp
Line 149 in 5b1c159
I've also noticed that in some cases the std::function object inside the http::config object is allocated at the same address over and over again so it is actually the same but there is no real guarantee for it.
Would it be possible to allow consistently reusing the same connection when setting an ssl_context ?
Thanks !
The text was updated successfully, but these errors were encountered: