+ HTTP_CURL_OPT(CONNECTTIMEOUT, Z_LVAL_P(zoption));
+ }
+
+ /* ssl */
+ if (zoption = http_curl_getopt1(options, "ssl", IS_ARRAY)) {
+ long idx;
+ char *key = NULL;
+ zval **param;
+
+#define HTTP_CURL_OPT_STRING(keyname) HTTP_CURL_OPT_STRING_EX(keyname, keyname)
+#define HTTP_CURL_OPT_SSL_STRING(keyname) HTTP_CURL_OPT_STRING_EX(keyname, SSL##keyname)
+#define HTTP_CURL_OPT_SSL_STRING_(keyname) HTTP_CURL_OPT_STRING_EX(keyname, SSL_##keyname)
+#define HTTP_CURL_OPT_STRING_EX(keyname, optname) \
+ if (!strcasecmp(key, #keyname)) { \
+ convert_to_string_ex(param); \
+ HTTP_CURL_OPT(optname, Z_STRVAL_PP(param)); \
+ key = NULL; \
+ continue; \
+ }
+#define HTTP_CURL_OPT_LONG(keyname) HTTP_OPT_SSL_LONG_EX(keyname, keyname)
+#define HTTP_CURL_OPT_SSL_LONG(keyname) HTTP_CURL_OPT_LONG_EX(keyname, SSL##keyname)
+#define HTTP_CURL_OPT_SSL_LONG_(keyname) HTTP_CURL_OPT_LONG_EX(keyname, SSL_##keyname)
+#define HTTP_CURL_OPT_LONG_EX(keyname, optname) \
+ if (!strcasecmp(key, #keyname)) { \
+ convert_to_long_ex(param); \
+ HTTP_CURL_OPT(optname, Z_LVAL_PP(param)); \
+ key = NULL; \
+ continue; \
+ }
+
+ FOREACH_KEYVAL(zoption, key, idx, param) {
+ if (key) {
+ HTTP_CURL_OPT_SSL_STRING(CERT);
+#if LIBCURL_VERSION_NUM >= 0x070903
+ HTTP_CURL_OPT_SSL_STRING(CERTTYPE);
+#endif
+ HTTP_CURL_OPT_SSL_STRING(CERTPASSWD);
+
+ HTTP_CURL_OPT_SSL_STRING(KEY);
+ HTTP_CURL_OPT_SSL_STRING(KEYTYPE);
+ HTTP_CURL_OPT_SSL_STRING(KEYPASSWD);
+
+ HTTP_CURL_OPT_SSL_STRING(ENGINE);
+ HTTP_CURL_OPT_SSL_LONG(VERSION);
+
+ HTTP_CURL_OPT_SSL_LONG_(VERIFYPEER);
+ HTTP_CURL_OPT_SSL_LONG_(VERIFYHOST);
+ HTTP_CURL_OPT_SSL_STRING_(CIPHER_LIST);
+
+
+ HTTP_CURL_OPT_STRING(CAINFO);
+#if LIBCURL_VERSION_NUM >= 0x070908
+ HTTP_CURL_OPT_STRING(CAPATH);
+#endif
+ HTTP_CURL_OPT_STRING(RANDOM_FILE);
+ HTTP_CURL_OPT_STRING(EGDSOCKET);
+
+ /* reset key */
+ key = NULL;
+ }
+ }