X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_key.c;h=e1bb3b9b6e83d38e0147bf639cc32405be36a704;hp=d24d4aca01af43c968bdc156fd23df4b729448a2;hb=18646deca120f0ccc3bfad643dba83547ecc2f20;hpb=060ab1cd7cdf750a0477f2a8b6193d28849877e8 diff --git a/src/protocol_key.c b/src/protocol_key.c index d24d4aca..e1bb3b9b 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -356,7 +356,7 @@ bool ans_key_h(connection_t *c, const char *request) { char key[MAX_STRING_SIZE]; char address[MAX_STRING_SIZE] = ""; char port[MAX_STRING_SIZE] = ""; - int cipher, digest, maclength, compression, keylen; + int cipher, digest, maclength, compression; node_t *from, *to; if(sscanf(request, "%*d "MAX_STRING" "MAX_STRING" "MAX_STRING" %d %d %d %d "MAX_STRING" "MAX_STRING, @@ -489,7 +489,7 @@ bool ans_key_h(connection_t *c, const char *request) { /* Process key */ - keylen = hex2bin(key, key, sizeof key); + int keylen = hex2bin(key, key, sizeof key); if(keylen != (from->outcipher ? cipher_keylength(from->outcipher) : 1)) { logger(DEBUG_ALWAYS, LOG_ERR, "Node %s (%s) uses wrong keylength!", from->name, from->hostname);