tor  0.4.1.0-alpha-dev
Functions
crypto_init.h File Reference
#include "orconfig.h"
#include "lib/cc/compat_compiler.h"

Go to the source code of this file.

Functions

int crypto_init_siphash_key (void)
 
int crypto_early_init (void) ATTR_WUR
 
int crypto_global_init (int hardwareAccel, const char *accelName, const char *accelPath) ATTR_WUR
 
void crypto_thread_cleanup (void)
 
int crypto_global_cleanup (void)
 
void crypto_prefork (void)
 
void crypto_postfork (void)
 
const char * crypto_get_library_name (void)
 
const char * crypto_get_library_version_string (void)
 
const char * crypto_get_header_version_string (void)
 
int tor_is_using_nss (void)
 

Detailed Description

Headers for crypto_init.c.

Definition in file crypto_init.h.

Function Documentation

◆ crypto_early_init()

int crypto_early_init ( void  )

Initialize the crypto library. Return 0 on success, -1 on failure.

Definition at line 56 of file crypto_init.c.

References crypto_early_initialized_, and crypto_openssl_early_init().

Referenced by crypto_global_init().

◆ crypto_get_header_version_string()

const char* crypto_get_header_version_string ( void  )

Return the version of the crypto library we're using, as given in the headers.

Definition at line 195 of file crypto_init.c.

◆ crypto_get_library_name()

const char* crypto_get_library_name ( void  )

Return the name of the crypto library we're using.

Definition at line 169 of file crypto_init.c.

◆ crypto_get_library_version_string()

const char* crypto_get_library_version_string ( void  )

Return the version of the crypto library we are using, as given in the library.

Definition at line 182 of file crypto_init.c.

◆ crypto_global_cleanup()

int crypto_global_cleanup ( void  )

Uninitialize the crypto library. Return 0 on success. Does not detect failure.

Definition at line 126 of file crypto_init.c.

◆ crypto_global_init()

int crypto_global_init ( int  useAccel,
const char *  accelName,
const char *  accelDir 
)

Initialize the crypto library. Return 0 on success, -1 on failure.

Definition at line 85 of file crypto_init.c.

References crypto_early_init(), and crypto_global_initialized_.

◆ crypto_init_siphash_key()

int crypto_init_siphash_key ( void  )

Set up the siphash key if we haven't already done so.

Definition at line 41 of file crypto_init.c.

◆ crypto_postfork()

void crypto_postfork ( void  )

Run operations that the crypto library requires to be happy again after forking.

Definition at line 160 of file crypto_init.c.

◆ crypto_prefork()

void crypto_prefork ( void  )

Run operations that the crypto library requires to be happy again after forking.

Definition at line 150 of file crypto_init.c.

◆ crypto_thread_cleanup()

void crypto_thread_cleanup ( void  )

Free crypto resources held by this thread.

Definition at line 113 of file crypto_init.c.

References crypto_openssl_thread_cleanup(), and destroy_thread_fast_rng().

◆ tor_is_using_nss()

int tor_is_using_nss ( void  )

Return true iff Tor is using the NSS library.

Definition at line 207 of file crypto_init.c.