astitcher commented on a change in pull request #210: PROTON-2137: Removing ssl 
init from ssl_server_options default constructor
URL: https://github.com/apache/qpid-proton/pull/210#discussion_r349671129
 
 

 ##########
 File path: cpp/src/connection_options.cpp
 ##########
 @@ -175,7 +175,8 @@ class connection_options::impl {
             }
         } else if (!client && ssl_server_options.set) {
             pn_ssl_t *ssl = pn_ssl(pnt);
-            if (pn_ssl_init(ssl, ssl_server_options.value.impl_->pn_domain(), 
NULL)) {
+            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)) {
 
 Review comment:
   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)`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to