X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_key.c;h=e1bb3b9b6e83d38e0147bf639cc32405be36a704;hb=00d81ee6236e76f80b84372ac5c635636ad48136;hp=d24d4aca01af43c968bdc156fd23df4b729448a2;hpb=7418e9077f84db10ef6bb082a375870a7130bd7d;p=tinc 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);