X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fdh%2Fdh_kdf.c;h=2a01bfce46b7530d7901c7a3acb05407fee482ca;hp=f2f3d24158d3619a3c2801b24f74cd131dc8067f;hb=e38873f5ce93b41929d8128a533cca7d9e3f0f5a;hpb=aa6bb1352b1026b20a23b49da4efdcf171926eb0 diff --git a/crypto/dh/dh_kdf.c b/crypto/dh/dh_kdf.c index f2f3d24158..2a01bfce46 100644 --- a/crypto/dh/dh_kdf.c +++ b/crypto/dh/dh_kdf.c @@ -1,13 +1,13 @@ /* * Copyright 2013-2016 The OpenSSL Project Authors. All Rights Reserved. * - * Licensed under the OpenSSL license (the "License"). You may not use + * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ -#include +#include "e_os.h" #ifndef OPENSSL_NO_CMS #include @@ -117,8 +117,8 @@ int DH_KDF_X9_42(unsigned char *out, size_t outlen, goto err; for (i = 1;; i++) { unsigned char mtmp[EVP_MAX_MD_SIZE]; - EVP_DigestInit_ex(mctx, md, NULL); - if (!EVP_DigestUpdate(mctx, Z, Zlen)) + if (!EVP_DigestInit_ex(mctx, md, NULL) + || !EVP_DigestUpdate(mctx, Z, Zlen)) goto err; ctr[3] = i & 0xFF; ctr[2] = (i >> 8) & 0xFF;