Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error - missing HMAC code #11890

Closed
OlekMazur opened this issue Sep 19, 2023 · 4 comments
Closed

Compilation error - missing HMAC code #11890

OlekMazur opened this issue Sep 19, 2023 · 4 comments
Labels

Comments

@OlekMazur
Copy link

I did this

./configure --with-openssl --disable-aws
make

I expected the following

Expected success like in previous releases. Now there's an error:

In file included from curl_sasl.c:46:
curl_md5.h:54:33: error: array type has incomplete element type 'struct HMAC_params'
   54 | extern const struct HMAC_params Curl_HMAC_MD5[1];
      |                                 ^~~~~~~~~~~~~
make[2]: *** [Makefile:2367: libcurl_la-curl_sasl.lo] Błąd 1

Looks like regression after PR#11490. lib/hmac.c & lib/curl_hmac.h are excluded by --disable-aws, while in fact this code is required not only by AWS but also by implementation of e.g. digest auth.

curl/libcurl version

curl 8.3.0 (cannot paste output of curl -V because it failed to compile)

operating system

Linux 6.4.13-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 30 17:07:31 UTC 2023 x86_64 GNU/Linux

@bagder
Copy link
Member

bagder commented Sep 20, 2023

It does not reproduce with that configure line for me.

in fact this code is required not only by AWS but also by implementation of e.g. digest auth

Yes, and these files also seem to check for (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) in their preprocessor checks accordingly. I'm puzzled by what you report.

@rawoul
Copy link

rawoul commented Sep 20, 2023

Same here, I think it is the --disable-ntlm --disable-aws combination that makes the build fail. Here are all the params I'm using:

--disable-ech --enable-http --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --enable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-mqtt --disable-manual --disable-aws --disable-ntlm --disable-tls-srp --enable-cookies --enable-socketpair --enable-http-auth --disable-doh --enable-mime --enable-bindlocal --enable-form-api --enable-dateparse --disable-netrc --disable-dnsshuffle --enable-get-easy-options --disable-alt-svc --disable-headers-api --disable-hsts --enable-ipv6 --enable-symbol-hiding --disable-sspi --without-schannel --without-secure-transport --without-amissl --without-gnutls --without-mbedtls --without-wolfssl --without-bearssl --without-rustls --without-hyper --with-zlib --without-brotli --without-gssapi --without-ca-bundle --with-ca-path=/usr/lib/ssl/certs --with-random=/dev/urandom --without-libpsl --without-libgsasl --without-libssh2 --without-libssh --without-wolfssh --without-librtmp --without-winidn --without-libidn2 --without-ngtcp2 --without-nghttp3 --without-quiche --without-msh3 --enable-ares --enable-proxy --disable-unix-sockets --disable-websockets --with-nghttp2 --with-openssl --without-zstd

@bagder
Copy link
Member

bagder commented Sep 20, 2023

Right, hmac and md5 are still needed for digest auth. PR coming up.

bagder added a commit that referenced this issue Sep 20, 2023
Previously a build that disbled NTLM and aws-sigv4 would fail to build
since the hmac was disabled, but it is also needed for digest auth.

Follow-up to e92edfb

Fixes #11890
Reported-by: Aleksander Mazur
@bagder bagder closed this as completed in ff5e502 Sep 20, 2023
@wyattoday
Copy link
Contributor

Oops, sorry. 🤦

ptitSeb pushed a commit to wasix-org/curl that referenced this issue Sep 25, 2023
Previously a build that disabled NTLM and aws-sigv4 would fail to build
since the hmac was disabled, but it is also needed for digest auth.

Follow-up to e92edfb

Fixes curl#11890
Reported-by: Aleksander Mazur
Closes curl#11896
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

4 participants