test: add a shim function for the apps's opt_legacy_okay() function
authorPauli <pauli@openssl.org>
Thu, 8 Jul 2021 00:55:01 +0000 (10:55 +1000)
committerPauli <pauli@openssl.org>
Sun, 11 Jul 2021 23:13:20 +0000 (09:13 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16022)

test/testutil/apps_shims.c

index ef5e266b250d17de2a150de308ddd7a69ea20ccc..53d851ffda3bdba8874c52b2dabb78b051d3e655 100644 (file)
@@ -28,3 +28,29 @@ void *app_malloc(size_t sz, const char *what)
     }
     return vp;
 }
+
+/* shim to prevent sucking in too much from apps */
+
+int opt_legacy_okay(void)
+{
+    return 1;
+}
+
+/*
+ * These three functions are defined here so that they don't need to come from
+ * the apps source code and pull in a lot of additional things.
+ */
+int opt_provider_option_given(void)
+{
+    return 0;
+}
+
+const char *app_get0_propq(void)
+{
+    return NULL;
+}
+
+OSSL_LIB_CTX *app_get0_libctx(void)
+{
+    return NULL;
+}