Move poly1305_asm_src file information to build.info files
[openssl.git] / crypto / dh / dh_kdf.c
index f2f3d24158d3619a3c2801b24f74cd131dc8067f..2a01bfce46b7530d7901c7a3acb05407fee482ca 100644 (file)
@@ -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 <e_os.h>
+#include "e_os.h"
 
 #ifndef OPENSSL_NO_CMS
 #include <string.h>
@@ -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;