diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-09-24 11:25:48 -0700 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-08 16:47:58 -0500 |
commit | 6788418f28930467121537f31c4b43f981ae6ca8 (patch) | |
tree | a04045202309f715bdd0381ac5201fc9717edd20 /src/or/channel.c | |
parent | af3af494083f041c3ce9f722e4989ecd4b4e6304 (diff) | |
download | tor-6788418f28930467121537f31c4b43f981ae6ca8.tar.gz tor-6788418f28930467121537f31c4b43f981ae6ca8.zip |
Propagate Ed25519 identities downwards into more functions.
Actually set ed25519 identities on channels when we set a channel's
identity.
Diffstat (limited to 'src/or/channel.c')
-rw-r--r-- | src/or/channel.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/channel.c b/src/or/channel.c index 4712891857..e9bda24a63 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -1471,7 +1471,8 @@ channel_clear_identity_digest(channel_t *chan) void channel_set_identity_digest(channel_t *chan, - const char *identity_digest) + const char *identity_digest, + const ed25519_public_key_t *ed_identity) { int was_in_digest_map, should_be_in_digest_map, state_not_in_map; @@ -1510,6 +1511,9 @@ channel_set_identity_digest(channel_t *chan, memset(chan->identity_digest, 0, sizeof(chan->identity_digest)); } + if (ed_identity) { + memcpy(&chan->ed25519_identity, ed_identity, sizeof(*ed_identity)); + } /* Put it in the digest map if we should */ if (should_be_in_digest_map) |