]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - test/testutil/driver.c
Extend tests of SSL_check_chain()
[thirdparty/openssl.git] / test / testutil / driver.c
index 7a67a0587cd7f938ae6edb857fc8532d2b6b6df9..2ced5634bc4e88880e9b245452b5066bed664a93 100644 (file)
@@ -439,3 +439,21 @@ char *glue_strings(const char *list[], size_t *out_len)
     return ret;
 }
 
+char *test_mk_file_path(const char *dir, const char *file)
+{
+# ifndef OPENSSL_SYS_VMS
+    const char *sep = "/";
+# else
+    const char *sep = "";
+# endif
+    size_t len = strlen(dir) + strlen(sep) + strlen(file) + 1;
+    char *full_file = OPENSSL_zalloc(len);
+
+    if (full_file != NULL) {
+        OPENSSL_strlcpy(full_file, dir, len);
+        OPENSSL_strlcat(full_file, sep, len);
+        OPENSSL_strlcat(full_file, file, len);
+    }
+
+    return full_file;
+}