summaryrefslogtreecommitdiff
path: root/tests/keylog-env.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/keylog-env.c')
-rw-r--r--tests/keylog-env.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/tests/keylog-env.c b/tests/keylog-env.c
index 5f5f74e176..bdc079f868 100644
--- a/tests/keylog-env.c
+++ b/tests/keylog-env.c
@@ -98,16 +98,6 @@ static void run(const char *filename, const char *prio,
const char **p;
int ret;
-#ifdef _WIN32
- {
- char buf[512];
- snprintf(buf, sizeof(buf), "SSLKEYLOGFILE=%s", filename);
- _putenv(buf);
- }
-#else
- setenv("SSLKEYLOGFILE", filename, 1);
-#endif
-
if (debug) {
gnutls_global_set_log_level(6);
gnutls_global_set_log_function(tls_log_func);
@@ -151,11 +141,10 @@ static void run(const char *filename, const char *prio,
void doit(void)
{
- char filename[TMPNAME_SIZE];
+ const char *filename = getenv("SSLKEYLOGFILE");
- assert(get_tmpname(filename)!=NULL);
+ assert(filename != NULL);
- remove(filename);
global_init();
run(filename,