X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fopenssl%2Fprf.c;h=648a157b4eba96d1aa2796fbf9de0212c181fadd;hp=df7f445c4940adda32449a944009cb8febda2a85;hb=3d75dbc0880484ff6d2f689a9b981def3cd75b5e;hpb=ff751903aa82bd6dd66a099f9c05dcdae9fc57f2 diff --git a/src/openssl/prf.c b/src/openssl/prf.c index df7f445c..648a157b 100644 --- a/src/openssl/prf.c +++ b/src/openssl/prf.c @@ -26,7 +26,7 @@ We use SHA512 and Whirlpool instead of MD5 and SHA1. */ -static bool prf_xor(int nid, char *secret, size_t secretlen, char *seed, size_t seedlen, char *out, ssize_t outlen) { +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; if(!digest_open_by_nid(&digest, nid, -1)) @@ -65,7 +65,7 @@ static bool prf_xor(int nid, char *secret, size_t secretlen, char *seed, size_t return true; } -bool prf(char *secret, size_t secretlen, char *seed, size_t seedlen, char *out, size_t outlen) { +bool prf(const char *secret, size_t secretlen, char *seed, size_t seedlen, char *out, size_t outlen) { /* Split secret in half, generate outlen bits with two different hash algorithms, and XOR the results. */