net/clientnb.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) New commits: commit 6ac450cb2322cfb4550553e4ccb1fb5a7d0f2bbb Author: Michael Meeks <michael.me...@collabora.com> Date: Sat Feb 18 02:09:43 2017 +0000
SSL - accept self-signed certificates for tests. diff --git a/net/clientnb.cpp b/net/clientnb.cpp index 275938d..40ddc2f 100644 --- a/net/clientnb.cpp +++ b/net/clientnb.cpp @@ -212,6 +212,17 @@ public: EnableHttps = (args.size() > 0 && args[0] == "ssl"); std::cerr << "Starting " << (EnableHttps ? "HTTPS" : "HTTP") << " client." << std::endl; + if (EnableHttps) + { + Poco::Net::initializeSSL(); + // Just accept the certificate anyway for testing purposes + Poco::SharedPtr<Poco::Net::InvalidCertificateHandler> invalidCertHandler = new Poco::Net::AcceptCertificateHandler(false); + + Poco::Net::Context::Params sslParams; + Poco::Net::Context::Ptr sslContext = new Poco::Net::Context(Poco::Net::Context::CLIENT_USE, sslParams); + Poco::Net::SSLManager::instance().initializeClient(nullptr, invalidCertHandler, sslContext); + } + testWebsocket(); testPing(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits