diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-05-18 22:20:47 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-05-18 22:20:47 +0200 |
commit | 97821e0034af8d07c867b2afceb844bc945ffd21 (patch) | |
tree | 42bcd5025b7670f449e1defbfb2b34c464108412 /tests | |
parent | 4d434acf5af21b6fcef4116b6fa049b00cd55975 (diff) | |
download | gnutls-97821e0034af8d07c867b2afceb844bc945ffd21.tar.gz |
tests: use _putenv() for setting environment on windows
Diffstat (limited to 'tests')
-rw-r--r-- | tests/keylog-env.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/keylog-env.c b/tests/keylog-env.c index 4556c58491..2e2c7ea62c 100644 --- a/tests/keylog-env.c +++ b/tests/keylog-env.c @@ -99,7 +99,15 @@ void doit(void) exit(1); } +#ifdef _WIN32 + { + char buf[512]; + snprintf(buf, sizeof(buf), "GNUTLS_KEYLOGFILE=%s", filename); + _putenv(buf); + } +#else setenv("GNUTLS_KEYLOGFILE", filename, 1); +#endif test_cli_serv(x509_cred, "NORMAL", &ca3_cert, "localhost"); if (access(filename, R_OK) != 0) { |