Topic: PHP 5.3.8 Curl SSL CA no longer functions.

Greetings,
I upgraded to the remi-test PHP version from PHP 5.3.7 which had a large bug in it.

I reviewed this post
http://forums.famillecollet.com/viewtopic.php?id=825
I do not think I have the same problem.

rpm -q php curl libcurl

php-5.3.8-5.el5.remi
curl-7.15.5-9.el5_7.4
libcurl-7.21.7-5.el5.remi

Curl error: Peer certificate cannot be authenticated with given CA certificates

I updated openldap to 2.3.43-12.el5_7.9
That did not resolve the problem.  I also attempted to update curl but that did not resolve the problem either so I downgraded it.

It seems like the problem is with the new CA database.

When I execute:


I get the expected results. Course, I am running that on a different version of curl then PHP is so that makes sense.

Any pointers would be greatly appreciated.

Joseph

Re: PHP 5.3.8 Curl SSL CA no longer functions.

The upgrade to latest was a test (asked by a user in the thread you've pointed).

It seems it's a bad idea.

The php-5.3.8-1 build (in remi) use the default curl 7.15
The php-5.3.8-5 build  (in remi-test) use the new curl 7.21

It's in "remi-test" because this is a test version for which I'm waiting for feedback.
So I think, I will remove this stuff and keep building php with default (old but working) curl version.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: PHP 5.3.8 Curl SSL CA no longer functions.

I confirm the issue with this version

# curl -V
curl 7.21.7 (x86_64-redhat-linux-gnu) libcurl/7.21.7 NSS/3.12.10.0 zlib/1.2.3 libidn/0.6.5 libssh2/1.2.7
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 SSL libz 

# curl -v https://secure.authorize.net/gateway/transact.dll
* About to connect() to secure.authorize.net port 443 (#0)
*   Trying 64.94.118.32... connected
* Connected to secure.authorize.net (64.94.118.32) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* Unable to initialize NSS database
* Initializing NSS with certpath: none
* WARNING: failed to load NSS PEM library libnsspem.so. Using OpenSSL PEM certificates will not work.
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* Peer's certificate issuer is not recognized: 'CN=Entrust Certification Authority - L1E,OU="(c) 2009 Entrust, Inc.",OU=www.entrust.net/rpa is incorporated by reference,O="Entrust, Inc.",C=US'
* NSS error -8049
* Closing connection #0
* Peer certificate cannot be authenticated with given CA certificates
curl: (60) Peer certificate cannot be authenticated with given CA certificates
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

I will push a new php build (probably 5.3.8-5.1) ASAP in remi repository for whose which want latest feature (mysqlnd, zts extensions, is_a, ...)

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

4 (edited by jozwikjp 2011-09-30 17:24:03)

Re: PHP 5.3.8 Curl SSL CA no longer functions.

Thank you Remi,
Appreciate your help.
I fixed it by downgrading to the remi non test version.
It was definitely a bad idea :-) Donated for your time.

Re: PHP 5.3.8 Curl SSL CA no longer functions.

New build available in "remi" (5.3.8-1.el5.remi.1)

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: PHP 5.3.8 Curl SSL CA no longer functions.

New curl-7.21.7-5.el5.remi.2 in remi-test should fix the NSS issue (it use openssl instead)

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi