aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--[-rwxr-xr-x]src/examples/msgs_i18n.c0
-rw-r--r--src/lib/md5.c16
-rw-r--r--src/lib/md5.h12
-rw-r--r--src/microhttpd/digestauth.c10
-rw-r--r--src/microhttpd/md5.c12
-rw-r--r--src/microhttpd/md5.h10
-rw-r--r--src/microhttpd/sha256.c4
-rw-r--r--src/microhttpd/sha256.h4
-rw-r--r--src/microhttpd/test_md5.c28
-rw-r--r--src/microhttpd/test_sha256.c20
11 files changed, 62 insertions, 58 deletions
diff --git a/ChangeLog b/ChangeLog
index da71a51a..188635a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
1Mon 03 Jun 2019 11:45:52 PM CEST
2 Apply MHD_-prefix to hash functions, even if they are not in the
3 officially exported API. -CG/DB
4
1Sun May 26 23:05:42 MSK 2019 5Sun May 26 23:05:42 MSK 2019
2 Better detection of sockaddr member in configure, fixed build on *BSD, 6 Better detection of sockaddr member in configure, fixed build on *BSD,
3 Fixed compiler warnings, 7 Fixed compiler warnings,
diff --git a/src/examples/msgs_i18n.c b/src/examples/msgs_i18n.c
index 2d8eb566..2d8eb566 100755..100644
--- a/src/examples/msgs_i18n.c
+++ b/src/examples/msgs_i18n.c
diff --git a/src/lib/md5.c b/src/lib/md5.c
index d92a42ee..a7eb35fe 100644
--- a/src/lib/md5.c
+++ b/src/lib/md5.c
@@ -10,8 +10,8 @@
10 * with every copy. 10 * with every copy.
11 * 11 *
12 * To compute the message digest of a chunk of bytes, declare an 12 * To compute the message digest of a chunk of bytes, declare an
13 * MD5Context structure, pass it to MD5Init, call MD5Update as 13 * MD5Context structure, pass it to MHD_MD5Init, call MHD_MD5Update as
14 * needed on buffers full of bytes, and then call MD5Final, which 14 * needed on buffers full of bytes, and then call MHD_MD5Final, which
15 * will fill a supplied 16-byte array with the digest. 15 * will fill a supplied 16-byte array with the digest.
16 */ 16 */
17 17
@@ -47,7 +47,7 @@ static uint8_t PADDING[MD5_BLOCK_SIZE] = {
47 * initialization constants. 47 * initialization constants.
48 */ 48 */
49void 49void
50MD5Init(struct MD5Context *ctx) 50MHD_MD5Init(struct MD5Context *ctx)
51{ 51{
52 if (!ctx) 52 if (!ctx)
53 return; 53 return;
@@ -64,7 +64,7 @@ MD5Init(struct MD5Context *ctx)
64 * of bytes. 64 * of bytes.
65 */ 65 */
66void 66void
67MD5Update(struct MD5Context *ctx, const unsigned char *input, size_t len) 67MHD_MD5Update(struct MD5Context *ctx, const unsigned char *input, size_t len)
68{ 68{
69 size_t have, need; 69 size_t have, need;
70 70
@@ -124,15 +124,15 @@ MD5Pad(struct MD5Context *ctx)
124 ((ctx->count >> 3) & (MD5_BLOCK_SIZE - 1)); 124 ((ctx->count >> 3) & (MD5_BLOCK_SIZE - 1));
125 if (padlen < 1 + 8) 125 if (padlen < 1 + 8)
126 padlen += MD5_BLOCK_SIZE; 126 padlen += MD5_BLOCK_SIZE;
127 MD5Update(ctx, PADDING, padlen - 8); /* padlen - 8 <= 64 */ 127 MHD_MD5Update(ctx, PADDING, padlen - 8); /* padlen - 8 <= 64 */
128 MD5Update(ctx, count, 8); 128 MHD_MD5Update(ctx, count, 8);
129} 129}
130 130
131/* 131/*
132 * Final wrapup--call MD5Pad, fill in digest and zero out ctx. 132 * Final wrapup--call MD5Pad, fill in digest and zero out ctx.
133 */ 133 */
134void 134void
135MD5Final(unsigned char digest[MD5_DIGEST_SIZE], struct MD5Context *ctx) 135MHD_MD5Final(unsigned char digest[MD5_DIGEST_SIZE], struct MD5Context *ctx)
136{ 136{
137 int i; 137 int i;
138 138
@@ -161,7 +161,7 @@ MD5Final(unsigned char digest[MD5_DIGEST_SIZE], struct MD5Context *ctx)
161 161
162/* 162/*
163 * The core of the MD5 algorithm, this alters an existing MD5 hash to 163 * The core of the MD5 algorithm, this alters an existing MD5 hash to
164 * reflect the addition of 16 longwords of new data. MD5Update blocks 164 * reflect the addition of 16 longwords of new data. MHD_MD5Update blocks
165 * the data and converts bytes into longwords for this routine. 165 * the data and converts bytes into longwords for this routine.
166 */ 166 */
167void 167void
diff --git a/src/lib/md5.h b/src/lib/md5.h
index ad1151e9..7a6f84e6 100644
--- a/src/lib/md5.h
+++ b/src/lib/md5.h
@@ -10,8 +10,8 @@
10 * with every copy. 10 * with every copy.
11 * 11 *
12 * To compute the message digest of a chunk of bytes, declare an 12 * To compute the message digest of a chunk of bytes, declare an
13 * MD5Context structure, pass it to MD5Init, call MD5Update as 13 * MD5Context structure, pass it to MHD_MD5Init, call MHD_MD5Update as
14 * needed on buffers full of bytes, and then call MD5Final, which 14 * needed on buffers full of bytes, and then call MHD_MD5Final, which
15 * will fill a supplied 16-byte array with the digest. 15 * will fill a supplied 16-byte array with the digest.
16 */ 16 */
17 17
@@ -35,13 +35,13 @@ struct MD5Context
35 * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious 35 * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
36 * initialization constants. 36 * initialization constants.
37 */ 37 */
38void MD5Init(struct MD5Context *ctx); 38void MHD_MD5Init(struct MD5Context *ctx);
39 39
40/* 40/*
41 * Update context to reflect the concatenation of another buffer full 41 * Update context to reflect the concatenation of another buffer full
42 * of bytes. 42 * of bytes.
43 */ 43 */
44void MD5Update(struct MD5Context *ctx, const unsigned char *input, size_t len); 44void MHD_MD5Update(struct MD5Context *ctx, const unsigned char *input, size_t len);
45 45
46/* 46/*
47 * Pad pad to 64-byte boundary with the bit pattern 47 * Pad pad to 64-byte boundary with the bit pattern
@@ -52,11 +52,11 @@ void MD5Pad(struct MD5Context *ctx);
52/* 52/*
53 * Final wrapup--call MD5Pad, fill in digest and zero out ctx. 53 * Final wrapup--call MD5Pad, fill in digest and zero out ctx.
54 */ 54 */
55void MD5Final(unsigned char digest[MD5_DIGEST_SIZE], struct MD5Context *ctx); 55void MHD_MD5Final(unsigned char digest[MD5_DIGEST_SIZE], struct MD5Context *ctx);
56 56
57/* 57/*
58 * The core of the MD5 algorithm, this alters an existing MD5 hash to 58 * The core of the MD5 algorithm, this alters an existing MD5 hash to
59 * reflect the addition of 16 longwords of new data. MD5Update blocks 59 * reflect the addition of 16 longwords of new data. MHD_MD5Update blocks
60 * the data and converts bytes into longwords for this routine. 60 * the data and converts bytes into longwords for this routine.
61 */ 61 */
62void MD5Transform(uint32_t state[4], const uint8_t block[MD5_BLOCK_SIZE]); 62void MD5Transform(uint32_t state[4], const uint8_t block[MD5_BLOCK_SIZE]);
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index c2783dd7..ce7edb79 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -1195,9 +1195,9 @@ MHD_digest_auth_check (struct MHD_Connection *connection,
1195 da.ctx = &ctx.md5; \ 1195 da.ctx = &ctx.md5; \
1196 da.alg = "md5"; \ 1196 da.alg = "md5"; \
1197 da.sessionkey = skey.md5; \ 1197 da.sessionkey = skey.md5; \
1198 da.init = &MD5Init; \ 1198 da.init = &MHD_MD5Init; \
1199 da.update = &MD5Update; \ 1199 da.update = &MHD_MD5Update; \
1200 da.digest = &MD5Final; \ 1200 da.digest = &MHD_MD5Final; \
1201 break; \ 1201 break; \
1202 case MHD_DIGEST_ALG_AUTO: \ 1202 case MHD_DIGEST_ALG_AUTO: \
1203 /* auto == SHA256, fall-though thus intentional! */ \ 1203 /* auto == SHA256, fall-though thus intentional! */ \
@@ -1206,8 +1206,8 @@ MHD_digest_auth_check (struct MHD_Connection *connection,
1206 da.ctx = &ctx.sha256; \ 1206 da.ctx = &ctx.sha256; \
1207 da.alg = "sha-256"; \ 1207 da.alg = "sha-256"; \
1208 da.sessionkey = skey.sha256; \ 1208 da.sessionkey = skey.sha256; \
1209 da.init = &sha256_init; \ 1209 da.init = &MHD_SHA256_init; \
1210 da.update = &sha256_update; \ 1210 da.update = &MHD_SHA256_update; \
1211 da.digest = &sha256_finish; \ 1211 da.digest = &sha256_finish; \
1212 break; \ 1212 break; \
1213 } \ 1213 } \
diff --git a/src/microhttpd/md5.c b/src/microhttpd/md5.c
index 08ed6ee5..25f25372 100644
--- a/src/microhttpd/md5.c
+++ b/src/microhttpd/md5.c
@@ -10,8 +10,8 @@
10 * with every copy. 10 * with every copy.
11 * 11 *
12 * To compute the message digest of a chunk of bytes, declare an 12 * To compute the message digest of a chunk of bytes, declare an
13 * MD5Context structure, pass it to MD5Init, call MD5Update as 13 * MD5Context structure, pass it to MHD_MD5Init, call MHD_MD5Update as
14 * needed on buffers full of bytes, and then call MD5Final, which 14 * needed on buffers full of bytes, and then call MHD_MD5Final, which
15 * will fill a supplied 16-byte array with the digest. 15 * will fill a supplied 16-byte array with the digest.
16 */ 16 */
17 17
@@ -34,7 +34,7 @@
34 * @param ctx must be a `struct MD5Context *` 34 * @param ctx must be a `struct MD5Context *`
35 */ 35 */
36void 36void
37MD5Init (void *ctx_) 37MHD_MD5Init (void *ctx_)
38{ 38{
39 struct MD5Context *ctx = ctx_; 39 struct MD5Context *ctx = ctx_;
40 40
@@ -57,7 +57,7 @@ MD5Transform (uint32_t state[4],
57 * @param ctx must be a `struct MD5Context *` 57 * @param ctx must be a `struct MD5Context *`
58 */ 58 */
59void 59void
60MD5Final (void *ctx_, 60MHD_MD5Final (void *ctx_,
61 uint8_t digest[MD5_DIGEST_SIZE]) 61 uint8_t digest[MD5_DIGEST_SIZE])
62{ 62{
63 struct MD5Context *ctx = ctx_; 63 struct MD5Context *ctx = ctx_;
@@ -119,7 +119,7 @@ MD5Final (void *ctx_,
119 119
120/** 120/**
121 * The core of the MD5 algorithm, this alters an existing MD5 hash to 121 * The core of the MD5 algorithm, this alters an existing MD5 hash to
122 * reflect the addition of 16 longwords of new data. MD5Update blocks 122 * reflect the addition of 16 longwords of new data. MHD_MD5Update blocks
123 * the data and converts bytes into longwords for this routine. 123 * the data and converts bytes into longwords for this routine.
124 */ 124 */
125static void 125static void
@@ -225,7 +225,7 @@ MD5Transform (uint32_t state[4],
225 * of bytes. 225 * of bytes.
226 */ 226 */
227void 227void
228MD5Update (void *ctx_, 228MHD_MD5Update (void *ctx_,
229 const uint8_t *input, 229 const uint8_t *input,
230 size_t len) 230 size_t len)
231{ 231{
diff --git a/src/microhttpd/md5.h b/src/microhttpd/md5.h
index 0c1acab1..3c1d1c1c 100644
--- a/src/microhttpd/md5.h
+++ b/src/microhttpd/md5.h
@@ -10,8 +10,8 @@
10 * with every copy. 10 * with every copy.
11 * 11 *
12 * To compute the message digest of a chunk of bytes, declare an 12 * To compute the message digest of a chunk of bytes, declare an
13 * MD5Context structure, pass it to MD5Init, call MD5Update as 13 * MD5Context structure, pass it to MHD_MD5Init, call MHD_MD5Update as
14 * needed on buffers full of bytes, and then call MD5Final, which 14 * needed on buffers full of bytes, and then call MHD_MD5Final, which
15 * will fill a supplied 16-byte array with the digest. 15 * will fill a supplied 16-byte array with the digest.
16 */ 16 */
17 17
@@ -41,7 +41,7 @@ struct MD5Context
41 * @param ctx_ must be a `struct MD5Context *` 41 * @param ctx_ must be a `struct MD5Context *`
42 */ 42 */
43void 43void
44MD5Init (void *ctx_); 44MHD_MD5Init (void *ctx_);
45 45
46 46
47/** 47/**
@@ -51,7 +51,7 @@ MD5Init (void *ctx_);
51 * @param ctx_ must be a `struct MD5Context *` 51 * @param ctx_ must be a `struct MD5Context *`
52 */ 52 */
53void 53void
54MD5Update (void *ctx_, 54MHD_MD5Update (void *ctx_,
55 const uint8_t *input, 55 const uint8_t *input,
56 size_t len); 56 size_t len);
57 57
@@ -62,7 +62,7 @@ MD5Update (void *ctx_,
62 * @param ctx_ must be a `struct MD5Context *` 62 * @param ctx_ must be a `struct MD5Context *`
63 */ 63 */
64void 64void
65MD5Final (void *ctx_, 65MHD_MD5Final (void *ctx_,
66 uint8_t digest[MD5_DIGEST_SIZE]); 66 uint8_t digest[MD5_DIGEST_SIZE]);
67 67
68 68
diff --git a/src/microhttpd/sha256.c b/src/microhttpd/sha256.c
index 244b674a..b47a773b 100644
--- a/src/microhttpd/sha256.c
+++ b/src/microhttpd/sha256.c
@@ -42,7 +42,7 @@
42 * @param ctx_ must be a `struct sha256_ctx *` 42 * @param ctx_ must be a `struct sha256_ctx *`
43 */ 43 */
44void 44void
45sha256_init (void *ctx_) 45MHD_SHA256_init (void *ctx_)
46{ 46{
47 struct sha256_ctx *const ctx = ctx_; 47 struct sha256_ctx *const ctx = ctx_;
48 /* Initial hash values, see FIPS PUB 180-4 paragraph 5.3.3 */ 48 /* Initial hash values, see FIPS PUB 180-4 paragraph 5.3.3 */
@@ -236,7 +236,7 @@ sha256_transform (uint32_t H[_SHA256_DIGEST_LENGTH],
236 * @param length number of bytes in @a data 236 * @param length number of bytes in @a data
237 */ 237 */
238void 238void
239sha256_update (void *ctx_, 239MHD_SHA256_update (void *ctx_,
240 const uint8_t *data, 240 const uint8_t *data,
241 size_t length) 241 size_t length)
242{ 242{
diff --git a/src/microhttpd/sha256.h b/src/microhttpd/sha256.h
index 03700080..319277ff 100644
--- a/src/microhttpd/sha256.h
+++ b/src/microhttpd/sha256.h
@@ -64,7 +64,7 @@ struct sha256_ctx
64 * @param ctx_ must be a `struct sha256_ctx *` 64 * @param ctx_ must be a `struct sha256_ctx *`
65 */ 65 */
66void 66void
67sha256_init (void *ctx_); 67MHD_SHA256_init (void *ctx_);
68 68
69 69
70/** 70/**
@@ -75,7 +75,7 @@ sha256_init (void *ctx_);
75 * @param length number of bytes in @a data 75 * @param length number of bytes in @a data
76 */ 76 */
77void 77void
78sha256_update (void *ctx_, 78MHD_SHA256_update (void *ctx_,
79 const uint8_t *data, 79 const uint8_t *data,
80 size_t length); 80 size_t length);
81 81
diff --git a/src/microhttpd/test_md5.c b/src/microhttpd/test_md5.c
index a57fc83e..58eb1c7e 100644
--- a/src/microhttpd/test_md5.c
+++ b/src/microhttpd/test_md5.c
@@ -228,9 +228,9 @@ int test1_str(void)
228 struct MD5Context ctx; 228 struct MD5Context ctx;
229 uint8_t digest[MD5_DIGEST_SIZE]; 229 uint8_t digest[MD5_DIGEST_SIZE];
230 230
231 MD5Init (&ctx); 231 MHD_MD5Init (&ctx);
232 MD5Update (&ctx, (const uint8_t*)data_units1[i].str_l.str, data_units1[i].str_l.len); 232 MHD_MD5Update (&ctx, (const uint8_t*)data_units1[i].str_l.str, data_units1[i].str_l.len);
233 MD5Final (&ctx, digest); 233 MHD_MD5Final (&ctx, digest);
234 num_failed += check_result (__FUNCTION__, i, digest, 234 num_failed += check_result (__FUNCTION__, i, digest,
235 data_units1[i].digest); 235 data_units1[i].digest);
236 } 236 }
@@ -245,9 +245,9 @@ int test1_bin(void)
245 struct MD5Context ctx; 245 struct MD5Context ctx;
246 uint8_t digest[MD5_DIGEST_SIZE]; 246 uint8_t digest[MD5_DIGEST_SIZE];
247 247
248 MD5Init (&ctx); 248 MHD_MD5Init (&ctx);
249 MD5Update (&ctx, data_units2[i].bin_l.bin, data_units2[i].bin_l.len); 249 MHD_MD5Update (&ctx, data_units2[i].bin_l.bin, data_units2[i].bin_l.len);
250 MD5Final (&ctx, digest); 250 MHD_MD5Final (&ctx, digest);
251 num_failed += check_result (__FUNCTION__, i, digest, 251 num_failed += check_result (__FUNCTION__, i, digest,
252 data_units2[i].digest); 252 data_units2[i].digest);
253 } 253 }
@@ -264,10 +264,10 @@ int test2_str(void)
264 uint8_t digest[MD5_DIGEST_SIZE]; 264 uint8_t digest[MD5_DIGEST_SIZE];
265 size_t part_s = data_units1[i].str_l.len / 4; 265 size_t part_s = data_units1[i].str_l.len / 4;
266 266
267 MD5Init (&ctx); 267 MHD_MD5Init (&ctx);
268 MD5Update (&ctx, (const uint8_t*)data_units1[i].str_l.str, part_s); 268 MHD_MD5Update (&ctx, (const uint8_t*)data_units1[i].str_l.str, part_s);
269 MD5Update (&ctx, (const uint8_t*)data_units1[i].str_l.str + part_s, data_units1[i].str_l.len - part_s); 269 MHD_MD5Update (&ctx, (const uint8_t*)data_units1[i].str_l.str + part_s, data_units1[i].str_l.len - part_s);
270 MD5Final (&ctx, digest); 270 MHD_MD5Final (&ctx, digest);
271 num_failed += check_result (__FUNCTION__, i, digest, 271 num_failed += check_result (__FUNCTION__, i, digest,
272 data_units1[i].digest); 272 data_units1[i].digest);
273 } 273 }
@@ -283,10 +283,10 @@ int test2_bin(void)
283 uint8_t digest[MD5_DIGEST_SIZE]; 283 uint8_t digest[MD5_DIGEST_SIZE];
284 size_t part_s = data_units2[i].bin_l.len * 2 / 3; 284 size_t part_s = data_units2[i].bin_l.len * 2 / 3;
285 285
286 MD5Init (&ctx); 286 MHD_MD5Init (&ctx);
287 MD5Update (&ctx, data_units2[i].bin_l.bin, part_s); 287 MHD_MD5Update (&ctx, data_units2[i].bin_l.bin, part_s);
288 MD5Update (&ctx, data_units2[i].bin_l.bin + part_s, data_units2[i].bin_l.len - part_s); 288 MHD_MD5Update (&ctx, data_units2[i].bin_l.bin + part_s, data_units2[i].bin_l.len - part_s);
289 MD5Final (&ctx, digest); 289 MHD_MD5Final (&ctx, digest);
290 num_failed += check_result (__FUNCTION__, i, digest, 290 num_failed += check_result (__FUNCTION__, i, digest,
291 data_units2[i].digest); 291 data_units2[i].digest);
292 } 292 }
diff --git a/src/microhttpd/test_sha256.c b/src/microhttpd/test_sha256.c
index b30ebc22..4eb0cf69 100644
--- a/src/microhttpd/test_sha256.c
+++ b/src/microhttpd/test_sha256.c
@@ -253,8 +253,8 @@ int test1_str(void)
253 struct sha256_ctx ctx; 253 struct sha256_ctx ctx;
254 uint8_t digest[SHA256_DIGEST_SIZE]; 254 uint8_t digest[SHA256_DIGEST_SIZE];
255 255
256 sha256_init (&ctx); 256 MHD_SHA256_init (&ctx);
257 sha256_update (&ctx, (const uint8_t*)data_units1[i].str_l.str, data_units1[i].str_l.len); 257 MHD_SHA256_update (&ctx, (const uint8_t*)data_units1[i].str_l.str, data_units1[i].str_l.len);
258 sha256_finish (&ctx, digest); 258 sha256_finish (&ctx, digest);
259 num_failed += check_result (__FUNCTION__, i, digest, 259 num_failed += check_result (__FUNCTION__, i, digest,
260 data_units1[i].digest); 260 data_units1[i].digest);
@@ -270,8 +270,8 @@ int test1_bin(void)
270 struct sha256_ctx ctx; 270 struct sha256_ctx ctx;
271 uint8_t digest[SHA256_DIGEST_SIZE]; 271 uint8_t digest[SHA256_DIGEST_SIZE];
272 272
273 sha256_init (&ctx); 273 MHD_SHA256_init (&ctx);
274 sha256_update (&ctx, data_units2[i].bin_l.bin, data_units2[i].bin_l.len); 274 MHD_SHA256_update (&ctx, data_units2[i].bin_l.bin, data_units2[i].bin_l.len);
275 sha256_finish (&ctx, digest); 275 sha256_finish (&ctx, digest);
276 num_failed += check_result (__FUNCTION__, i, digest, 276 num_failed += check_result (__FUNCTION__, i, digest,
277 data_units2[i].digest); 277 data_units2[i].digest);
@@ -289,9 +289,9 @@ int test2_str(void)
289 uint8_t digest[SHA256_DIGEST_SIZE]; 289 uint8_t digest[SHA256_DIGEST_SIZE];
290 size_t part_s = data_units1[i].str_l.len / 4; 290 size_t part_s = data_units1[i].str_l.len / 4;
291 291
292 sha256_init (&ctx); 292 MHD_SHA256_init (&ctx);
293 sha256_update (&ctx, (const uint8_t*)data_units1[i].str_l.str, part_s); 293 MHD_SHA256_update (&ctx, (const uint8_t*)data_units1[i].str_l.str, part_s);
294 sha256_update (&ctx, (const uint8_t*)data_units1[i].str_l.str + part_s, data_units1[i].str_l.len - part_s); 294 MHD_SHA256_update (&ctx, (const uint8_t*)data_units1[i].str_l.str + part_s, data_units1[i].str_l.len - part_s);
295 sha256_finish (&ctx, digest); 295 sha256_finish (&ctx, digest);
296 num_failed += check_result (__FUNCTION__, i, digest, 296 num_failed += check_result (__FUNCTION__, i, digest,
297 data_units1[i].digest); 297 data_units1[i].digest);
@@ -308,9 +308,9 @@ int test2_bin(void)
308 uint8_t digest[SHA256_DIGEST_SIZE]; 308 uint8_t digest[SHA256_DIGEST_SIZE];
309 size_t part_s = data_units2[i].bin_l.len * 2 / 3; 309 size_t part_s = data_units2[i].bin_l.len * 2 / 3;
310 310
311 sha256_init (&ctx); 311 MHD_SHA256_init (&ctx);
312 sha256_update (&ctx, data_units2[i].bin_l.bin, part_s); 312 MHD_SHA256_update (&ctx, data_units2[i].bin_l.bin, part_s);
313 sha256_update (&ctx, data_units2[i].bin_l.bin + part_s, data_units2[i].bin_l.len - part_s); 313 MHD_SHA256_update (&ctx, data_units2[i].bin_l.bin + part_s, data_units2[i].bin_l.len - part_s);
314 sha256_finish (&ctx, digest); 314 sha256_finish (&ctx, digest);
315 num_failed += check_result (__FUNCTION__, i, digest, 315 num_failed += check_result (__FUNCTION__, i, digest,
316 data_units2[i].digest); 316 data_units2[i].digest);