2 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
10 Context::operator bool () const
12 return this->ssl_ctx_ != 0;
16 bool Context::operator ! () const
18 return this->ssl_ctx_ == 0;
22 ACE_SSL_Context& Context::ssl_context ()
24 return *this->ssl_ctx_;
28 const ACE_SSL_Context& Context::ssl_context () const
30 return *this->ssl_ctx_;
34 bool Context::use_default_ca ()
36 if (::SSL_CTX_set_default_verify_paths(this->ssl_ctx_->context ()) != 1)
38 ACE_SSL_Context::report_error ();
45 bool Context::set_key_files (const char* certificate_filename,
46 const char* private_key_filename,
49 if (this->ssl_ctx_->certificate (certificate_filename, file_type) == 0)
51 if (this->ssl_ctx_->private_key (private_key_filename, file_type) == 0)
60 int Context::has_trusted_ca ()
62 return this->ssl_ctx_->have_trusted_ca ();
66 void Context::set_default_ssl_mode (int ssl_mode)
68 Context::ssl_mode_ = ssl_mode;
72 void Context::set_default_verify_mode (bool verify_peer)
74 Context::ssl_verify_peer_ = verify_peer;
78 void Context::set_default_verify_settings (bool strict,
82 Context::ssl_strict_ = strict;
83 Context::ssl_once_ = once;
84 Context::ssl_depth_ = depth;
91 ACE_END_VERSIONED_NAMESPACE_DECL