com php-src: fix test portability: ext/openssl/tests/001.phpt ext/openssl/tests/openssl_pkcs7_decrypt_basic.phpt
ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt ext/openssl/tests/openssl_pkcs7_sign_basic.phpt

From: Date: Fri, 17 Jun 2016 15:03:13 +0000
Subject: com php-src: fix test portability: ext/openssl/tests/001.phpt ext/openssl/tests/openssl_pkcs7_decrypt_basic.phpt
ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt ext/openssl/tests/openssl_pkcs7_sign_basic.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92416@lists.php.net to get a copy of this message
Commit: d6b649f6daff236c1652ee4364fc698adc671fcc Author: Anatol Belski <ab@php.net> Fri, 17 Jun 2016 17:03:13 +0200 Parents: f83a586d55deef93cc0b8aafc4592edeea1737a4 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d6b649f6daff236c1652ee4364fc698adc671fcc Log: fix test portability Changed paths: M ext/openssl/tests/001.phpt M ext/openssl/tests/openssl_pkcs7_decrypt_basic.phpt M ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt M ext/openssl/tests/openssl_pkcs7_sign_basic.phpt Diff: diff --git a/ext/openssl/tests/001.phpt b/ext/openssl/tests/001.phpt index 4ca9970..d62612b 100644 --- a/ext/openssl/tests/001.phpt +++ b/ext/openssl/tests/001.phpt @@ -24,7 +24,7 @@ if ($privkey === false) die("failed to create private key"); $passphrase = "banana"; -$key_file_name = tempnam("/tmp", "ssl"); +$key_file_name = tempnam(sys_get_temp_dir(), "ssl"); if ($key_file_name === false) die("failed to get a temporary filename!"); diff --git a/ext/openssl/tests/openssl_pkcs7_decrypt_basic.phpt b/ext/openssl/tests/openssl_pkcs7_decrypt_basic..phpt index 5589abb..27ca4d2 100644 --- a/ext/openssl/tests/openssl_pkcs7_decrypt_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs7_decrypt_basic..phpt @@ -6,10 +6,10 @@ openssl_pkcs7_decrypt() tests <?php $infile = dirname(__FILE__) . "/cert.crt"; $privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; -$encrypted = tempnam("/tmp", "ssl"); +$encrypted = tempnam(sys_get_temp_dir(), "ssl"); if ($encrypted === false) die("failed to get a temporary filename!"); -$outfile = tempnam("/tmp", "ssl"); +$outfile = tempnam(sys_get_temp_dir(), "ssl"); if ($outfile === false) { unlink($outfile); die("failed to get a temporary filename!"); diff --git a/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt b/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt index 5f74f97..09a7093 100644 --- a/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt @@ -5,10 +5,10 @@ openssl_pkcs7_encrypt() tests --FILE-- <?php $infile = dirname(__FILE__) . "/cert.crt"; -$outfile = tempnam("/tmp", "ssl"); +$outfile = tempnam(sys_get_temp_dir(), "ssl"); if ($outfile === false) die("failed to get a temporary filename!"); -$outfile2 = tempnam("/tmp", "ssl"); +$outfile2 = tempnam(sys_get_temp_dir(), "ssl"); if ($outfile2 === false) die("failed to get a temporary filename!"); diff --git a/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt b/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt index ac8edf1..e06553f 100644 --- a/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt @@ -5,7 +5,7 @@ openssl_pkcs7_sign() tests --FILE-- <?php $infile = dirname(__FILE__) . "/cert.crt"; -$outfile = tempnam("/tmp", "ssl"); +$outfile = tempnam(sys_get_temp_dir(), "ssl"); if ($outfile === false) { die("failed to get a temporary filename!"); }

« previous php.cvs (#92416) next »