Commit 3f6b6f0b authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Minor optimisation to KDF algorithm.

Don't need to use temporary buffer if remaining length equals digest length.
parent e61f5d55
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;