From b7f4f62dfa570810fbb37fe3e6ef800940b99ed5 Mon Sep 17 00:00:00 2001 From: Jennifer Sutton Date: Tue, 24 Mar 2026 15:28:53 +1300 Subject: [PATCH] =?UTF-8?q?krb5:=20Fix=20non=E2=80=90RC4=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function _krb5_usage2arcfour() is only declared if Heimdal is built with RC4. Put calls to this function behind #ifdef guards so that the build can succeed. --- lib/krb5/crypto.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/krb5/crypto.c b/lib/krb5/crypto.c index 875f0aa9c..28fb529da 100644 --- a/lib/krb5/crypto.c +++ b/lib/krb5/crypto.c @@ -608,8 +608,12 @@ krb5_create_checksum(krb5_context context, } if (arcfour_checksum_p(ct, crypto)) { +#ifdef HEIM_ARCFOUR keyusage = usage; _krb5_usage2arcfour(context, &keyusage); +#else + return KRB5_PROG_SUMTYPE_NOSUPP; +#endif /* HEIM_ARCFOUR */ } else keyusage = CHECKSUM_USAGE(usage); @@ -738,8 +742,12 @@ krb5_verify_checksum(krb5_context context, } if (arcfour_checksum_p(ct, crypto)) { +#ifdef HEIM_ARCFOUR keyusage = usage; _krb5_usage2arcfour(context, &keyusage); +#else + return KRB5_PROG_SUMTYPE_NOSUPP; +#endif /* HEIM_ARCFOUR */ } else keyusage = CHECKSUM_USAGE(usage); @@ -2067,8 +2075,12 @@ krb5_create_checksum_iov(krb5_context context, } if (arcfour_checksum_p(ct, crypto)) { +#ifdef HEIM_ARCFOUR keyusage = usage; _krb5_usage2arcfour(context, &keyusage); +#else + return KRB5_PROG_SUMTYPE_NOSUPP; +#endif /* HEIM_ARCFOUR */ } else keyusage = CHECKSUM_USAGE(usage); @@ -2134,8 +2146,12 @@ krb5_verify_checksum_iov(krb5_context context, } if (arcfour_checksum_p(ct, crypto)) { +#ifdef HEIM_ARCFOUR keyusage = usage; _krb5_usage2arcfour(context, &keyusage); +#else + return KRB5_PROG_SUMTYPE_NOSUPP; +#endif /* HEIM_ARCFOUR */ } else keyusage = CHECKSUM_USAGE(usage);