TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Battlenet::SslContext Class Reference

#include <SslContext.h>

Static Public Member Functions

static bool Initialize ()
 
static boost::asio::ssl::context & instance ()
 

Member Function Documentation

bool Battlenet::SslContext::Initialize ( )
static
22 {
23  boost::system::error_code err;
24 
25 #define LOAD_CHECK(fn) do { fn; \
26  if (err) \
27  { \
28  TC_LOG_ERROR("server.ssl", #fn " failed: %s", err.message().c_str()); \
29  return false; \
30  } } while (0)
31 
32  LOAD_CHECK(instance().set_options(boost::asio::ssl::context::no_sslv3, err));
33  LOAD_CHECK(instance().use_certificate_chain_file("bnetserver.cert.pem", err));
34  LOAD_CHECK(instance().use_private_key_file("bnetserver.key.pem", boost::asio::ssl::context::pem, err));
35 
36 #undef LOAD_CHECK
37 
38  return true;
39 }
#define LOAD_CHECK(fn)
static boost::asio::ssl::context & instance()
Definition: SslContext.cpp:41

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

boost::asio::ssl::context & Battlenet::SslContext::instance ( )
static
42 {
43  static boost::asio::ssl::context context(boost::asio::ssl::context::sslv23);
44  return context;
45 }

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: