r14047@Kushana: nickm | 2007-08-15 13:57:39 -0400

fix a really nasty bug in v3 authorities: only set v3_digest in trusted_dir_server_t for v3 authorities.


svn:r11124
This commit is contained in:
Nick Mathewson 2007-08-15 17:57:47 +00:00
parent e10041447c
commit 717f3b8a12

View file

@ -3799,7 +3799,7 @@ add_trusted_dir_server(const char *nickname, const char *address,
ent->is_running = 1; ent->is_running = 1;
ent->type = type; ent->type = type;
memcpy(ent->digest, digest, DIGEST_LEN); memcpy(ent->digest, digest, DIGEST_LEN);
if (v3_auth_digest) if (v3_auth_digest && (type & V3_AUTHORITY))
memcpy(ent->v3_identity_digest, v3_auth_digest, DIGEST_LEN); memcpy(ent->v3_identity_digest, v3_auth_digest, DIGEST_LEN);
dlen = 64 + strlen(hostname) + (nickname?strlen(nickname):0); dlen = 64 + strlen(hostname) + (nickname?strlen(nickname):0);