diff options
-rw-r--r-- | src/core/or/connection_or.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/or/connection_or.c b/src/core/or/connection_or.c index e3e81ed9cb..a6f73d328a 100644 --- a/src/core/or/connection_or.c +++ b/src/core/or/connection_or.c @@ -182,8 +182,10 @@ connection_or_set_identity_digest(or_connection_t *conn, const int ed_changed = ed_id_was_set && (!ed_id || !ed25519_pubkey_eq(ed_id, &chan->ed25519_identity)); - tor_assert(!rsa_changed || !rsa_id_was_set); - tor_assert(!ed_changed || !ed_id_was_set); + if (BUG(rsa_changed && rsa_id_was_set)) + return; + if (BUG(ed_changed && ed_id_was_set)) + return; if (!rsa_changed && !ed_changed) return; |