com php-src: don't depend on ext/openssl for ftp ssl support: ext/ftp/php_ftp.c
| From: | Anatol Belski | Date: | Wed, 11 Mar 2015 22:58:59 +0000 |
| Subject: | com php-src: don't depend on ext/openssl for ftp ssl support: ext/ftp/php_ftp.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85466@lists.php.net to get a copy of this message | ||
Commit: d2ee0840d214de5b9df98d3cf65d798100c78328
Author: Anatol Belski <ab@php.net> Wed, 11 Mar 2015 23:58:59 +0100
Parents: 4ee0395a4ab230fb5b3274ee9476cbcc00ccb872
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d2ee0840d214de5b9df98d3cf65d798100c78328
Log:
don't depend on ext/openssl for ftp ssl support
instead just link against the openssl and init manually, that's
more flexible
Changed paths:
M ext/ftp/php_ftp.c
Diff:
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c
index 1a63046..2701891 100644
--- a/ext/ftp/php_ftp.c
+++ b/ext/ftp/php_ftp.c
@@ -281,22 +281,10 @@ const zend_function_entry php_ftp_functions[] = {
PHP_FE_END
};
-#ifdef HAVE_FTP_SSL
-/* {{{ ftp_deps */
-static const zend_module_dep ftp_deps[] = {
- ZEND_MOD_REQUIRED("openssl")
- {NULL, NULL, NULL}
-};/*}}}*/
-#endif
-
zend_module_entry php_ftp_module_entry = {
STANDARD_MODULE_HEADER_EX,
NULL,
-#ifdef HAVE_FTP_SSL
- ftp_deps,
-#else
NULL,
-#endif
"ftp",
php_ftp_functions,
PHP_MINIT(ftp),
@@ -321,6 +309,15 @@ static void ftp_destructor_ftpbuf(zend_resource *rsrc)
PHP_MINIT_FUNCTION(ftp)
{
+#ifdef HAVE_FTP_SSL
+ SSL_library_init();
+ OpenSSL_add_all_ciphers();
+ OpenSSL_add_all_digests();
+ OpenSSL_add_all_algorithms();
+
+ SSL_load_error_strings();
+#endif
+
le_ftpbuf = zend_register_list_destructors_ex(ftp_destructor_ftpbuf, NULL, le_ftpbuf_name,
module_number);
REGISTER_LONG_CONSTANT("FTP_ASCII", FTPTYPE_ASCII, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("FTP_TEXT", FTPTYPE_ASCII, CONST_PERSISTENT | CONST_CS);