void TlsStream::Start(void)
{
- ObjectLock olock(this);
-
m_SSL = shared_ptr<SSL>(SSL_new(m_SSLContext.get()), SSL_free);
m_SSLContext.reset();
<< errinfo_openssl_error(ERR_get_error()));
}
- if (!GetClientCertificate())
+ if (!m_SSL)
BOOST_THROW_EXCEPTION(logic_error("No X509 client certificate was specified."));
if (!m_SSLIndexInitialized) {
{
ObjectLock olock(this);
- shared_ptr<SSL_CTX> sslContext = GetSSLContext();
+ shared_ptr<SSL_CTX> sslContext = m_SSLContext;
if (!sslContext)
BOOST_THROW_EXCEPTION(logic_error("SSL context is required for AddListener()"));
void EndpointManager::AddConnection(const String& node, const String& service) {
ObjectLock olock(this);
- shared_ptr<SSL_CTX> sslContext = GetSSLContext();
+ shared_ptr<SSL_CTX> sslContext = m_SSLContext;
if (!sslContext)
BOOST_THROW_EXCEPTION(logic_error("SSL context is required for AddConnection()"));
ObjectLock olock(this);
String peerAddress = client->GetPeerAddress();
- TlsStream::Ptr tlsStream = boost::make_shared<TlsStream>(client, role, GetSSLContext());
+ TlsStream::Ptr tlsStream = boost::make_shared<TlsStream>(client, role, m_SSLContext);
tlsStream->Start();
m_PendingClients.insert(tlsStream);