← Commit list

01f08dc4eb

Viktor Szakats
Viktor Szakats
2026-05-12
SUCCESS Duration: 241s

Subject

gnutls: fix more nettle 4+ compatibility issues

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

.github/workflows/macos.yml+1 -1
@@ -354,7 +354,7 @@ jobs:
generate: >-
-DENABLE_DEBUG=ON -DCURL_USE_GNUTLS=ON -DCURL_USE_OPENSSL=OFF
-DCURL_USE_GSSAPI=ON -DGSS_ROOT_DIR=/opt/homebrew/opt/krb5
- -DCURL_DISABLE_LDAP=ON -DUSE_SSLS_EXPORT=ON -DCURL_ENABLE_NTLM=ON
+ -DCURL_DISABLE_LDAP=ON -DUSE_SSLS_EXPORT=ON
- name: 'aws-lc +analyzer'
compiler: gcc-15
lib/curl_ntlm_core.c+8 -1
@@ -49,6 +49,13 @@
in NTLM type-3 messages.
*/
+#ifdef USE_GNUTLS
+#include <nettle/version.h>
+#if NETTLE_VERSION_MAJOR < 4
+#define HAVE_GNUTLS_DES
+#endif
+#endif
+
#if defined(USE_OPENSSL) && defined(HAVE_DES_ECB_ENCRYPT)
# include <openssl/des.h>
@@ -63,7 +70,7 @@
# include <wolfssl/wolfcrypt/des3.h>
# define USE_WOLFSSL_DES
-#elif defined(USE_GNUTLS)
+#elif defined(HAVE_GNUTLS_DES)
# include <nettle/des.h>
# define USE_CURL_DES_SET_ODD_PARITY
#elif defined(USE_MBEDTLS) && defined(HAVE_MBEDTLS_DES_CRYPT_ECB)
lib/md4.c+5 -0
@@ -158,6 +158,7 @@ static void my_md4_final(unsigned char *digest, my_md4_ctx *ctx)
#elif defined(USE_GNUTLS)
#include <nettle/md4.h>
+#include <nettle/version.h>
typedef struct md4_ctx my_md4_ctx;
@@ -175,7 +176,11 @@ static void my_md4_update(my_md4_ctx *ctx,
static void my_md4_final(unsigned char *digest, my_md4_ctx *ctx)
{
+#if NETTLE_VERSION_MAJOR >= 4
+ md4_digest(ctx, digest);
+#else
md4_digest(ctx, MD4_DIGEST_SIZE, digest);
+#endif
}
#else
lib/vtls/gtls.c+1 -0
@@ -2270,6 +2270,7 @@ static CURLcode gtls_sha256sum(const unsigned char *tmp, /* input */
sha256_init(&SHA256pw);
sha256_update(&SHA256pw, (unsigned int)tmplen, tmp);
#if NETTLE_VERSION_MAJOR >= 4
+ (void)sha256len;
sha256_digest(&SHA256pw, sha256sum);
#else
sha256_digest(&SHA256pw, (unsigned int)sha256len, sha256sum);