aboutsummaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-09-01 19:03:05 -0400
committerRob Austein <sra@hactrn.net>2016-09-01 19:03:05 -0400
commit65e8ef470b34a9c7af92f377da297095a0251890 (patch)
tree2e7213eb14424155fb6146e5f086052e5d756bf1 /hash.c
parentc2b116a5e46ed89bf1426def0c447d2e46cc9474 (diff)
Move in-memory keystore from client to server. Whack with club until compiles.
Fixes for various minor issues found while integrating with sw/stm32. Moving the in-memory keystore (PKCS #11 session objects, etc) from the client library to the HSM was on the near term to-do list in any case, doing it now turned out to be the easiest way to solve one of the build problems.
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hash.c b/hash.c
index 5709a6a..042eff9 100644
--- a/hash.c
+++ b/hash.c
@@ -969,15 +969,17 @@ static hal_error_t sw_hash_core_sha1(hal_hash_state_t *state)
if (debug)
fprintf(stderr,
- "[Round %02d < a = 0x%08x, b = 0x%08x, c = 0x%08x, d = 0x%08x, e = 0x%08x, f = 0x%08x, k = 0x%08x, w = 0x%08x]\n",
- i, S[a], S[b], S[c], S[d], S[e], f, k, W[i]);
+ "[Round %02d < a = 0x%08lx, b = 0x%08lx, c = 0x%08lx, d = 0x%08lx, e = 0x%08lx, f = 0x%08lx, k = 0x%08lx, w = 0x%08lx]\n",
+ i, (unsigned long) S[a], (unsigned long) S[b], (unsigned long) S[c], (unsigned long) S[d], (unsigned long) S[e],
+ (unsigned long) f, (unsigned long) k, (unsigned long) W[i]);
S[e] = rot_l_32(S[a], 5) + f + S[e] + k + W[i];
S[b] = rot_l_32(S[b], 30);
if (debug)
- fprintf(stderr, "[Round %02d > a = 0x%08x, b = 0x%08x, c = 0x%08x, d = 0x%08x, e = 0x%08x]\n",
- i, S[a], S[b], S[c], S[d], S[e]);
+ fprintf(stderr, "[Round %02d > a = 0x%08lx, b = 0x%08lx, c = 0x%08lx, d = 0x%08lx, e = 0x%08lx]\n",
+ i, (unsigned long) S[a], (unsigned long) S[b],
+ (unsigned long) S[c], (unsigned long) S[d], (unsigned long) S[e]);
}
for (int i = 0; i < 5; i++)