SSL_Context.cpp File Reference

#include "SSL_Context.h"
#include "sslconf.h"
#include "ace/Guard_T.h"
#include "ace/Object_Manager.h"
#include "ace/Log_Msg.h"
#include "ace/Singleton.h"
#include "ace/Synch_Traits.h"
#include "ace/ACE.h"
#include "ace/OS_NS_errno.h"
#include "ace/OS_NS_string.h"
#include "ace/Thread_Mutex.h"
#include "ace/OS_NS_Thread.h"
#include <openssl/x509.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/safestack.h>

Include dependency graph for SSL_Context.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define ACE_SSL_LOCKING_CALLBACK_NAME   ACE_SSL_locking_callback
#define ACE_SSL_THREAD_ID_NAME   ACE_SSL_thread_id

Functions

 ACE_RCSID (ACE_SSL, SSL_Context,"SSL_Context.cpp, v 1.61 2006/06/22 15:10:08 shuston Exp") namespace
void ACE_SSL_LOCKING_CALLBACK_NAME (int mode, int type, const char *, int)


Define Documentation

#define ACE_SSL_LOCKING_CALLBACK_NAME   ACE_SSL_locking_callback
 

Definition at line 57 of file SSL_Context.cpp.

Referenced by ACE_SSL_Context::ssl_library_init().

#define ACE_SSL_THREAD_ID_NAME   ACE_SSL_thread_id
 

Definition at line 58 of file SSL_Context.cpp.

Referenced by ACE_SSL_Context::ssl_library_init().


Function Documentation

ACE_RCSID ACE_SSL  ,
SSL_Context  ,
"SSL_Context.  cpp,
v 1.61 2006/06/22 15:10:08 shuston Exp" 
 

Definition at line 28 of file SSL_Context.cpp.

00030                                                 :10:08 shuston Exp")
00031 
00032 
00033 namespace
00034 {
00035   /// Reference count of the number of times the ACE_SSL_Context was
00036   /// initialized.
00037   int ssl_library_init_count = 0;
00038 
00039   // @@ This should also be done with a singleton, otherwise it is not
00040   //    thread safe and/or portable to some weird platforms...
00041 
00042 #ifdef ACE_HAS_THREADS
00043   /// Array of mutexes used internally by OpenSSL when the SSL
00044   /// application is multithreaded.
00045   ACE_SSL_Context::lock_type * ssl_locks = 0;
00046 
00047   // @@ This should also be managed by a singleton.
00048 #endif
00049 }

void ACE_SSL_LOCKING_CALLBACK_NAME int  mode,
int  type,
const char *  ,
int 
 

Definition at line 66 of file SSL_Context.cpp.

00070   {
00071     // #ifdef undef
00072     //   fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n",
00073     //           CRYPTO_thread_id(),
00074     //           (mode&CRYPTO_LOCK)?"l":"u",
00075     //           (type&CRYPTO_READ)?"r":"w",file,line);
00076     // #endif
00077     //   /*
00078     //     if (CRYPTO_LOCK_SSL_CERT == type)
00079     //     fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n",
00080     //     CRYPTO_thread_id(),
00081     //     mode,file,line);
00082     //   */
00083     if (mode & CRYPTO_LOCK)
00084       (void) ssl_locks[type].acquire ();
00085     else
00086       (void) ssl_locks[type].release ();
00087   }


Generated on Thu Nov 9 11:42:00 2006 for ACE_SSL by doxygen 1.3.6