"cause random crashes on SSL requests"
# endif
# elif defined(HAVE_CURL_GNUTLS)
-# if defined(HAVE_GCRYPT_H)
-# define PHP_CURL_NEED_GNUTLS_TSL
-# include <gcrypt.h>
-# else
-# warning \
- "libcurl was compiled with GnuTLS support, but configure could not find " \
- "gcrypt.h; thus no SSL crypto locking callbacks will be set, which may " \
- "cause random crashes on SSL requests"
-# endif
+ /* Modern versions of GnuTLS use the nette backend rather than gcrypt, so there
+ * is nothing to do here anymore. */
# else
# warning \
"libcurl was compiled with SSL support, but configure could not determine which" \
#endif
/* }}} */
-#ifdef PHP_CURL_NEED_GNUTLS_TSL /* {{{ */
-static int php_curl_ssl_mutex_create(void **m)
-{
- if (*((MUTEX_T *) m) = tsrm_mutex_alloc()) {
- return SUCCESS;
- } else {
- return FAILURE;
- }
-}
-
-static int php_curl_ssl_mutex_destroy(void **m)
-{
- tsrm_mutex_free(*((MUTEX_T *) m));
- return SUCCESS;
-}
-
-static int php_curl_ssl_mutex_lock(void **m)
-{
- return tsrm_mutex_lock(*((MUTEX_T *) m));
-}
-
-static int php_curl_ssl_mutex_unlock(void **m)
-{
- return tsrm_mutex_unlock(*((MUTEX_T *) m));
-}
-
-static struct gcry_thread_cbs php_curl_gnutls_tsl = {
- GCRY_THREAD_OPTION_USER,
- NULL,
- php_curl_ssl_mutex_create,
- php_curl_ssl_mutex_destroy,
- php_curl_ssl_mutex_lock,
- php_curl_ssl_mutex_unlock
-};
-#endif
-/* }}} */
-
static void _php_curl_close_ex(php_curl *ch);
static void _php_curl_close(zend_resource *rsrc);
CRYPTO_set_locking_callback(php_curl_ssl_lock);
}
#endif
-#ifdef PHP_CURL_NEED_GNUTLS_TSL
- gcry_control(GCRYCTL_SET_THREAD_CBS, &php_curl_gnutls_tsl);
-#endif
if (curl_global_init(CURL_GLOBAL_DEFAULT) != CURLE_OK) {
return FAILURE;