X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_auth.c;h=eb1754c1cf83e5c4066633836350e9535713699e;hb=1c475ecb575367a6b3f9328b0f643ad636155341;hp=9d61ab8fc7826b8d431f95cae3291f9bbf64436e;hpb=46f3eba7755089ff68fdc137b0754cae2fa523eb;p=tinc diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 9d61ab8f..eb1754c1 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -176,6 +176,8 @@ bool send_id(connection_t *c) { } static bool finalize_invitation(connection_t *c, const char *data, uint16_t len) { + (void)len; + if(strchr(data, '\n')) { logger(DEBUG_ALWAYS, LOG_ERR, "Received invalid key from invited node %s (%s)!\n", c->name, c->hostname); return false; @@ -606,7 +608,7 @@ bool metakey_h(connection_t *c, const char *request) { /* Convert the challenge from hexadecimal back to binary */ - int inlen = hex2bin(hexkey, enckey, sizeof(enckey)); + size_t inlen = hex2bin(hexkey, enckey, sizeof(enckey)); /* Check if the length of the meta key is all right */ @@ -762,7 +764,7 @@ bool chal_reply_h(connection_t *c, const char *request) { /* Convert the hash to binary format */ - int inlen = hex2bin(hishash, hishash, sizeof(hishash)); + size_t inlen = hex2bin(hishash, hishash, sizeof(hishash)); /* Check if the length of the hash is all right */