]> git.pld-linux.org Git - packages/php.git/blame - php-openssl-huge-hack.patch
This commit was manufactured by cvs2git to create branch 'RA-
[packages/php.git] / php-openssl-huge-hack.patch
CommitLineData
44606c9b 1diff -urN php-5.1.2.org/ext/curl/interface.c php-5.1.2/ext/curl/interface.c
2--- php-5.1.2.org/ext/curl/interface.c 2006-01-05 19:07:55.000000000 +0100
3+++ php-5.1.2/ext/curl/interface.c 2006-01-25 14:42:08.980963000 +0100
4@@ -476,6 +476,8 @@
5 }
6 /* }}} */
7
8+static void php_restore_callbacks(void);
9+
10 /* {{{ PHP_MSHUTDOWN_FUNCTION
11 */
12 PHP_MSHUTDOWN_FUNCTION(curl)
13@@ -486,6 +488,7 @@
14 php_unregister_url_stream_wrapper("ftp" TSRMLS_CC);
15 php_unregister_url_stream_wrapper("ldap" TSRMLS_CC);
16 #endif
17+ php_restore_callbacks();
18 curl_global_cleanup();
19 #ifdef PHP_CURL_NEED_SSL_TSL
20 php_curl_ssl_cleanup();
21@@ -1621,9 +1624,8 @@
22 for (i = 0; i < c; ++i) {
23 php_curl_openssl_tsl[i] = tsrm_mutex_alloc();
24 }
25-
26- CRYPTO_set_id_callback(php_curl_ssl_id);
27- CRYPTO_set_locking_callback(php_curl_ssl_lock);
28+
29+ php_restore_callbacks();
30 }
31
32 static inline void php_curl_ssl_cleanup(void)
33@@ -1645,6 +1647,17 @@
34 #endif /* PHP_CURL_NEED_OPENSSL_TSL */
35 /* }}} */
36
37+static void php_restore_callbacks(void) {
38+#ifdef PHP_CURL_NEED_OPENSSL_TSL
39+ CRYPTO_set_id_callback(php_curl_ssl_id);
40+ CRYPTO_set_locking_callback(php_curl_ssl_lock);
41+#else
42+ CRYPTO_set_id_callback(NULL);
43+ CRYPTO_set_locking_callback(NULL);
44+#endif
45+}
46+
47+
48 #ifdef PHP_CURL_NEED_GNUTLS_TSL
49 /* {{{ */
50 static int php_curl_ssl_mutex_create(void **m)
This page took 0.08022 seconds and 4 git commands to generate.