richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
8d419f
From f7b73ede98fe971ba28def1af4f3e4ab1fc20c6c Mon Sep 17 00:00:00 2001
8d419f
From: Grigori Goronzy <greg@chown.ath.cx>
8d419f
Date: Sat, 12 Mar 2022 00:51:21 +0100
8d419f
Subject: [PATCH] hmac/sha256: move size define to sha256.h
8d419f
8d419f
(cherry picked from commit e560cf4f71bf237019d982603af3d6be86394788)
8d419f
8d419f
Related: #2087652
8d419f
---
8d419f
 src/basic/hmac.h         | 2 +-
8d419f
 src/fundamental/sha256.h | 2 ++
8d419f
 2 files changed, 3 insertions(+), 1 deletion(-)
8d419f
8d419f
diff --git a/src/basic/hmac.h b/src/basic/hmac.h
8d419f
index a5682c439f..e58c1838a3 100644
8d419f
--- a/src/basic/hmac.h
8d419f
+++ b/src/basic/hmac.h
8d419f
@@ -4,7 +4,7 @@
8d419f
 #include <stdint.h>
8d419f
 #include <stdlib.h>
8d419f
 
8d419f
-#define SHA256_DIGEST_SIZE 32
8d419f
+#include "sha256.h"
8d419f
 
8d419f
 /* Unoptimized implementation based on FIPS 198. 'res' has to be allocated by
8d419f
  * the caller. Prefer external OpenSSL functions, and use this only when
8d419f
diff --git a/src/fundamental/sha256.h b/src/fundamental/sha256.h
8d419f
index abc4167628..e53197f2ef 100644
8d419f
--- a/src/fundamental/sha256.h
8d419f
+++ b/src/fundamental/sha256.h
8d419f
@@ -8,6 +8,8 @@
8d419f
 
8d419f
 #include "types-fundamental.h"
8d419f
 
8d419f
+#define SHA256_DIGEST_SIZE 32
8d419f
+
8d419f
 struct sha256_ctx {
8d419f
         uint32_t H[8];
8d419f