| 101 | class CInit { |
| 102 | public: |
| 103 | CInit() { |
| 104 | // Init OpenSSL library multithreading support |
| 105 | ppmutexOpenSSL = |
| 106 | (CCriticalSection**)OPENSSL_malloc(CRYPTO_num_locks() * sizeof(CCriticalSection*)); |
| 107 | for (int i = 0; i < CRYPTO_num_locks(); i++) ppmutexOpenSSL[i] = new CCriticalSection(); |
| 108 | CRYPTO_set_locking_callback(locking_callback); |
| 109 | |
| 110 | #ifdef WIN32 |
| 111 | // Seed random number generator with screen scrape and other hardware sources |
| 112 | RAND_screen(); |
| 113 | #endif |
| 114 | |
| 115 | // Seed random number generator with performance counter |
| 116 | RandAddSeed(); |
| 117 | } |
| 118 | ~CInit() { |
| 119 | // Shutdown OpenSSL library multithreading support |
| 120 | CRYPTO_set_locking_callback(NULL); |
nothing calls this directly
no test coverage detected