From d544e81283a24082e6423c8f4377939f6fefa780 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 20 Dec 2013 15:26:03 +0000 Subject: -use the same hash function to map service name to hash, not once strlen and then strlen+1 --- src/vpn/gnunet-vpn.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/vpn/gnunet-vpn.c') diff --git a/src/vpn/gnunet-vpn.c b/src/vpn/gnunet-vpn.c index a68fdc45b..d2e5eec4e 100644 --- a/src/vpn/gnunet-vpn.c +++ b/src/vpn/gnunet-vpn.c @@ -26,6 +26,7 @@ #include "platform.h" #include "gnunet_util_lib.h" +#include "gnunet_tun_lib.h" #include "gnunet_vpn_service.h" @@ -227,16 +228,16 @@ run (void *cls, char *const *args, const char *cfgfile, protocol = IPPROTO_UDP; if (GNUNET_OK != GNUNET_CRYPTO_eddsa_public_key_from_string (peer_id, - strlen (peer_id), - &peer.public_key)) + strlen (peer_id), + &peer.public_key)) { - FPRINTF (stderr, _("`%s' is not a valid peer identifier.\n"), + FPRINTF (stderr, + _("`%s' is not a valid peer identifier.\n"), peer_id); goto error; } - GNUNET_CRYPTO_hash (service_name, - strlen (service_name), - &sd); + GNUNET_TUN_service_name_to_hash (service_name, + &sd); request = GNUNET_VPN_redirect_to_peer (handle, req_af, protocol, -- cgit v1.2.3