X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fopenssl%2Fprf.c;h=d87c5c680bcb27ac8d85ec381726a2ebd57d1dab;hb=f6e87ab476a0faf8b124ecaaa27f967d825e6457;hp=4f5a52befc65a98bbaf8338aa7dda5d4fe2a3d11;hpb=214060ef20499332b0369030b664a8e239518661;p=tinc diff --git a/src/openssl/prf.c b/src/openssl/prf.c index 4f5a52be..d87c5c68 100644 --- a/src/openssl/prf.c +++ b/src/openssl/prf.c @@ -32,8 +32,9 @@ static bool prf_xor(int nid, const char *secret, size_t secretlen, char *seed, size_t seedlen, char *out, ssize_t outlen) { digest_t *digest = digest_open_by_nid(nid, -1); - if(!digest) + if(!digest) { return false; + } if(!digest_set_key(digest, secret, secretlen)) { digest_close(digest); @@ -66,8 +67,9 @@ 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 */ - for(int i = 0; i < len && i < outlen; i++) + for(int i = 0; i < len && i < outlen; i++) { *out++ ^= hash[i]; + } outlen -= len; }