diff --git a/TcpSocket.cpp b/TcpSocket.cpp
index d304637..e0a14d1 100644
a
|
b
|
void TcpSocket::InitSSLServer() |
1234 | 1234 | } |
1235 | 1235 | |
1236 | 1236 | |
1237 | | void TcpSocket::InitializeContext(const std::string& context, SSL_METHOD *meth_in) |
| 1237 | void TcpSocket::InitializeContext(const std::string& context, const SSL_METHOD *meth_in) |
1238 | 1238 | { |
1239 | 1239 | static Mutex mutex; |
1240 | 1240 | Lock lock(mutex); |
1241 | 1241 | /* Create our context*/ |
1242 | 1242 | if (m_client_contexts.find(context) == m_client_contexts.end()) |
1243 | 1243 | { |
1244 | | SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method(); |
| 1244 | const SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method(); |
1245 | 1245 | m_ssl_ctx = m_client_contexts[context] = SSL_CTX_new(meth); |
1246 | 1246 | SSL_CTX_set_mode(m_ssl_ctx, SSL_MODE_AUTO_RETRY); |
1247 | 1247 | } |
… |
… |
void TcpSocket::InitializeContext(const std::string& context,const std::string& |
1258 | 1258 | /* Create our context*/ |
1259 | 1259 | if (m_server_contexts.find(context) == m_server_contexts.end()) |
1260 | 1260 | { |
1261 | | SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method(); |
| 1261 | const SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method(); |
1262 | 1262 | m_ssl_ctx = m_server_contexts[context] = SSL_CTX_new(meth); |
1263 | 1263 | SSL_CTX_set_mode(m_ssl_ctx, SSL_MODE_AUTO_RETRY); |
1264 | 1264 | // session id |
… |
… |
void TcpSocket::InitializeContext(const std::string& context,const std::string& |
1294 | 1294 | /* Create our context*/ |
1295 | 1295 | if (m_server_contexts.find(context) == m_server_contexts.end()) |
1296 | 1296 | { |
1297 | | SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method(); |
| 1297 | const SSL_METHOD *meth = meth_in ? meth_in : SSLv3_method(); |
1298 | 1298 | m_ssl_ctx = m_server_contexts[context] = SSL_CTX_new(meth); |
1299 | 1299 | SSL_CTX_set_mode(m_ssl_ctx, SSL_MODE_AUTO_RETRY); |
1300 | 1300 | // session id |
diff --git a/TcpSocket.h b/TcpSocket.h
index 89d803a..28933e2 100644
a
|
b
|
protected: |
271 | 271 | #ifdef HAVE_OPENSSL |
272 | 272 | /** SSL; Initialize ssl context for a client socket. |
273 | 273 | \param meth_in SSL method */ |
274 | | void InitializeContext(const std::string& context, SSL_METHOD *meth_in = NULL); |
| 274 | void InitializeContext(const std::string& context, const SSL_METHOD *meth_in = NULL); |
275 | 275 | /** SSL; Initialize ssl context for a server socket. |
276 | 276 | \param keyfile Combined private key/certificate file |
277 | 277 | \param password Password for private key |