SSL_Context.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: SSL_Context.inl 77198 2007-02-19 18:34:48Z johnnyw $
00004 
00005 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 ACE_INLINE
00008 ACE_SSL_Data_File::ACE_SSL_Data_File (void)
00009   : type_ (-1)
00010 {
00011 }
00012 
00013 ACE_INLINE
00014 ACE_SSL_Data_File::ACE_SSL_Data_File (const char *file_name,
00015                                       int type)
00016   : file_name_ (file_name),
00017     type_ (type)
00018 {
00019 }
00020 
00021 ACE_INLINE const char *
00022 ACE_SSL_Data_File::file_name (void) const
00023 {
00024   return this->file_name_.c_str ();
00025 }
00026 
00027 ACE_INLINE int
00028 ACE_SSL_Data_File::type (void) const
00029 {
00030   return this->type_;
00031 }
00032 
00033 // ****************************************************************
00034 
00035 ACE_INLINE void
00036 ACE_SSL_Context::check_context (void)
00037 {
00038   if (this->context_ == 0)
00039     {
00040       this->set_mode ();
00041     }
00042 
00043   ::SSL_CTX_set_verify (this->context_, this->default_verify_mode (), 0);
00044 }
00045 
00046 ACE_INLINE SSL_CTX *
00047 ACE_SSL_Context::context (void)
00048 {
00049   this->check_context ();
00050   return this->context_;
00051 }
00052 
00053 ACE_INLINE int
00054 ACE_SSL_Context::private_key_type (void) const
00055 {
00056   return this->private_key_.type ();
00057 }
00058 
00059 ACE_INLINE const char*
00060 ACE_SSL_Context::private_key_file_name (void) const
00061 {
00062   return this->private_key_.file_name ();
00063 }
00064 
00065 ACE_INLINE int
00066 ACE_SSL_Context::certificate_type (void) const
00067 {
00068   return this->certificate_.type ();
00069 }
00070 
00071 ACE_INLINE const char*
00072 ACE_SSL_Context::certificate_file_name (void) const
00073 {
00074   return this->certificate_.file_name ();
00075 }
00076 
00077 ACE_INLINE int
00078 ACE_SSL_Context::dh_params_file_type (void) const
00079 {
00080   return this->dh_params_.type ();
00081 }
00082 
00083 ACE_INLINE const char*
00084 ACE_SSL_Context::dh_params_file_name (void) const
00085 {
00086   return this->dh_params_.file_name ();
00087 }
00088 
00089 ACE_INLINE void
00090 ACE_SSL_Context::default_verify_mode (int mode)
00091 {
00092   this->default_verify_mode_ = mode;
00093 }
00094 
00095 ACE_INLINE int
00096 ACE_SSL_Context::default_verify_mode (void) const
00097 {
00098   return this->default_verify_mode_;
00099 }
00100 
00101 ACE_INLINE int
00102 ACE_SSL_Context::get_mode (void) const
00103 {
00104   return this->mode_;
00105 }
00106 
00107 ACE_INLINE int
00108 ACE_SSL_Context::have_trusted_ca (void) const
00109 {
00110   return this->have_ca_;
00111 }
00112 
00113 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Sun Jan 27 13:03:21 2008 for ACE_SSL by doxygen 1.3.6