From 31440b1a8aa57897792a7a733192c1a97ac0a695 Mon Sep 17 00:00:00 2001 From: XinyuHou Date: Tue, 10 Feb 2015 12:22:30 +0000 Subject: [PATCH] added const cast #4168 --- src/lib/plugin/ns/SecureSocket.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/plugin/ns/SecureSocket.cpp b/src/lib/plugin/ns/SecureSocket.cpp index eae83ba7..4abd4c03 100644 --- a/src/lib/plugin/ns/SecureSocket.cpp +++ b/src/lib/plugin/ns/SecureSocket.cpp @@ -173,7 +173,7 @@ SecureSocket::initContext(bool server) { SSL_library_init(); - SSL_METHOD* method; + const SSL_METHOD* method; // load & register all cryptos, etc. OpenSSL_add_all_algorithms(); @@ -191,7 +191,8 @@ SecureSocket::initContext(bool server) } // create new context from method - m_ssl->m_context = SSL_CTX_new(method); + SSL_METHOD* m = const_cast(method); + m_ssl->m_context = SSL_CTX_new(m); if (m_ssl->m_context == NULL) { showError(); }