aboutsummaryrefslogtreecommitdiff
path: root/crypto/ecdh/ecdhtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ecdh/ecdhtest.c')
-rw-r--r--crypto/ecdh/ecdhtest.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/ecdh/ecdhtest.c b/crypto/ecdh/ecdhtest.c
index f9162b7..2a6baf4 100644
--- a/crypto/ecdh/ecdhtest.c
+++ b/crypto/ecdh/ecdhtest.c
@@ -105,11 +105,13 @@ static const char rnd_seed[] = "string to make the random number generator think
static const int KDF1_SHA1_len = 20;
-static void *KDF1_SHA1(void *in, size_t inlen, void *out, size_t outlen)
+static void *KDF1_SHA1(const void *in, size_t inlen, void *out, size_t *outlen)
{
#ifndef OPENSSL_NO_SHA
- if (outlen != SHA_DIGEST_LENGTH)
+ if (*outlen < SHA_DIGEST_LENGTH)
return NULL;
+ else
+ *outlen = SHA_DIGEST_LENGTH;
return SHA1(in, inlen, out);
#else
return NULL;