alibaba / xquic

XQUIC Library released by Alibaba is a cross-platform implementation of QUIC and HTTP/3 protocol.
Apache License 2.0
1.65k stars 326 forks source link

[Bug]: 下载最新的boringssl和xquic进行编译报HMAC_Init_ex未定义 #279

Closed f8281888 closed 1 year ago

f8281888 commented 1 year ago

What happened?

[ 88%] Building C object CMakeFiles/xquic-static.dir/src/congestion_control/xqc_cubic.c.o /root/quic/test/xquic/src/tls/xqc_tls.c: In function ‘xqc_ssl_session_ticket_key_cb’: /root/quic/test/xquic/src/tls/xqc_tls.c:883:13: error: implicit declaration of function ‘HMAC_Init_ex’; did you mean ‘SHA1_Init’? [-Werror=implicit-function-declaration] if (HMAC_Init_ex(hmac_ctx, key->hmac_key, size, digest, NULL) != 1) { ^~~~ SHA1_Init cc1: all warnings being treated as errors make[2]: [CMakeFiles/xquic-static.dir/src/tls/xqc_tls.c.o] 错误 1 make[2]: 正在等待未完成的任务.... /root/quic/test/xquic/src/tls/xqc_tls.c: In function ‘xqc_ssl_session_ticket_key_cb’: /root/quic/test/xquic/src/tls/xqc_tls.c:883:13: error: implicit declaration of function ‘HMAC_Init_ex’; did you mean ‘SHA1_Init’? [-Werror=implicit-function-declaration] if (HMAC_Init_ex(hmac_ctx, key->hmac_key, size, digest, NULL) != 1) { ^~~~ SHA1_Init

Steps To Reproduce

按步骤编译报错

Relevant log output

No response

ihlar commented 1 year ago

I just came in to post about the same issue. I managed to resolve it by adding the following line to xqc_tls.c: #include <openssl/hmac.h> Unfortunately I cannot propose a PR due to not being able to sign the contributors license until it's cleared with legal in my company.

derekwin commented 1 year ago

估计是boringssl的问题,我用旧的boringssl编译通过了。

f8281888 commented 1 year ago

boringssl建议用什么版本