projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support running tests on NetBSD 8.2.
[tinc]
/
src
/
openssl
/
prf.c
diff --git
a/src/openssl/prf.c
b/src/openssl/prf.c
index
d87c5c6
..
f1f3d17
100644
(file)
--- a/
src/openssl/prf.c
+++ b/
src/openssl/prf.c
@@
-29,7
+29,7
@@
We use SHA512 instead of MD5 and SHA1.
*/
We use SHA512 instead of MD5 and SHA1.
*/
-static bool prf_xor(int nid, const char *secret, size_t secretlen, char *seed, size_t seedlen, char *out, s
s
ize_t outlen) {
+static bool prf_xor(int nid, const char *secret, size_t secretlen, char *seed, size_t seedlen, char *out, size_t outlen) {
digest_t *digest = digest_open_by_nid(nid, -1);
if(!digest) {
digest_t *digest = digest_open_by_nid(nid, -1);
if(!digest) {
@@
-67,11
+67,13
@@
static bool prf_xor(int nid, const char *secret, size_t secretlen, char *seed, s
}
/* XOR the results of the outer HMAC into the out buffer */
}
/* XOR the results of the outer HMAC into the out buffer */
- for(int i = 0; i < len && i < outlen; i++) {
+ size_t i;
+
+ for(i = 0; i < len && i < outlen; i++) {
*out++ ^= hash[i];
}
*out++ ^= hash[i];
}
- outlen -=
len
;
+ outlen -=
i
;
}
digest_close(digest);
}
digest_close(digest);