You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2019/11/22 16:04:38 UTC

[GitHub] [qpid-proton] astitcher commented on a change in pull request #210: PROTON-2137: Removing ssl init from ssl_server_options default constructor

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org