Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94651 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19862 invoked from network); 23 Jul 2016 17:32:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2016 17:32:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierrick@webstart.fr; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pierrick@webstart.fr; sender-id=unknown Received-SPF: error (pb1.pair.com: domain webstart.fr from 209.85.161.182 cause and error) X-PHP-List-Original-Sender: pierrick@webstart.fr X-Host-Fingerprint: 209.85.161.182 mail-yw0-f182.google.com Received: from [209.85.161.182] ([209.85.161.182:35560] helo=mail-yw0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CB/32-05797-81AA3975 for ; Sat, 23 Jul 2016 13:32:15 -0400 Received: by mail-yw0-f182.google.com with SMTP id j12so122151026ywb.2 for ; Sat, 23 Jul 2016 10:32:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=webstart-fr.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:from:date:message-id:subject:to; bh=j+OSMvPou7riJvIbgwa9hWIV7tf9PkcalamViuEgjJ0=; b=dkxxb61zbd2yD8kQ3nDqCk7L06hhO6kHQBtAkhjFUPcqmCqeFgkmIrQHn4f/ncSKO+ ODdETBAOw0GROyVRlQEJ8Hj+u4TFvxhpF++xdP3PEuM+I/iBv01X1rISY6X8oFoGMc/Z ZHpWz8mgyKQ85brijNfQuFN+H6asPFodlM0qumpvR1k7GI4mPsuYc4r7mW96Wk55JcAN R7G9CeGtj7BScOzO3CTPp+rEbmmuEupAnYnuHUnTHOdqrgD6PKAm2D6n4V5FYxsnKqi8 qY/BDEwO9ARdJ+8Pp8aiDY+hFpaXETvgD7SRhXXkeMUoaDTL5gqBrK7/jYtSE5SvLdAb w1NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=j+OSMvPou7riJvIbgwa9hWIV7tf9PkcalamViuEgjJ0=; b=DwRhDzXy/m8ncp0voEn7NeoE/E62D6F90U+WewVvsJN455o0uNj+hPFVw0IW9/UHVf DcGigl48GilNkuxXqh17XbPDI+szxxgon07K8+H6dAfMoqiXcMBIq44oHqnj90fqLKGO ypEAjVKMSki01sObjEFKnr0l/RqJRR1gD7+bZHHG/eECsGazErLYj1yN4H1WoIJie+cx A0dV6EC/A7COyAvG1U1rPGj7COA1fUiP1ar6nxV4ohio0za6p+Y52QnnFnHb6YnvhnrU 6UiSS2o7qhE59Q9i7Eh+uwsKl5r7mXzApsTWFoFqTguU1MVmCjncL3Ozqw8UMztJ4UQu +I9g== X-Gm-Message-State: AEkoouvyIUpWuzFA5x2I5M1HiH2/EZ/fOydwZOaAamAVFusAm2t6sSLldb2LCplvplfww+lxTwc22ANFkUcaSw== X-Received: by 10.129.79.207 with SMTP id d198mr8145192ywb.91.1469295125394; Sat, 23 Jul 2016 10:32:05 -0700 (PDT) MIME-Version: 1.0 Sender: pierrick@webstart.fr Received: by 10.37.10.198 with HTTP; Sat, 23 Jul 2016 10:32:04 -0700 (PDT) Date: Sat, 23 Jul 2016 13:32:04 -0400 X-Google-Sender-Auth: SZTEmUGpnV6lc29hAk9zi_cuGeA Message-ID: To: Davey Shafik , Anatol Belski , PHP internals Content-Type: multipart/alternative; boundary=001a114da15005829f053850eec3 Subject: Best way to fix #71929 curl_getinfo($ch, CURLINFO_CERTINFO) From: pierrick@adoy.net (Pierrick Charron) --001a114da15005829f053850eec3 Content-Type: text/plain; charset=UTF-8 Hi, I'm currently looking at bug #71929 and i'm wondering what is the best way to fix it. Basically the bug is that currently ext/curl tries to parse the "Subject" and "Issuer" returned by lib/curl to return this information as a PHP array. Here is the actual output : array ( 'Subject' => array ( 'C ' => ' US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority', ), 'Issuer' => array ( 'C ' => ' SE, O = AddTrust AB, OU = AddTrust External TTP Network, CN = AddTrust External CA Root', ), /* ... */ ) I think the real output that curl_getinfo($ch, CURLINFO_CERTINFO) should return is something like array ( 'Subject' => 'C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority', 'Issuer' => 'C = SE, O = AddTrust AB, OU = AddTrust External TTP Network, CN = AddTrust External CA Root', /* ... */ ) https://github.com/adoy/php-src/commit/7a7fbd51e1d51fed380a6f391fe7b282b55224d7 Since curl returns this two informations as a string and nothing in the documentation enforce the way this string is structured. Problem is that this fix might break things. I tried to search on code who's using this variable and did not find any. Do you think I should push this change and then we could add something in the release not to tell users that this was changed ? On which versions should I fix this problem ? Thanks for your feedback Pierrick --001a114da15005829f053850eec3--