Deprecate the flags that switch off constant time
[openssl.git] / test / sha512t.c
index dff19aaa5701fda7edaa8a4013f860f872a24d2e..e741b27fdbc0e1a2fda2b6e30000c9da2d283bcd 100644 (file)
@@ -1,8 +1,12 @@
-/* crypto/sha/sha512t.c */
-/* ====================================================================
- * Copyright (c) 2004 The OpenSSL Project.  All rights reserved.
- * ====================================================================
+/*
+ * Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the OpenSSL license (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 <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -113,7 +117,7 @@ int main(int argc, char **argv)
         fprintf(stdout, ".");
     fflush(stdout);
 
-    evp = EVP_MD_CTX_create();
+    evp = EVP_MD_CTX_new();
     if (evp == NULL) {
         fflush(stdout);
         fprintf(stderr, "\nTEST 3 of 3 failed. (malloc failure)\n");
@@ -132,7 +136,7 @@ int main(int argc, char **argv)
                          "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa",
                          (1000000 - i) < 288 ? 1000000 - i : 288);
     EVP_DigestFinal_ex(evp, md, NULL);
-    EVP_MD_CTX_init(evp);
+    EVP_MD_CTX_reset(evp);
 
     if (memcmp(md, app_c3, sizeof(app_c3))) {
         fflush(stdout);
@@ -174,7 +178,7 @@ int main(int argc, char **argv)
                          "aaaaaaaa" "aaaaaaaa" "aaaaaaaa" "aaaaaaaa",
                          (1000000 - i) < 64 ? 1000000 - i : 64);
     EVP_DigestFinal_ex(evp, md, NULL);
-    EVP_MD_CTX_destroy(evp);
+    EVP_MD_CTX_free(evp);
 
     if (memcmp(md, app_d3, sizeof(app_d3))) {
         fflush(stdout);