You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2019/11/22 18:34:39 UTC

[qpid-proton] branch master updated: PROTON-2137: Removing ssl init from ssl_server_options default constructor

This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/master by this push:
     new b9ea52d  PROTON-2137: Removing ssl init from ssl_server_options default constructor
b9ea52d is described below

commit b9ea52d0229f69e70aa5543bd5a1521fca71796e
Author: MOURAD Rabih <rm...@murex.com>
AuthorDate: Thu Nov 21 12:53:57 2019 +0100

    PROTON-2137: Removing ssl init from ssl_server_options default constructor
---
 cpp/src/connection_options.cpp | 3 ++-
 cpp/src/ssl_options.cpp        | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cpp/src/connection_options.cpp b/cpp/src/connection_options.cpp
index 2bf281d..4e2bb3e 100644
--- a/cpp/src/connection_options.cpp
+++ b/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() : pn_ssl_domain(PN_SSL_MODE_SERVER);
+            if (pn_ssl_init(ssl, ssl_domain, NULL)) {
                 throw error(MSG("server SSL/TLS initialization error"));
             }
         }
diff --git a/cpp/src/ssl_options.cpp b/cpp/src/ssl_options.cpp
index bd4d5c1..f74f014 100644
--- a/cpp/src/ssl_options.cpp
+++ b/cpp/src/ssl_options.cpp
@@ -99,7 +99,7 @@ ssl_server_options::ssl_server_options(
         throw error(MSG("SSL server configuration failure requiring client certificates using " << db));
 }
 
-ssl_server_options::ssl_server_options() : impl_(new impl) {}
+ssl_server_options::ssl_server_options() : impl_(0) {}
 
 ssl_client_options::ssl_client_options(const ssl_client_options& x): impl_(x.impl_) {
     if (impl_) impl_->incref();


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