From c212ae94dce33e150bc384db54a3c4d471c75bd7 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Sat, 7 Mar 2026 18:44:02 +0100 Subject: follow API break of nettle 4 --- ssh-agent-filter.C | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index 3fe4801..8a2772d 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -77,6 +77,7 @@ using std::pair; #include #include #include +#include #include #include #include @@ -112,7 +113,11 @@ string md5_hex (string const & s) { md5_init(&ctx); md5_update(&ctx, s.size(), reinterpret_cast(s.data())); std::array bin; +#if (NETTLE_VERSION_MAJOR >= 4) + md5_digest(&ctx, bin.data()); +#else md5_digest(&ctx, MD5_DIGEST_SIZE, bin.data()); +#endif std::array hex; base16_encode_update(hex.data(), MD5_DIGEST_SIZE, bin.data()); return {begin(hex), end(hex)}; -- cgit v1.2.3