View Issue Details

IDProjectCategoryView StatusLast Update
0015892CentOS-7curlpublic2019-03-02 15:57
Reporterrvmp 
PriorityurgentSeveritymajorReproducibilityalways
Status newResolutionopen 
Platformx86_64OSCentOSOS Version7.6.1810
Product Version7.6.1810 
Target VersionFixed in Version 
Summary0015892: CURLINFO_CERTINFO empty probably because of problem with libcurl
DescriptionNo CERTIFICATE information returned when using curl with PHP (CURLINFO_CERTINFO)

On CentOS 7 during PHP 7.3 configure:
| /* confdefs.h */
| #...
| #define HAVE_CURL_SSL 1
| /* end confdefs.h. */
|
| #include <strings.h>
| #include <curl/curl.h>
|
| int main(int argc, char *argv[])
| {
| curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
|
| if (data && data->ssl_version && *data->ssl_version) {
| const char *ptr = data->ssl_version;
|
| while(*ptr == ' ') ++ptr;
| return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
| }
| return 1;
| }
|
configure:24506: result: no
configure:24515: checking for gnutls support in libcurl
configure:24543: ccache gcc -o conftest -lcurl conftest.c -lbz2 -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto >&5
configure:24543: $? = 0
configure:24543: ./conftest
configure:24543: $? = 7
configure: program exited with status 7
configure: failed program was:
| /* confdefs.h */
| #...
| #define HAVE_CURL_SSL 1
| /* end confdefs.h. */
|
| #include <strings.h>
| #include <curl/curl.h>
|
| int main(int argc, char *argv[])
| {
| curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
|
| if (data && data->ssl_version && *data->ssl_version) {
| const char *ptr = data->ssl_version;
|
| while(*ptr == ' ') ++ptr;
| return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1);
| }
| return 1;
| }
|
configure:24560: result: no
configure:24673: checking for curl_easy_perform in -lcurl
configure:24698: ccache gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fno-strict-aliasing -pipe -Wno-all -fvisibility=hidden -Wl,--enable-new-dtags -lcurl conftest.c -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto >&5
configure:24698: $? = 0
configure:24707: result: yes
configure:24828: checking for curl_easy_strerror in -lcurl
configure:24853: ccache gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fno-strict-aliasing -pipe -Wno-all -fvisibility=hidden -Wl,--enable-new-dtags -lcurl conftest.c -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto >&5
configure:24853: $? = 0
configure:24862: result: yes
configure:24981: checking for curl_multi_strerror in -lcurl
configure:25006: ccache gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fno-strict-aliasing -pipe -Wno-all -fvisibility=hidden -Wl,--enable-new-dtags -lcurl conftest.c -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto >&5
configure:25006: $? = 0
configure:25015: result: yes
...
ac_cv_lib_curl_curl_easy_perform=yes
ac_cv_lib_curl_curl_easy_strerror=yes
ac_cv_lib_curl_curl_multi_strerror=yes
Steps To ReproduceTake a relevant example from libcurl documentation:

cp /usr/share/doc/libcurl-devel-7.29.0/certinfo.c .
Edit certinfo.c to match PHP script (replace URL with https://plesk.com)
Compile: gcc -l curl certinfo.c
Run: ./a.out
Additional Information# curl --version
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.36 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets
Tagscurl, libcurl
abrt_hash
URLhttps://talk.plesk.com/threads/php-libcurl-fails-to-populate-certinfo-array.351354/

Activities

TrevorH

TrevorH

2019-03-02 15:38

manager   ~0033928

CentOS is a rebuild of the sources used to build RHEL. It is a bug if the CentOS package does not behave in exactly the same way that the RHEL one does and I see nothing that indicates that the behaviour on RHEL for this would be any different to that obtained under CentOS. You would need to report issues like this on bugzilla.redhat.com and if/when they are fixed by Redhat for RHEL and released, then CentOS will pick up the released source and rebuild it for CentOS. It is pointless reporting issues like this on bugs.centos.org.
rvmp

rvmp

2019-03-02 15:57

reporter   ~0033929

Thank you TrevorH. Submitted

https://bugzilla.redhat.com/show_bug.cgi?id=1684797

Issue History

Date Modified Username Field Change
2019-03-02 15:33 rvmp New Issue
2019-03-02 15:33 rvmp Tag Attached: curl
2019-03-02 15:33 rvmp Tag Attached: libcurl
2019-03-02 15:38 TrevorH Note Added: 0033928
2019-03-02 15:57 rvmp Note Added: 0033929