summaryrefslogtreecommitdiffstats
path: root/ssl/s3_clnt.c
diff options
context:
space:
mode:
authorNils Larsch <nils@openssl.org>2005-04-23 10:11:16 +0000
committerNils Larsch <nils@openssl.org>2005-04-23 10:11:16 +0000
commit965a1cb92e4774ca2f74dad9e060aa7b2d80c77d (patch)
tree3cf53ce7ddb5caed2751f53db45b9e4ef2a2aa55 /ssl/s3_clnt.c
parente9ad6665a517652e8da6da5165f72c7ab8e9c34f (diff)
change prototype of the ecdh KDF: make input parameter const and the outlen argument more flexible
Diffstat (limited to 'ssl/s3_clnt.c')
-rw-r--r--ssl/s3_clnt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index 54598f0f8b..e6a83fb5b6 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -1579,11 +1579,13 @@ static int ssl3_get_server_done(SSL *s)
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;