diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-12-05 12:55:52 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-08 16:48:01 -0500 |
commit | 937aef48eeae4b81528de3e04b39047d0f826d9b (patch) | |
tree | f17242b74d5a121b7a5fda3fcb2b6404165bb3d1 /src/or/circuitbuild.c | |
parent | a7cae7f8f7075da1856c619d141b54c56bfc5f31 (diff) | |
download | tor-937aef48eeae4b81528de3e04b39047d0f826d9b.tar.gz tor-937aef48eeae4b81528de3e04b39047d0f826d9b.zip |
Add an ed25519_copy; use it in a couple of places dgoulet suggested.
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index bac68bba48..96bd472dba 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1045,8 +1045,7 @@ circuit_send_next_onion_skin(origin_circuit_t *circ) memcpy(ec.node_id, hop->extend_info->identity_digest, DIGEST_LEN); /* Set the ED25519 identity too -- it will only get included * in the extend2 cell if we're configured to use it, though. */ - memcpy(&ec.ed_pubkey, &hop->extend_info->ed_identity, - sizeof(ed25519_public_key_t)); + ed25519_pubkey_copy(&ec.ed_pubkey, &hop->extend_info->ed_identity); len = onion_skin_create(ec.create_cell.handshake_type, hop->extend_info, @@ -1183,7 +1182,7 @@ circuit_extend(cell_t *cell, circuit_t *circ) if (node && node_supports_ed25519_link_authentication(node) && (node_ed_id = node_get_ed25519_id(node))) { - memcpy(ec.ed_pubkey.pubkey, node_ed_id->pubkey, ED25519_PUBKEY_LEN); + ed25519_pubkey_copy(&ec.ed_pubkey, node_ed_id); } } |