tor
master
|
Header file for hs_cache.c. More...
#include <stdint.h>
#include "crypto_ed25519.h"
#include "hs_common.h"
#include "hs_descriptor.h"
#include "rendcommon.h"
#include "torcert.h"
Go to the source code of this file.
Data Structures | |
struct | hs_cache_intro_state_t |
struct | hs_cache_client_intro_state_t |
struct | hs_cache_dir_descriptor_t |
Macros | |
#define | HS_CACHE_CLIENT_INTRO_STATE_MAX_AGE (2 * 60) |
Typedefs | |
typedef struct hs_cache_intro_state_t | hs_cache_intro_state_t |
typedef struct hs_cache_client_intro_state_t | hs_cache_client_intro_state_t |
typedef struct hs_cache_dir_descriptor_t | hs_cache_dir_descriptor_t |
Functions | |
void | hs_cache_init (void) |
void | hs_cache_free_all (void) |
void | hs_cache_clean_as_dir (time_t now) |
size_t | hs_cache_handle_oom (time_t now, size_t min_remove_bytes) |
unsigned int | hs_cache_get_max_descriptor_size (void) |
int | hs_cache_store_as_dir (const char *desc) |
int | hs_cache_lookup_as_dir (uint32_t version, const char *query, const char **desc_out) |
const hs_descriptor_t * | hs_cache_lookup_as_client (const ed25519_public_key_t *key) |
const char * | hs_cache_lookup_encoded_as_client (const ed25519_public_key_t *key) |
int | hs_cache_store_as_client (const char *desc_str, const ed25519_public_key_t *identity_pk) |
void | hs_cache_clean_as_client (time_t now) |
void | hs_cache_purge_as_client (void) |
void | hs_cache_client_intro_state_note (const ed25519_public_key_t *service_pk, const ed25519_public_key_t *auth_key, rend_intro_point_failure_t failure) |
const hs_cache_intro_state_t * | hs_cache_client_intro_state_find (const ed25519_public_key_t *service_pk, const ed25519_public_key_t *auth_key) |
void | hs_cache_client_intro_state_clean (time_t now) |
void | hs_cache_client_intro_state_purge (void) |
Header file for hs_cache.c.
const hs_descriptor_t* hs_cache_lookup_as_client | ( | const ed25519_public_key_t * | key | ) |
Public API: Given the HS ed25519 identity public key in key, return its HS descriptor if it's stored in our cache, or NULL if not.
const char* hs_cache_lookup_encoded_as_client | ( | const ed25519_public_key_t * | key | ) |
Public API: Given the HS ed25519 identity public key in key, return its HS encoded descriptor if it's stored in our cache, or NULL if not.
int hs_cache_store_as_client | ( | const char * | desc_str, |
const ed25519_public_key_t * | identity_pk | ||
) |
Public API: Given an encoded descriptor, store it in the client HS cache. Return -1 on error, 0 on success .