mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Merge branch 'PHP-7.0' into PHP-7.1
This commit is contained in:
commit
8d44942912
2 changed files with 2 additions and 42 deletions
1
NEWS
1
NEWS
|
@ -12,6 +12,7 @@ PHP NEWS
|
||||||
- CURL:
|
- CURL:
|
||||||
. Fixed bug #71709 (curl_setopt segfault with empty CURLOPT_HTTPHEADER).
|
. Fixed bug #71709 (curl_setopt segfault with empty CURLOPT_HTTPHEADER).
|
||||||
(Pierrick)
|
(Pierrick)
|
||||||
|
. Fixed bug #71929 (CURLINFO_CERTINFO data parsing error). (Pierrick)
|
||||||
|
|
||||||
- Intl:
|
- Intl:
|
||||||
. Fixed bug #72639 (Segfault when instantiating class that extends
|
. Fixed bug #72639 (Segfault when instantiating class that extends
|
||||||
|
|
|
@ -1884,38 +1884,6 @@ php_curl *alloc_curl_handle()
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
#if LIBCURL_VERSION_NUM >= 0x071301 /* Available since 7.19.1 */
|
#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
|
/* {{{ create_certinfo
|
||||||
*/
|
*/
|
||||||
static void create_certinfo(struct curl_certinfo *ci, zval *listcode)
|
static void create_certinfo(struct curl_certinfo *ci, zval *listcode)
|
||||||
|
@ -1938,16 +1906,7 @@ static void create_certinfo(struct curl_certinfo *ci, zval *listcode)
|
||||||
if(tmp) {
|
if(tmp) {
|
||||||
*tmp = '\0';
|
*tmp = '\0';
|
||||||
len = strlen(s);
|
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 {
|
} else {
|
||||||
php_error_docref(NULL, E_WARNING, "Could not extract hash key from certificate info");
|
php_error_docref(NULL, E_WARNING, "Could not extract hash key from certificate info");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue