Tor 0.4.9.2-alpha-dev
|
Block of functions related to operations from OpenSSL. More...
#include "lib/crypt_ops/compat_openssl.h"
#include "lib/crypt_ops/crypto_openssl_mgt.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/aes.h"
#include "lib/string/util_string.h"
#include "lib/lock/compat_mutex.h"
#include "lib/log/log.h"
#include "lib/log/util_bug.h"
#include "lib/testsupport/testsupport.h"
#include "lib/thread/threads.h"
#include <openssl/err.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
#include <openssl/evp.h>
#include <openssl/engine.h>
#include <openssl/rand.h>
#include <openssl/bn.h>
#include <openssl/dh.h>
#include <openssl/conf.h>
#include <openssl/hmac.h>
#include <openssl/crypto.h>
#include <openssl/ssl.h>
#include <string.h>
Go to the source code of this file.
Functions | |
STATIC char * | parse_openssl_version_str (const char *raw_version) |
void | crypto_openssl_log_errors (int severity, const char *doing) |
const char * | crypto_openssl_get_version_str (void) |
const char * | crypto_openssl_get_header_version_str (void) |
static int | setup_openssl_threading (void) |
static void | crypto_openssl_free_all (void) |
void | crypto_openssl_early_init (void) |
static ENGINE * | try_load_engine (const char *path, const char *engine) |
static void | log_engine (const char *fn, ENGINE *e) |
static int | crypto_openssl_init_engines (const char *accelName, const char *accelDir) |
int | crypto_openssl_late_init (int useAccel, const char *accelName, const char *accelDir) |
void | crypto_openssl_thread_cleanup (void) |
void | crypto_openssl_global_cleanup (void) |
Variables | |
static char * | crypto_openssl_version_str = NULL |
static char * | crypto_openssl_header_version_str = NULL |
Block of functions related to operations from OpenSSL.
Definition in file crypto_openssl_mgt.c.
void crypto_openssl_early_init | ( | void | ) |
Perform early (pre-configuration) initialization tasks for OpenSSL.
Definition at line 145 of file crypto_openssl_mgt.c.
Referenced by crypto_early_init().
|
static |
free OpenSSL variables
Definition at line 137 of file crypto_openssl_mgt.c.
Referenced by crypto_openssl_global_cleanup().
const char * crypto_openssl_get_header_version_str | ( | void | ) |
Definition at line 111 of file crypto_openssl_mgt.c.
const char * crypto_openssl_get_version_str | ( | void | ) |
Definition at line 96 of file crypto_openssl_mgt.c.
void crypto_openssl_global_cleanup | ( | void | ) |
Clean up global resources held by openssl.
Definition at line 337 of file crypto_openssl_mgt.c.
|
static |
Initialize engines for openssl (if enabled). Load all the built-in engines, along with the one called accelName (which may be NULL). If accelName is prefixed with "!", then it is required: return -1 if it can't be loaded. Otherwise return 0.
If accelDir is not NULL, it is the path from which the engine should be loaded.
Definition at line 224 of file crypto_openssl_mgt.c.
int crypto_openssl_late_init | ( | int | useAccel, |
const char * | accelName, | ||
const char * | accelDir | ||
) |
Perform late (post-init) initialization tasks for OpenSSL
Definition at line 301 of file crypto_openssl_mgt.c.
void crypto_openssl_log_errors | ( | int | severity, |
const char * | doing | ||
) |
Log all pending crypto errors at level severity. Use doing to describe our current activities.
Definition at line 55 of file crypto_openssl_mgt.c.
Referenced by crypto_dh_generate_public(), and new_openssl_dh_from_params().
void crypto_openssl_thread_cleanup | ( | void | ) |
Free crypto resources held by this thread.
Definition at line 331 of file crypto_openssl_mgt.c.
Referenced by crypto_thread_cleanup().
|
static |
Log any OpenSSL engines we're using at NOTICE.
Definition at line 202 of file crypto_openssl_mgt.c.
STATIC char * parse_openssl_version_str | ( | const char * | raw_version | ) |
Declare STATIC functions
Definition at line 76 of file crypto_openssl_mgt.c.
|
static |
Helper: Construct mutexes, and set callbacks to help OpenSSL handle being multithreaded. Returns 0.
Definition at line 130 of file crypto_openssl_mgt.c.
Referenced by crypto_openssl_early_init().
|
static |
Try to load an engine in a shared library via fully qualified path.
Definition at line 183 of file crypto_openssl_mgt.c.
|
static |
Definition at line 107 of file crypto_openssl_mgt.c.
|
static |
Definition at line 93 of file crypto_openssl_mgt.c.