summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/tests/test-openssl.c3
-rw-r--r--tools/tests/test-pem.c3
-rw-r--r--tools/tests/test-save.c3
-rw-r--r--tools/tests/test-x509.c3
-rw-r--r--tools/tool.c3
5 files changed, 10 insertions, 5 deletions
diff --git a/tools/tests/test-openssl.c b/tools/tests/test-openssl.c
index 286b4e9..215e0da 100644
--- a/tools/tests/test-openssl.c
+++ b/tools/tests/test-openssl.c
@@ -43,6 +43,7 @@
#include "extract.h"
#include "message.h"
#include "mock.h"
+#include "path.h"
#include "pkcs11.h"
#include "pkcs11x.h"
#include "oid.h"
@@ -78,7 +79,7 @@ setup (CuTest *tc)
p11_extract_info_init (&test.ex);
- test.directory = strdup ("/tmp/test-extract.XXXXXX");
+ test.directory = p11_path_expand ("$TEMP/test-extract.XXXXXX");
if (!mkdtemp (test.directory))
assert_not_reached ();
}
diff --git a/tools/tests/test-pem.c b/tools/tests/test-pem.c
index be79279..dc1cb08 100644
--- a/tools/tests/test-pem.c
+++ b/tools/tests/test-pem.c
@@ -42,6 +42,7 @@
#include "extract.h"
#include "message.h"
#include "mock.h"
+#include "path.h"
#include "pkcs11.h"
#include "pkcs11x.h"
#include "oid.h"
@@ -75,7 +76,7 @@ setup (CuTest *tc)
p11_extract_info_init (&test.ex);
- test.directory = strdup ("/tmp/test-extract.XXXXXX");
+ test.directory = p11_path_expand ("$TEMP/test-extract.XXXXXX");
if (!mkdtemp (test.directory))
assert_not_reached ();
}
diff --git a/tools/tests/test-save.c b/tools/tests/test-save.c
index d686bd6..b739c21 100644
--- a/tools/tests/test-save.c
+++ b/tools/tests/test-save.c
@@ -40,6 +40,7 @@
#include "debug.h"
#include "dict.h"
#include "message.h"
+#include "path.h"
#include "save.h"
#include "test.h"
@@ -62,7 +63,7 @@ struct {
static void
setup (CuTest *tc)
{
- test.directory = strdup ("/tmp/test-extract.XXXXXX");
+ test.directory = p11_path_expand ("$TEMP/test-extract.XXXXXX");
if (!mkdtemp (test.directory))
CuFail (tc, "mkdtemp() failed");
}
diff --git a/tools/tests/test-x509.c b/tools/tests/test-x509.c
index 138e6b7..e952e53 100644
--- a/tools/tests/test-x509.c
+++ b/tools/tests/test-x509.c
@@ -42,6 +42,7 @@
#include "extract.h"
#include "message.h"
#include "mock.h"
+#include "path.h"
#include "pkcs11.h"
#include "pkcs11x.h"
#include "oid.h"
@@ -75,7 +76,7 @@ setup (CuTest *tc)
p11_extract_info_init (&test.ex);
- test.directory = strdup ("/tmp/test-extract.XXXXXX");
+ test.directory = p11_path_expand ("$TEMP/test-extract.XXXXXX");
if (!mkdtemp (test.directory))
CuFail (tc, "mkdtemp() failed");
}
diff --git a/tools/tool.c b/tools/tool.c
index 9ec41a4..961890d 100644
--- a/tools/tool.c
+++ b/tools/tool.c
@@ -38,6 +38,7 @@
#include "compat.h"
#include "debug.h"
#include "message.h"
+#include "path.h"
#include "p11-kit.h"
#include <assert.h>
@@ -201,7 +202,7 @@ exec_external (const char *command,
/* Add our libexec directory to the path */
path = getenv ("PATH");
- if (!asprintf (&env, "PATH=%s%s%s", path ? path : "", path ? ":" : "", PKGDATADIR))
+ if (!asprintf (&env, "PATH=%s%s%s", path ? path : "", path ? P11_PATH_SEP : "", PKGDATADIR))
return_if_reached ();
putenv (env);