diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2013-08-01 15:48:44 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2013-08-05 15:45:00 +0100 |
commit | 3f6b6f0b8cbd7173b6c007b07caa6ec34cda08c5 (patch) | |
tree | 7d6f6c817db96e1d19521f45e576662666d8e3df | |
parent | e61f5d55bc0072e75023be8971ae6e849643f466 (diff) | |
download | openssl-new-3f6b6f0b8cbd7173b6c007b07caa6ec34cda08c5.tar.gz |
Minor optimisation to KDF algorithm.
Don't need to use temporary buffer if remaining length equals digest length.
-rw-r--r-- | crypto/ecdh/ech_kdf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/ecdh/ech_kdf.c b/crypto/ecdh/ech_kdf.c index 84bf108b90..848b91745f 100644 --- a/crypto/ecdh/ech_kdf.c +++ b/crypto/ecdh/ech_kdf.c @@ -90,7 +90,7 @@ int ECDH_KDF_X9_62(unsigned char *out, size_t outlen, goto err; if (!EVP_DigestUpdate(&mctx, sinfo, sinfolen)) goto err; - if (outlen > mdlen) + if (outlen >= mdlen) { if (!EVP_DigestFinal(&mctx, out, NULL)) goto err; |