teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0223-hmac-sha256-move-size-define-to-sha256.h.patch

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