Skip to content

gnutls: fix more nettle 4+ compatibility issues#21557

Closed
vszakats wants to merge 5 commits into
curl:masterfrom
vszakats:nettle4cont
Closed

gnutls: fix more nettle 4+ compatibility issues#21557
vszakats wants to merge 5 commits into
curl:masterfrom
vszakats:nettle4cont

Conversation

@vszakats
Copy link
Copy Markdown
Member

@vszakats vszakats commented May 12, 2026

  • disable DES with nettle 4. It no longer supports it.

    lib/curl_ntlm_core.c:67:12: fatal error: 'nettle/des.h' file not found
       67 | #  include <nettle/des.h>
          |            ^~~~~~~~~~~~~~
    
  • fix MD4 support with nettle 4.

    lib/md4.c:178:36: error: too many arguments to function call, expected 2, have 3
      178 |   md4_digest(ctx, MD4_DIGEST_SIZE, digest);
          |   ~~~~~~~~~~                       ^~~~~~
    
  • fix unused argument compiler warning:

    lib/vtls/gtls.c:2267:39: error: unused parameter 'sha256len' [clang-diagnostic-unused-parameter,-warnings-as-errors]
    2267 |                                size_t sha256len)
         |                                       ^
    

    Ref: https://github.com/curl/curl/actions/runs/25710321195/job/75488970143?pr=21557

  • GHA/macos: stop enabling NTLM in the GnuTLS job.
    It no longer builds due to missing DES support in nettle 4.

    lib/curl_ntlm_core.c:90:4: error: "cannot compile NTLM support without a crypto library with DES."
       90 | #  error "cannot compile NTLM support without a crypto library with DES."
          |    ^
    

    Ref: https://github.com/curl/curl/actions/runs/25710321195/job/75488970170?pr=21557

Follow-up to cfadbaa #21169

vszakats added 2 commits May 12, 2026 04:56
```
In file included from /Users/runner/work/curl/curl/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_0_c.c:88:
/Users/runner/work/curl/curl/lib/curl_ntlm_core.c:90:4: error: "cannot compile NTLM support without a crypto library with DES."
   90 | #  error "cannot compile NTLM support without a crypto library with DES."
      |    ^
```
https://github.com/curl/curl/actions/runs/25710321195/job/75488970170?pr=21557
```
/Users/runner/work/curl/curl/lib/vtls/gtls.c:2267:39: error: unused parameter 'sha256len' [clang-diagnostic-unused-parameter,-warnings-as-errors]
 2267 |                                size_t sha256len)
      |                                       ^
```
Ref: https://github.com/curl/curl/actions/runs/25710321195/job/75488970143?pr=21557
@github-actions github-actions Bot added the CI Continuous Integration label May 12, 2026
@vszakats vszakats changed the title gnutls: disable DES and MD4 for nettle 4+ gnutls: disable DES and MD4, fix unused argument with nettle 4+ May 12, 2026
@vszakats vszakats changed the title gnutls: disable DES and MD4, fix unused argument with nettle 4+ gnutls: fix more nettle 4+ issues May 12, 2026
@vszakats vszakats changed the title gnutls: fix more nettle 4+ issues gnutls: fix more nettle 4+ compatibility issues May 12, 2026
@vszakats vszakats closed this in 01f08dc May 12, 2026
@vszakats vszakats deleted the nettle4cont branch May 12, 2026 03:33
vszakats added a commit that referenced this pull request May 12, 2026
Also rename macro to resemble other backends.

Reported by Codex Security

Fixes #21562
Follow-up to 01f08dc #21557

Closes #21566
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
- disable DES with nettle 4. It no longer supports it.
  ```
  lib/curl_ntlm_core.c:67:12: fatal error: 'nettle/des.h' file not found
     67 | #  include <nettle/des.h>
        |            ^~~~~~~~~~~~~~
  ```

- fix MD4 support with nettle 4.
  ```
  lib/md4.c:178:36: error: too many arguments to function call, expected 2, have 3
    178 |   md4_digest(ctx, MD4_DIGEST_SIZE, digest);
        |   ~~~~~~~~~~                       ^~~~~~
  ```

- fix unused argument compiler warning:
  ```
  lib/vtls/gtls.c:2267:39: error: unused parameter 'sha256len' [clang-diagnostic-unused-parameter,-warnings-as-errors]
  2267 |                                size_t sha256len)
       |                                       ^
  ```
  Ref: https://github.com/curl/curl/actions/runs/25710321195/job/75488970143?pr=21557

- GHA/macos: stop enabling NTLM in the GnuTLS job.
  It no longer builds due to missing DES support in nettle 4.
  ```
  lib/curl_ntlm_core.c:90:4: error: "cannot compile NTLM support without a crypto library with DES."
     90 | #  error "cannot compile NTLM support without a crypto library with DES."
        |    ^
  ```
  Ref: https://github.com/curl/curl/actions/runs/25710321195/job/75488970170?pr=21557

Follow-up to cfadbaa curl#21169

Closes curl#21557
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
Also rename macro to resemble other backends.

Reported by Codex Security

Fixes curl#21562
Follow-up to 01f08dc curl#21557

Closes curl#21566
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant