Tor 0.4.9.0-alpha-dev
Functions
crypto_init.h File Reference

Headers for crypto_init.c. More...

#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 59 of file crypto_init.c.

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 204 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 178 of file crypto_init.c.

Referenced by options_init_from_torrc().

◆ 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 191 of file crypto_init.c.

Referenced by options_init_from_torrc().

◆ crypto_global_cleanup()

int crypto_global_cleanup ( void  )

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

Definition at line 129 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 88 of file crypto_init.c.

Referenced by crypto_set_options().

◆ 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 44 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 169 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 153 of file crypto_init.c.

◆ crypto_thread_cleanup()

void crypto_thread_cleanup ( void  )

Free crypto resources held by this thread.

Definition at line 116 of file crypto_init.c.

◆ tor_is_using_nss()

int tor_is_using_nss ( void  )

Return true iff Tor is using the NSS library.

Definition at line 216 of file crypto_init.c.