Recognise clang -fsanitize options and translate them
[openssl.git] / test / md2test.c
index cda84697afcc9571f84d0109fb5fdfa6b93d1a55..47f55b75e39f8936e554cec50d85ae79a4c78b34 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 1995-2017 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
@@ -9,9 +9,12 @@
 
 #include <string.h>
 
-#include "../e_os.h"
+#include <openssl/provider.h>
+#include "internal/nelem.h"
 #include "testutil.h"
 
+static OSSL_PROVIDER *prov = NULL;
+
 #ifndef OPENSSL_NO_MD2
 # include <openssl/evp.h>
 # include <openssl/md2.h>
@@ -58,6 +61,17 @@ static int test_md2(int n)
 }
 #endif
 
+int global_init(void)
+{
+    prov = OSSL_PROVIDER_load(NULL, "legacy");
+
+    return prov != NULL;
+}
+void cleanup_tests(void)
+{
+    OSSL_PROVIDER_unload(prov);
+}
+
 int setup_tests(void)
 {
 #ifndef OPENSSL_NO_MD2