diff options
author | Pierrick Charron <pierrick@php.net> | 2016-07-27 23:30:20 -0400 |
---|---|---|
committer | Pierrick Charron <pierrick@php.net> | 2016-07-27 23:30:20 -0400 |
commit | 30a5ed3a7979f1b865f6633cb16b5f3e78371df1 (patch) | |
tree | 39d1da2a0ebcce44775dfc80d21afbe34a464d03 /ext/curl/interface.c | |
parent | ed16f2fed526df9bac870605db5a4e602b78a579 (diff) | |
download | php-git-30a5ed3a7979f1b865f6633cb16b5f3e78371df1.tar.gz |
Fixed bug #71929 (CURLINFO_CERTINFO data parsing error).
Diffstat (limited to 'ext/curl/interface.c')
-rw-r--r-- | ext/curl/interface.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c index dc4a97197e..c7112a091a 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1833,38 +1833,6 @@ static void alloc_curl_handle(php_curl **ch) /* }}} */ #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, 1); - } - s = split+2; - } while(split); - efree(org); - } -} -/* }}} */ - /* {{{ create_certinfo */ static void create_certinfo(struct curl_certinfo *ci, zval *listcode TSRMLS_DC) @@ -1888,17 +1856,7 @@ static void create_certinfo(struct curl_certinfo *ci, zval *listcode TSRMLS_DC) if(tmp) { *tmp = '\0'; len = strlen(s); - if(!strcmp(s, "Subject") || !strcmp(s, "Issuer")) { - zval *hash; - - MAKE_STD_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], 1); - } + add_assoc_string(certhash, s, &slist->data[len+1], 1); } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not extract hash key from certificate info"); } |