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

PROTON-2137: Removing ssl init from ssl_server_options default constructor #210

Conversation

rabih-mourad
Copy link

No description provided.

@rabih-mourad rabih-mourad force-pushed the PROTON-2137-cpp-performance-regression-found-in-0.29.0 branch from ac8d755 to c909684 Compare November 22, 2019 15:07
@rabih-mourad rabih-mourad changed the title Removing ssl init from ssl_server_options default constructor PROTON-2137: Removing ssl init from ssl_server_options default constructor Nov 22, 2019
@rabih-mourad
Copy link
Author

Weird, I just renamed the commit and travis-ci failed...

Copy link
Member

@astitcher astitcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea, but is wrongly implemented currently.

Comment on lines 178 to 179
pn_ssl_domain_t* ssl_domain = ssl_server_options.value.impl_ ? ssl_server_options.value.impl_->pn_domain() : NULL;
if (pn_ssl_init(ssl, ssl_domain, NULL)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is wrong unfortunately.
the comparison with the client case is misleading. pn_ssl_init(ssl, NULL, NULL) will create an ssl connection with the default domain - however the default domain is a client domain so you can't do this if the connection is a server.
So you need to replace he NULL with something like pn_ssl_domain(PN_SSL_MODE_SERVER).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a shame that this wasn't picked up by any tests - I thought we had some ssl server tests.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@astitcher I replaced NULL by pn_ssl_domain(PN_SSL_MODE_SERVER) like you mentioned

@astitcher
Copy link
Member

@rabih-mourad Could you squash this into a single commit please - then I can rebase and merge it.

@rabih-mourad rabih-mourad force-pushed the PROTON-2137-cpp-performance-regression-found-in-0.29.0 branch from 1d9f152 to 1236c4b Compare November 22, 2019 17:45
@rabih-mourad
Copy link
Author

@astitcher squash done. Will we add a test in this pull request or we will do another one for it?

@astitcher
Copy link
Member

I'm happy to commit this as is. I think testing c++ ssl servers is probably a different issue.

@jirkadanek
Copy link
Contributor

That travis failure was unrelated to the PR. Something changed either on Travis or in Brew (brew.sh) so that openssl .dynlib is no longer found when PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig is set.

I think I know what to do about it.

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