![在 make 步骤期间安装 aircrack-ng 时出错,有关 HMAC 的情况吗?](https://linux22.com/image/116126/%E5%9C%A8%20make%20%E6%AD%A5%E9%AA%A4%E6%9C%9F%E9%97%B4%E5%AE%89%E8%A3%85%20aircrack-ng%20%E6%97%B6%E5%87%BA%E9%94%99%EF%BC%8C%E6%9C%89%E5%85%B3%20HMAC%20%E7%9A%84%E6%83%85%E5%86%B5%E5%90%97%EF%BC%9F.png)
我正在尝试在 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
然后再次安装它,或者如果您正在编译它,请下载更新的源代码