]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix build on ancient platforms lacking SHA224 225/head
authorEvan Miller <emmiller@gmail.com>
Fri, 27 Aug 2021 18:40:01 +0000 (14:40 -0400)
committerGitHub <noreply@github.com>
Fri, 27 Aug 2021 18:40:01 +0000 (14:40 -0400)
cups/hash.c

index c153c665591dff31a6bc7e5ab8614a4f90ae5715..ba7d6ec1c9f9d599396218325f4f673954150e8f 100644 (file)
@@ -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 */