GitHub user tsunday opened a pull request: https://github.com/apache/activemq-cpp/pull/1
Private to protected transition of getOpenSSLCtx method # Overview of the change This small change allows to override default behaviour of OpenSSLContextSpi in derived classes. Base OpenSSLContexSpi was partially designed to allow overriding - see virtual methods like providerInit() or providerGetSocketFactory(). As for now ActiveMQ-Cpp doesn't support changing any of the cipher suites or protocol version used within OpenSSL secure connection. This fix allows users of the library to override default OpenSSLContextSpi with their own class. The main reason of changing the access level of getOpenSSLCtx method was the need of executing some of the openssl library functions on SSL_CTX object from derived class in overrided providerInit() method. Leaving this getter private prevents from changing any of the SSL_CTX parameters and makes derived classes useless. # Example usage ```c++ #include <openssl/ssl.h> class MyOpenSSLContextSpi : public decaf::internal::net::ssl::openssl::OpenSSLContextSpi { public: MyOpenSSLContextSpi(); virtual void providerInit(decaf::security::SecureRandom* random); }; void MyOpenSSLContextSpi::providerInit(decaf::security::SecureRandom* random) { OpenSSLContextSpi::providerInit(random); SSL_CTX* ctx = static_cast<SSL_CTX*>(getOpenSSLCtx()); // private to protected conversion required SSL_CTX_set_cipher_list(ctx, "RC4-SHA"); } ``` You can merge this pull request into a Git repository by running: $ git pull https://github.com/tsunday/activemq-cpp tomasz.niedzi...@motorolasolutions.com Alternatively you can review and apply these changes as the patch at: https://github.com/apache/activemq-cpp/pull/1.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1 ---- commit fd1d3cf60e55950372306e9afca1cb9851965c33 Author: Tomasz Niedziela-Brach <tomasz.niedzi...@motorolasolutions.com> Date: 2016-07-13T06:04:38Z making methods protected to allow overriding default behaviour of OpenSSLContext within derived classes commit 0d876b23303de530b8ed37b63401063355fb75cb Author: Tomasz Niedziela-Brach <tomasz.niedzi...@motorolasolutions.com> Date: 2016-07-13T06:18:43Z Merge branch '3.9.x' of https://github.com/apache/activemq-cpp into tomasz.niedzi...@motorolasolutions.com commit 4af9d03a98ed648ebf64fcc20d0d9f445c45e495 Author: Tomasz Niedziela-Brach <tomasz.niedzi...@motorolasolutions.com> Date: 2016-07-13T06:24:31Z making only getOpenSSLCtx() protected ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---