diff options
author | Nils Larsch <nils@openssl.org> | 2005-04-23 10:11:16 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2005-04-23 10:11:16 +0000 |
commit | 965a1cb92e4774ca2f74dad9e060aa7b2d80c77d (patch) | |
tree | 3cf53ce7ddb5caed2751f53db45b9e4ef2a2aa55 /ssl | |
parent | e9ad6665a517652e8da6da5165f72c7ab8e9c34f (diff) |
change prototype of the ecdh KDF: make input parameter const and the outlen argument more flexible
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/s3_clnt.c | 6 | ||||
-rw-r--r-- | ssl/s3_srvr.c | 6 |
2 files changed, 8 insertions, 4 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; diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 4d196371ec..62a6cf7f96 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -1588,11 +1588,13 @@ err: 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; |