aboutsummaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_common.c
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-03-08 16:47:20 +1000
committerNick Mathewson <nickm@torproject.org>2019-03-12 11:09:53 -0400
commit680b2afd84a318e11f79526bfedff29870307ed0 (patch)
treeab96ab5c76c74d4354dd8e1d9068d7e981d11c6f /src/feature/hs/hs_common.c
parent257cea8876e00b18c6791f86ebe5c24bab3b72bf (diff)
downloadtor-680b2afd84a318e11f79526bfedff29870307ed0.tar.gz
tor-680b2afd84a318e11f79526bfedff29870307ed0.zip
hs: abolish hs_desc_link_specifier_dup()
The previous commits introduced link_specifier_dup(), which is implemented using trunnel's opaque interfaces. So we can now remove hs_desc_link_specifier_dup(). Cleanup after bug 22781.
Diffstat (limited to 'src/feature/hs/hs_common.c')
-rw-r--r--src/feature/hs/hs_common.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/feature/hs/hs_common.c b/src/feature/hs/hs_common.c
index a1dc0a6290..2cc23a4184 100644
--- a/src/feature/hs/hs_common.c
+++ b/src/feature/hs/hs_common.c
@@ -1009,24 +1009,6 @@ hs_build_address(const ed25519_public_key_t *key, uint8_t version,
tor_assert(hs_address_is_valid(addr_out));
}
-/* Return a newly allocated copy of lspec. */
-link_specifier_t *
-hs_link_specifier_dup(const link_specifier_t *lspec)
-{
- link_specifier_t *result = link_specifier_new();
- memcpy(result, lspec, sizeof(*result));
- /* The unrecognized field is a dynamic array so make sure to copy its
- * content and not the pointer. */
- link_specifier_setlen_un_unrecognized(
- result, link_specifier_getlen_un_unrecognized(lspec));
- if (link_specifier_getlen_un_unrecognized(result)) {
- memcpy(link_specifier_getarray_un_unrecognized(result),
- link_specifier_getconstarray_un_unrecognized(lspec),
- link_specifier_getlen_un_unrecognized(result));
- }
- return result;
-}
-
/* From a given ed25519 public key pk and an optional secret, compute a
* blinded public key and put it in blinded_pk_out. This is only useful to
* the client side because the client only has access to the identity public