diff options
Diffstat (limited to 'ext/openssl')
| -rw-r--r-- | ext/openssl/openssl.c | 11 | ||||
| -rw-r--r-- | ext/openssl/php_openssl.h | 8 | ||||
| -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 | ||||
| -rw-r--r-- | ext/openssl/xp_ssl.c | 8 |
6 files changed, 22 insertions, 27 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index cc3f4e08d..9d306ea86 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | + | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: openssl.c,v 1.98.2.1 2005/08/18 13:34:37 sniper Exp $ */ +/* $Id: openssl.c,v 1.98.2.4 2006/01/01 12:50:10 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -79,7 +79,7 @@ enum php_openssl_cipher_type { /* {{{ openssl_functions[] */ -function_entry openssl_functions[] = { +zend_function_entry openssl_functions[] = { /* public/private key functions */ PHP_FE(openssl_pkey_free, NULL) PHP_FE(openssl_pkey_new, NULL) @@ -584,6 +584,7 @@ PHP_MINIT_FUNCTION(openssl) le_x509 = zend_register_list_destructors_ex(php_x509_free, NULL, "OpenSSL X.509", module_number); le_csr = zend_register_list_destructors_ex(php_csr_free, NULL, "OpenSSL X.509 CSR", module_number); + SSL_library_init(); OpenSSL_add_all_ciphers(); OpenSSL_add_all_digests(); OpenSSL_add_all_algorithms(); diff --git a/ext/openssl/php_openssl.h b/ext/openssl/php_openssl.h index 15820a61c..1204f3fc8 100644 --- a/ext/openssl/php_openssl.h +++ b/ext/openssl/php_openssl.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | + | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_openssl.h,v 1.16 2005/08/03 14:07:36 sniper Exp $ */ +/* $Id: php_openssl.h,v 1.16.2.1 2006/01/01 12:50:10 sniper Exp $ */ #ifndef PHP_OPENSSL_H #define PHP_OPENSSL_H diff --git a/ext/openssl/tests/001.phpt b/ext/openssl/tests/001.phpt index 9987c688b..4ca9970bc 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 dc8b23ffd..a43130708 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 21e947d0b..000000000 --- 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"); -} -?> diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index f291eea85..852b17a7e 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | + | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xp_ssl.c,v 1.22.2.1 2005/09/07 15:36:23 dmitry Exp $ */ +/* $Id: xp_ssl.c,v 1.22.2.2 2006/01/01 12:50:10 sniper Exp $ */ #include "php.h" #include "ext/standard/file.h" |
