summaryrefslogtreecommitdiff
path: root/ext/curl/interface.c
diff options
context:
space:
mode:
authorPierrick Charron <pierrick@php.net>2016-07-27 23:36:22 -0400
committerPierrick Charron <pierrick@php.net>2016-07-27 23:36:22 -0400
commitbf37b97d9cedccf01f6b1cfe9ee61102ac14e2a0 (patch)
tree843dd42a9c957725eac14809771ccb25ef0b2046 /ext/curl/interface.c
parent1b681880c148a360be6e8835ed974ad149ebf32c (diff)
parent30a5ed3a7979f1b865f6633cb16b5f3e78371df1 (diff)
downloadphp-git-bf37b97d9cedccf01f6b1cfe9ee61102ac14e2a0.tar.gz
Merge branch 'PHP-5.6' into PHP-7.0
Conflicts: ext/curl/interface.c
Diffstat (limited to 'ext/curl/interface.c')
-rw-r--r--ext/curl/interface.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 648d8ce607..be15785cd0 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -1876,38 +1876,6 @@ static php_curl *alloc_curl_handle()
/* }}} */
#if LIBCURL_VERSION_NUM >= 0x071301 /* Available since 7.19.1 */
-/* {{{ split_certinfo
- */
-static void split_certinfo(char *string, zval *hash)
-{
- char *org = estrdup(string);
- char *s = org;
- char *split;
-
- if(org) {
- do {
- char *key;
- char *val;
- char *tmp;
-
- split = strstr(s, "; ");
- if(split)
- *split = '\0';
-
- key = s;
- tmp = memchr(key, '=', 64);
- if(tmp) {
- *tmp = '\0';
- val = tmp+1;
- add_assoc_string(hash, key, val);
- }
- s = split+2;
- } while(split);
- efree(org);
- }
-}
-/* }}} */
-
/* {{{ create_certinfo
*/
static void create_certinfo(struct curl_certinfo *ci, zval *listcode)
@@ -1930,16 +1898,7 @@ static void create_certinfo(struct curl_certinfo *ci, zval *listcode)
if(tmp) {
*tmp = '\0';
len = strlen(s);
- if (!strcmp(s, "Subject") || !strcmp(s, "Issuer")) {
- zval hash;
-
- array_init(&hash);
-
- split_certinfo(&slist->data[len+1], &hash);
- add_assoc_zval(&certhash, s, &hash);
- } else {
- add_assoc_string(&certhash, s, &slist->data[len+1]);
- }
+ add_assoc_string(&certhash, s, &slist->data[len+1]);
} else {
php_error_docref(NULL, E_WARNING, "Could not extract hash key from certificate info");
}