warp-vpn

point to point VPN implementation
git clone git://git.2f30.org/warp-vpn.git
Log | Files | Refs | README

commit 701f5fc23570dc9480dca6df3315ffc8fd4a0f2f
parent 63121623119e25c7d23971feaec64e84a07489ee
Author: sin <sin@2f30.org>
Date:   Thu Mar 23 17:00:19 +0000

No need for salt to be global

Diffstat:
crypto.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/crypto.c b/crypto.c @@ -4,7 +4,6 @@ #include "warp.h" -static unsigned char salt[crypto_pwhash_SALTBYTES]; static unsigned char key[crypto_aead_chacha20poly1305_IETF_KEYBYTES]; void @@ -17,6 +16,8 @@ cryptoinit(void) void derivekey(char *pw) { + unsigned char salt[crypto_pwhash_SALTBYTES]; + memset(salt, 0, sizeof(salt)); /* XXX */ if (crypto_pwhash(key, sizeof(key), pw, strlen(pw), salt, crypto_pwhash_OPSLIMIT_INTERACTIVE,