mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Merge remote-tracking branch 'origin/maint-0.2.2'
This commit is contained in:
commit
08efa70c41
6
changes/warn-if-get_digest-fails
Normal file
6
changes/warn-if-get_digest-fails
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- If we fail to compute the identity digest of a v3 legacy
|
||||||
|
keypair, warn, and don't use a buffer-full of junk instead.
|
||||||
|
Bugfix on 0.2.1.1-alpha; fixes bug 3106.
|
||||||
|
|
||||||
|
|
@ -2732,7 +2732,10 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_env_t *private_key,
|
|||||||
if (options->V3AuthUseLegacyKey) {
|
if (options->V3AuthUseLegacyKey) {
|
||||||
authority_cert_t *c = get_my_v3_legacy_cert();
|
authority_cert_t *c = get_my_v3_legacy_cert();
|
||||||
if (c) {
|
if (c) {
|
||||||
crypto_pk_get_digest(c->identity_key, voter->legacy_id_digest);
|
if (crypto_pk_get_digest(c->identity_key, voter->legacy_id_digest)) {
|
||||||
|
log_warn(LD_BUG, "Unable to compute digest of legacy v3 identity key");
|
||||||
|
memset(voter->legacy_id_digest, 0, DIGEST_LEN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3122,10 +3122,14 @@ dirvote_compute_consensuses(void)
|
|||||||
authority_cert_t *cert = get_my_v3_legacy_cert();
|
authority_cert_t *cert = get_my_v3_legacy_cert();
|
||||||
legacy_sign = get_my_v3_legacy_signing_key();
|
legacy_sign = get_my_v3_legacy_signing_key();
|
||||||
if (cert) {
|
if (cert) {
|
||||||
crypto_pk_get_digest(cert->identity_key, legacy_dbuf);
|
if (crypto_pk_get_digest(cert->identity_key, legacy_dbuf)) {
|
||||||
|
log_warn(LD_BUG,
|
||||||
|
"Unable to compute digest of legacy v3 identity key");
|
||||||
|
} else {
|
||||||
legacy_id_digest = legacy_dbuf;
|
legacy_id_digest = legacy_dbuf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (flav = 0; flav < N_CONSENSUS_FLAVORS; ++flav) {
|
for (flav = 0; flav < N_CONSENSUS_FLAVORS; ++flav) {
|
||||||
const char *flavor_name = networkstatus_get_flavor_name(flav);
|
const char *flavor_name = networkstatus_get_flavor_name(flav);
|
||||||
|
Loading…
Reference in New Issue
Block a user