Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

sslutils.cpp File Reference

#include "headers.h"

Go to the source code of this file.

Functions

void pthreads_locking_callback (int mode, int type, char *file, int line)
unsigned long pthreads_thread_id (void)
void ssl_thread_init (void)
 Initialize an environment for OpenSSL threads. More...

void ssl_thread_cleanup (void)
 Cleanup resources allocated in ssl_thread_init. More...

void ssl_init (void)
void ssl_cleanup (void)
 Cleanup resources allocated in ssl_init. More...


Variables

pthread_mutex_t * lock_cs


Function Documentation

void pthreads_locking_callback int mode,
int type,
char * file,
int line
[static]
 

Todo:
Document this function.
Parameters:
mode  
type  
file  
line  

Definition at line 60 of file sslutils.cpp.

unsigned long pthreads_thread_id void [static]
 

Todo:
Document this function.
Returns:

Definition at line 76 of file sslutils.cpp.

void ssl_cleanup void
 

Cleanup resources allocated in ssl_init.

Definition at line 119 of file sslutils.cpp.

void ssl_init void
 

Initialize an environment for OpenSSL. You *must* call this before using SSL.

Some of the functions that ssl_init() performs:

1. RAND_seed() sets random seed used by openssl. The size of random seed must* be greater than 20 bytes. If it is not set, OpenSSL uses /dev/random. Since Windows doesnt have this device, OpenSSL will fail to create a random seed. So, initializing random seed is recommended.

2. SSL_load_error_strings() and SSLeay_add_all_algorithms() - They *must* be called before using openssl.

Todo:
Fix random seed???

Definition at line 103 of file sslutils.cpp.

Referenced by IMPLEMENT_APP().

void ssl_thread_cleanup void
 

Cleanup resources allocated in ssl_thread_init.

Definition at line 40 of file sslutils.cpp.

void ssl_thread_init void
 

Initialize an environment for OpenSSL threads.

You *must* call this at the begining if you use threads. ssl_thread_init() sets locking function and id function for multi-threading. Theses functions are described in the threads(3) manpage.

Definition at line 19 of file sslutils.cpp.

Referenced by IMPLEMENT_APP().


Variable Documentation

pthread_mutex_t* lock_cs [static]
 

Definition at line 9 of file sslutils.cpp.


Generated at Thu Jul 11 13:31:54 2002 for Peekabooty by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001