diff options
-rw-r--r-- | ext/openssl/tests/001.phpt | 6 | ||||
-rw-r--r-- | ext/openssl/tests/bug25614.phpt | 5 | ||||
-rw-r--r-- | ext/openssl/tests/skipif.inc | 11 |
3 files changed, 8 insertions, 14 deletions
diff --git a/ext/openssl/tests/001.phpt b/ext/openssl/tests/001.phpt index 9987c688b9..4ca9970bca 100644 --- a/ext/openssl/tests/001.phpt +++ b/ext/openssl/tests/001.phpt @@ -1,8 +1,10 @@ --TEST-- OpenSSL private key functions --SKIPIF-- -<?php // vim600:syn=php -include('skipif.inc'); ?> +<?php +if (!extension_loaded("openssl")) die("skip"); +if (!@openssl_pkey_new()) die("skip cannot create private key"); +?> --FILE-- <?php echo "Creating private key\n"; diff --git a/ext/openssl/tests/bug25614.phpt b/ext/openssl/tests/bug25614.phpt index dc8b23ffd6..a43130708b 100644 --- a/ext/openssl/tests/bug25614.phpt +++ b/ext/openssl/tests/bug25614.phpt @@ -1,7 +1,10 @@ --TEST-- openssl: get public key from generated private key --SKIPIF-- -<?php if (!extension_loaded("openssl")) print "skip"; ?> +<?php +if (!extension_loaded("openssl")) die("skip"); +if (!@openssl_pkey_new()) die("skip cannot create private key"); +?> --FILE-- <?php $priv = openssl_pkey_new(); diff --git a/ext/openssl/tests/skipif.inc b/ext/openssl/tests/skipif.inc deleted file mode 100644 index 21e947d0b2..0000000000 --- a/ext/openssl/tests/skipif.inc +++ /dev/null @@ -1,11 +0,0 @@ -<?php -// This script prints "skip" if condition does not meet. - -if (!extension_loaded("openssl") && ini_get("enable_dl")) { - $dlext = (substr(PHP_OS, 0, 3) == "WIN") ? ".dll" : ".so"; - @dl("openssl$dlext"); -} -if (!extension_loaded("openssl")) { - die("skip\n"); -} -?> |