Configure: change all references to INSTALL to INSTALL.md
[openssl.git] / test / provider_test.c
index 250eea39ecdd76bc033227b4c435aa4152a59417..acb9f2000ea5e9e676fe734cfe29fab23d020f76 100644 (file)
 extern OSSL_provider_init_fn PROVIDER_INIT_FUNCTION_NAME;
 
 static char buf[256];
-static size_t buf_l = 0;
 static OSSL_PARAM greeting_request[] = {
-    { "greeting", OSSL_PARAM_UTF8_STRING, buf, sizeof(buf), &buf_l },
-    { NULL, 0, NULL, 0, NULL }
+    { "greeting", OSSL_PARAM_UTF8_STRING, buf, sizeof(buf) },
+    { NULL, 0, NULL, 0, 0 }
 };
 
 static int test_provider(const char *name)
@@ -26,9 +25,9 @@ static int test_provider(const char *name)
     const char *greeting = NULL;
     char expected_greeting[256];
 
-    snprintf(expected_greeting, sizeof(expected_greeting),
-             "Hello OpenSSL %.20s, greetings from %s!",
-             OPENSSL_VERSION_STR, name);
+    BIO_snprintf(expected_greeting, sizeof(expected_greeting),
+                 "Hello OpenSSL %.20s, greetings from %s!",
+                 OPENSSL_VERSION_STR, name);
 
     return
         TEST_ptr(prov = OSSL_PROVIDER_load(NULL, name))
@@ -45,11 +44,11 @@ static int test_builtin_provider(void)
 
     return
         TEST_true(OSSL_PROVIDER_add_builtin(NULL, name,
-                                           PROVIDER_INIT_FUNCTION_NAME))
+                                            PROVIDER_INIT_FUNCTION_NAME))
         && test_provider(name);
 }
 
-#ifndef OPENSSL_NO_SHARED
+#ifndef NO_PROVIDER_MODULE
 static int test_loaded_provider(void)
 {
     const char *name = "p_test";
@@ -61,7 +60,7 @@ static int test_loaded_provider(void)
 int setup_tests(void)
 {
     ADD_TEST(test_builtin_provider);
-#ifndef OPENSSL_NO_SHARED
+#ifndef NO_PROVIDER_MODULE
     ADD_TEST(test_loaded_provider);
 #endif
     return 1;