summaryrefslogtreecommitdiffstats
path: root/test/md2test.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-04-05 10:47:05 +0100
committerMatt Caswell <matt@openssl.org>2019-04-09 10:24:43 +0100
commitd030892312a2e7076511205e7fe1a5eae98e5102 (patch)
treec1fbf493c6fed67af94fbf5384e88f5758c2ac59 /test/md2test.c
parentdc46e3dde58c781b5f29942d787a2c8765ba5514 (diff)
Add a legacy provider and put MD2 in it
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8541)
Diffstat (limited to 'test/md2test.c')
-rw-r--r--test/md2test.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/md2test.c b/test/md2test.c
index 3491e13e10..47f55b75e3 100644
--- a/test/md2test.c
+++ b/test/md2test.c
@@ -9,9 +9,12 @@
#include <string.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