aboutsummaryrefslogtreecommitdiff
path: root/src/or/channel.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-11-10 16:03:41 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-08 16:47:59 -0500
commit68acf8f12e61891f19160a58b45bad98de208df1 (patch)
tree456176ad230b45380f6e7cc003b00de6947278c4 /src/or/channel.c
parente0ab293837c76ee95b8b94f461aefe0f1ac6eff0 (diff)
downloadtor-68acf8f12e61891f19160a58b45bad98de208df1.tar.gz
tor-68acf8f12e61891f19160a58b45bad98de208df1.zip
Tell channel_set_identity_digest() that ed keys can be NULL
Diffstat (limited to 'src/or/channel.c')
-rw-r--r--src/or/channel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/channel.c b/src/or/channel.c
index e9bda24a63..0a96f230e9 100644
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@ -1468,7 +1468,6 @@ channel_clear_identity_digest(channel_t *chan)
* This function sets the identity digest of the remote endpoint for a
* channel; this is intended for use by the lower layer.
*/
-
void
channel_set_identity_digest(channel_t *chan,
const char *identity_digest,
@@ -1513,6 +1512,8 @@ channel_set_identity_digest(channel_t *chan,
}
if (ed_identity) {
memcpy(&chan->ed25519_identity, ed_identity, sizeof(*ed_identity));
+ } else {
+ memset(&chan->ed25519_identity, 0, sizeof(*ed_identity));
}
/* Put it in the digest map if we should */