forked from cory/tildefriends
All of the changes that have been sitting on tildepi for ages. For posterity.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3530 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
14
src/Tls.cpp
14
src/Tls.cpp
@ -67,11 +67,23 @@ TlsSession* TlsContext_openssl::createSession() {
|
||||
return new TlsSession_openssl(this);
|
||||
}
|
||||
|
||||
#include <iostream>
|
||||
|
||||
TlsContext_openssl::TlsContext_openssl() {
|
||||
SSL_library_init();
|
||||
SSL_load_error_strings();
|
||||
|
||||
_context = SSL_CTX_new(SSLv23_method());
|
||||
const SSL_METHOD* method = SSLv23_method();
|
||||
if (!method)
|
||||
{
|
||||
std::cerr << "SSLv23_method returned NULL\n";
|
||||
}
|
||||
|
||||
_context = SSL_CTX_new(method);
|
||||
if (!_context)
|
||||
{
|
||||
std::cerr << "SSL_CTX_new returned NULL\n";
|
||||
}
|
||||
SSL_CTX_set_default_verify_paths(_context);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user