summaryrefslogtreecommitdiff
path: root/ext/openssl/tests
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2002-11-26 01:38:49 +0000
committerSVN Migration <svn@php.net>2002-11-26 01:38:49 +0000
commit83fc7fc84fc2b439da0cc4e08cb511d9753dbcca (patch)
treee884842697b6fca255c96f627a4dbd17f0a7d97a /ext/openssl/tests
parent693204265e3970c58932aef21fb4d25e3f1ea1fd (diff)
downloadphp-git-RELEASE_1_0b2.tar.gz
This commit was manufactured by cvs2svn to create tag 'RELEASE_1_0b2'.RELEASE_1_0b2
Diffstat (limited to 'ext/openssl/tests')
-rw-r--r--ext/openssl/tests/001.phpt65
-rw-r--r--ext/openssl/tests/skipif.inc11
2 files changed, 0 insertions, 76 deletions
diff --git a/ext/openssl/tests/001.phpt b/ext/openssl/tests/001.phpt
deleted file mode 100644
index b3f5602f7f..0000000000
--- a/ext/openssl/tests/001.phpt
+++ /dev/null
@@ -1,65 +0,0 @@
---TEST--
-OpenSSL private key functions
---SKIPIF--
-<?php // vim600:syn=php
-include('skipif.inc'); ?>
---POST--
---GET--
---FILE--
-<?php
-echo "Creating private key\n";
-
-$privkey = openssl_pkey_new();
-
-if ($privkey === false)
- die("failed to create private key");
-
-$passphrase = "banana";
-$key_file_name = tempnam("/tmp", "ssl");
-if ($key_file_name === false)
- die("failed to get a temporary filename!");
-
-echo "Export key to file\n";
-
-openssl_pkey_export_to_file($privkey, $key_file_name, $passphrase) or die("failed to export to file $key_file_name");
-
-echo "Load key from file - array syntax\n";
-
-$loaded_key = openssl_pkey_get_private(array("file://$key_file_name", $passphrase));
-
-if ($loaded_key === false)
- die("failed to load key using array syntax");
-
-openssl_pkey_free($loaded_key);
-
-echo "Load key using direct syntax\n";
-
-$loaded_key = openssl_pkey_get_private("file://$key_file_name", $passphrase);
-
-if ($loaded_key === false)
- die("failed to load key using direct syntax");
-
-openssl_pkey_free($loaded_key);
-
-echo "Load key manually and use string syntax\n";
-
-$key_content = file_get_contents($key_file_name);
-$loaded_key = openssl_pkey_get_private($key_content, $passphrase);
-
-if ($loaded_key === false)
- die("failed to load key using string syntax");
-
-openssl_pkey_free($loaded_key);
-
-echo "OK!\n";
-
-@unlink($key_file_name);
-
-?>
---EXPECT--
-Creating private key
-Export key to file
-Load key from file - array syntax
-Load key using direct syntax
-Load key manually and use string syntax
-OK!
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");
-}
-?>