From: Evan Miller Date: Fri, 27 Aug 2021 18:40:01 +0000 (-0400) Subject: Fix build on ancient platforms lacking SHA224 X-Git-Tag: v2.4b1~84^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9463dd7e0cd97e68300ef74d1aa727412eaa5ef8;p=thirdparty%2Fcups.git Fix build on ancient platforms lacking SHA224 --- diff --git a/cups/hash.c b/cups/hash.c index c153c66559..ba7d6ec1c9 100644 --- a/cups/hash.c +++ b/cups/hash.c @@ -85,6 +85,7 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */ return (CC_SHA1_DIGEST_LENGTH); } +#ifdef CC_SHA224_DIGEST_LENGTH else if (!strcmp(algorithm, "sha2-224")) { CC_SHA256_CTX ctx; /* SHA-224 context */ @@ -98,6 +99,7 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */ return (CC_SHA224_DIGEST_LENGTH); } +#endif /* CC_SHA224_DIGEST_LENGTH */ else if (!strcmp(algorithm, "sha2-256")) { CC_SHA256_CTX ctx; /* SHA-256 context */ @@ -137,6 +139,7 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */ return (CC_SHA512_DIGEST_LENGTH); } +#ifdef CC_SHA224_DIGEST_LENGTH else if (!strcmp(algorithm, "sha2-512_224")) { CC_SHA512_CTX ctx; /* SHA-512 context */ @@ -158,6 +161,7 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */ return (CC_SHA224_DIGEST_LENGTH); } +#endif /* CC_SHA224_DIGEST_LENGTH */ else if (!strcmp(algorithm, "sha2-512_256")) { CC_SHA512_CTX ctx; /* SHA-512 context */