00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __SOCKETS_SSLInitializer_H
00024 #define __SOCKETS_SSLInitializer_H
00025 #include "sockets-config.h"
00026 #ifdef HAVE_OPENSSL
00027
00028 #include <openssl/ssl.h>
00029 #include <string>
00030
00031
00032 #ifdef SOCKETS_NAMESPACE
00033 namespace SOCKETS_NAMESPACE {
00034 #endif
00035
00036
00037 class SSLInitializer
00038 {
00039 public:
00045 SSLInitializer();
00046
00050 ~SSLInitializer();
00051
00052 static void DeleteRandFile();
00053
00055 static void SSL_locking_function(int mode, int n, const char *file, int line);
00056
00058 static unsigned long SSL_id_function();
00059
00060 static BIO *bio_err;
00061
00062 private:
00063 static std::string m_rand_file;
00064 static long m_rand_size;
00065
00066 };
00067
00068
00069
00070
00071 #ifdef SOCKETS_NAMESPACE
00072 }
00073 #endif
00074 #endif // HAVE_OPENSSL
00075 #endif // __SOCKETS_SSLInitializer_H