diff options
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/keypin.c | 2 | ||||
-rw-r--r-- | src/or/policies.c | 10 | ||||
-rw-r--r-- | src/or/shared_random.c | 2 | ||||
-rw-r--r-- | src/or/shared_random.h | 7 | ||||
-rw-r--r-- | src/or/transports.c | 2 |
5 files changed, 14 insertions, 9 deletions
diff --git a/src/or/keypin.c b/src/or/keypin.c index 749bc6121c..335c793cd9 100644 --- a/src/or/keypin.c +++ b/src/or/keypin.c @@ -479,7 +479,7 @@ keypin_clear(void) HT_CLEAR(rsamap,&the_rsa_map); if (bad_entries) { - log_warn(LD_BUG, "Found %d discrepencies in the the keypin database.", + log_warn(LD_BUG, "Found %d discrepencies in the keypin database.", bad_entries); } } diff --git a/src/or/policies.c b/src/or/policies.c index 2703d7edef..7ddebd6096 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -2345,11 +2345,13 @@ policy_summary_reject(smartlist_t *summary, } /** Add a single exit policy item to our summary: - * If it is an accept ignore it unless it is for all IP addresses - * ("*"), i.e. it's prefixlen/maskbits is 0, else call + * + * If it is an accept, ignore it unless it is for all IP addresses + * ("*", i.e. its prefixlen/maskbits is 0). Otherwise call * policy_summary_accept(). - * If it's a reject ignore it if it is about one of the private - * networks, else call policy_summary_reject(). + * + * If it is a reject, ignore it if it is about one of the private + * networks. Otherwise call policy_summary_reject(). */ static void policy_summary_add_item(smartlist_t *summary, addr_policy_t *p) diff --git a/src/or/shared_random.c b/src/or/shared_random.c index e9e6cbcfde..612e1c6bde 100644 --- a/src/or/shared_random.c +++ b/src/or/shared_random.c @@ -140,6 +140,8 @@ commit_new(const char *rsa_identity) commit = tor_malloc_zero(sizeof(*commit)); commit->alg = SR_DIGEST_ALG; memcpy(commit->rsa_identity, rsa_identity, sizeof(commit->rsa_identity)); + base16_encode(commit->rsa_identity_hex, sizeof(commit->rsa_identity_hex), + commit->rsa_identity, sizeof(commit->rsa_identity)); return commit; } diff --git a/src/or/shared_random.h b/src/or/shared_random.h index 0a2ec63a44..9885934cc7 100644 --- a/src/or/shared_random.h +++ b/src/or/shared_random.h @@ -76,8 +76,10 @@ typedef struct sr_commit_t { /* Commit owner info */ - /* The RSA identity key of the authority. */ + /* The RSA identity key of the authority and its base16 representation, + * which includes the NUL terminated byte. */ char rsa_identity[DIGEST_LEN]; + char rsa_identity_hex[HEX_DIGEST_LEN + 1]; /* Commitment information */ @@ -121,8 +123,7 @@ void sr_srv_encode(char *dst, size_t dst_len, const sr_srv_t *srv); 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)); + return commit->rsa_identity_hex; } void sr_compute_srv(void); diff --git a/src/or/transports.c b/src/or/transports.c index 92539b1693..c99ff1729b 100644 --- a/src/or/transports.c +++ b/src/or/transports.c @@ -1270,7 +1270,7 @@ get_transport_options_for_server_proxy(const managed_proxy_t *mp) /** Return the string that tor should place in TOR_PT_SERVER_BINDADDR * while configuring the server managed proxy in <b>mp</b>. The - * string is stored in the heap, and it's the the responsibility of + * string is stored in the heap, and it's the responsibility of * the caller to deallocate it after its use. */ static char * get_bindaddr_for_server_proxy(const managed_proxy_t *mp) |