Logo white

Peter M. Groen / FlashMQ

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • FlashMQ
  • sslctxmanager.cpp
  • Support generic listener in config file ...
    5d72070e
    This allows creation of multiple listeners, with different protocols
    and/or SSL certificates.
    
    Related change: settings is now a class that is copyable and assignable,
    and is done so to each thread on reload.
    
    Semi-related fix: fix crash in quit when multiple threads initiated it.
    This came to light when testing the auth plugin settings.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse Code ยป
sslctxmanager.cpp 331 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#include "sslctxmanager.h"

SslCtxManager::SslCtxManager() :
    ssl_ctx(SSL_CTX_new(TLS_server_method()))
{

}

SslCtxManager::~SslCtxManager()
{
    if (ssl_ctx)
        SSL_CTX_free(ssl_ctx);
}

SSL_CTX *SslCtxManager::get() const
{
    return ssl_ctx;
}

SslCtxManager::operator bool() const
{
    return ssl_ctx == nullptr;
}