diff options
author | David Goulet <dgoulet@ev0ke.net> | 2016-05-09 18:58:19 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2016-07-01 14:01:41 -0400 |
commit | 056b6186adeb5ee92d0899f60b5e061bfc11a8ba (patch) | |
tree | b5af60e5a17611ab0242add80aa9f35694e8a529 /src/or/shared_random.h | |
parent | c0cec2ffd3d5f965413f56e93f89fabf81a2c3a0 (diff) | |
download | tor-056b6186adeb5ee92d0899f60b5e061bfc11a8ba.tar.gz tor-056b6186adeb5ee92d0899f60b5e061bfc11a8ba.zip |
prop250: Use RSA identity digest instead of fingerprint
The prop250 code used the RSA identity key fingerprint to index commit in a
digestmap instead of using the digest.
To behavior change except the fact that we are actually using digestmap
correctly.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/shared_random.h')
-rw-r--r-- | src/or/shared_random.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/or/shared_random.h b/src/or/shared_random.h index 15eed8a25c..573c499efc 100644 --- a/src/or/shared_random.h +++ b/src/or/shared_random.h @@ -71,8 +71,8 @@ typedef struct sr_commit_t { /* Commit owner info */ - /* The RSA identity fingerprint of the authority. */ - char rsa_identity_fpr[FINGERPRINT_LEN + 1]; + /* The RSA identity key of the authority. */ + char rsa_identity[DIGEST_LEN]; /* Commitment information */ @@ -112,11 +112,16 @@ void sr_commit_free(sr_commit_t *commit); void sr_srv_encode(char *dst, const sr_srv_t *srv); /* Private methods (only used by shared_random_state.c): */ +static inline +const char *sr_commit_get_rsa_fpr(const sr_commit_t *commit) +{ + return hex_str((const char *) commit->rsa_identity, + sizeof(commit->rsa_identity)); +} void sr_compute_srv(void); sr_commit_t *sr_generate_our_commit(time_t timestamp, const authority_cert_t *my_rsa_cert); - #ifdef SHARED_RANDOM_PRIVATE /* Encode */ |