我正在尝试在 kali 滚动中安装 aircrack-ng,并且正在尝试使用 make 函数,但出现错误,提示有关名为 HMAC_CTX 的文件的信息:
crypto.c: In function 'calc_mic':
crypto.c:291:11: error: storage size of 'ctx' isn't known
HMAC_CTX ctx;
^~~
crypto.c:317:2: warning: implicit declaration of function
'HMAC_CTX_init' [-Wimplicit-function-declaration]
HMAC_CTX_init(&ctx);
^~~~~~~~~~~~~
crypto.c:327:2: warning: implicit declaration of function
'HMAC_CTX_cleanup' [-Wimplicit-function-declaration]
HMAC_CTX_cleanup(&ctx);
^~~~~~~~~~~~~~~~
crypto.c:291:11: warning: unused variable 'ctx' [-Wunused-variable]
HMAC_CTX ctx;
^~~
crypto.c: In function 'calc_tkip_mic_key':
crypto.c:932:5: warning: this 'if' clause does not guard... [-
Wmisleading-indentation]
if((ptr-message) % 4 > 0)
^~
crypto.c:933:49: note: ...this statement, but the latter is
misleadingly indented as if it is guarded by the 'if'
memcpy(ptr, ZERO, 4-((ptr-message)%4)); ptr+=4-((ptr-
message)%4);
答案1
这似乎是一个定义问题,您可以丢弃这里的警告,源代码已过时
该位置的实际代码片段看起来像
#if defined(USE_GCRYPT) || OPENSSL_VERSION_NUMBER < 0x10100000L
#define HMAC_USE_NO_PTR
#endif
#ifdef HMAC_USE_NO_PTR
HMAC_CTX ctx;
#else
HMAC_CTX * ctx;
#endif
您需要更新您的存储库,apt-get update
然后再次安装它,或者如果您正在编译它,请下载更新的源代码