From 1159f54fe431dc9efa0e2d09b4e453b3cd088909 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 16 Oct 2015 22:52:16 +0200 Subject: [PATCH] Remove meaningless debug message --- auth.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/auth.c b/auth.c index 57515c8..747e99b 100644 --- a/auth.c +++ b/auth.c @@ -72,26 +72,25 @@ static int derive_key(struct vtun_host *host) return -1; } - sodium_hex2bin(host->key, HOST_KEYBYTES,host->passwd, + sodium_hex2bin(host->key, HOST_KEYBYTES, host->passwd, strlen(host->passwd), "", &bin_len, NULL); if (bin_len == HOST_KEYBYTES) { vtun_syslog(LOG_ERR,"supplied password is long enough to be the secret"); return 0; } - vtun_syslog(LOG_ERR,"supplied password is %i bits, adjusting it to 32 bits", bin_len); memset(salt, 0xd1, sizeof salt); if (crypto_pwhash_scryptsalsa208sha256 (host->key, HOST_KEYBYTES, host->passwd, strlen(host->passwd), salt, crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE, crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE) == 0) { ret = 0; - } + } - sodium_memzero(host->passwd, strlen(host->passwd)); - free(host->passwd); - host->passwd = NULL; - vtun_syslog(LOG_DEBUG,"Key ready for host %s.", host->host); + sodium_memzero(host->passwd, strlen(host->passwd)); + free(host->passwd); + host->passwd = NULL; + vtun_syslog(LOG_DEBUG,"Key ready for host %s.", host->host); return ret; }