summaryrefslogtreecommitdiff
path: root/src/or/dirauth/shared_random.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-04-24 11:34:31 -0400
committerDavid Goulet <dgoulet@torproject.org>2018-04-27 11:40:44 -0400
commitbdcf3a383932cc48a360c9a75b93b44a6968171e (patch)
treea8a690f1337d5529f7b2a4df0b294d889cae17c3 /src/or/dirauth/shared_random.h
parent2115a54b4ab91d6d573691fc7368fcb8a2db32af (diff)
downloadtor-bdcf3a383932cc48a360c9a75b93b44a6968171e.tar.gz
tor-bdcf3a383932cc48a360c9a75b93b44a6968171e.zip
sr: Extract shared SR functions
Move most of the shared random functions that are needed outside of the dirauth module. At this commit, because dirvote.c hasn't been refactor, it doesn't compile because some SR functions need a dirvote function. Furthermore, 5 functions haven't been touched yet because they are dirauth only but are in used in other C files than the dirauth module ones. No code behavior change. Only moving code around. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/dirauth/shared_random.h')
-rw-r--r--src/or/dirauth/shared_random.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/or/dirauth/shared_random.h b/src/or/dirauth/shared_random.h
index 675a8d8b06..d1b2ac2e25 100644
--- a/src/or/dirauth/shared_random.h
+++ b/src/or/dirauth/shared_random.h
@@ -109,13 +109,11 @@ void sr_act_post_consensus(const networkstatus_t *consensus);
void sr_handle_received_commits(smartlist_t *commits,
crypto_pk_t *voter_key);
sr_commit_t *sr_parse_commit(const smartlist_t *args);
-sr_srv_t *sr_parse_srv(const smartlist_t *args);
char *sr_get_string_for_vote(void);
char *sr_get_string_for_consensus(const smartlist_t *votes,
int32_t num_srv_agreements);
void sr_commit_free_(sr_commit_t *commit);
#define sr_commit_free(sr) FREE_AND_NULL(sr_commit_t, sr_commit_free_, (sr))
-void sr_srv_encode(char *dst, size_t dst_len, const sr_srv_t *srv);
/* Private methods (only used by shared_random_state.c): */
static inline
@@ -128,12 +126,6 @@ void sr_compute_srv(void);
sr_commit_t *sr_generate_our_commit(time_t timestamp,
const authority_cert_t *my_rsa_cert);
-char *sr_get_current_for_control(void);
-char *sr_get_previous_for_control(void);
-
-const sr_srv_t *sr_get_current(const networkstatus_t *ns);
-const sr_srv_t *sr_get_previous(const networkstatus_t *ns);
-
#ifdef SHARED_RANDOM_PRIVATE
/* Encode */