zedols
zedols

Reputation: 11

error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

I know this was already posted so many times, but was not helpful. I currently have php 7.1.7 and using cURL successfully. However I will be forced to update to 7.4.15 in a few days and when I tried it, SSL error occured. Tried also file_get_contents with same result. Also tried using wamp with running old php or new php and both failed. When I tried to force sslv3 I got

"OpenSSL was built without SSLv3 support"

URL which I want content from is managed by our subcontractor and I have very limited access there. I have tried all answers posted here already and none work. I suspect that the URL is using SSLv3. Can it be the issue and can it be resolved somehow?

cURL code: $values["url"] = $Url1.$NPT;

        $ch = curl_init();

        // Set the cURL parameters
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);            // Accepts all CAs 
        curl_setopt($ch, CURLOPT_URL, $values["url"]);              // Set the URL
        curl_setopt($ch, CURLOPT_TIMEOUT, 90);                      // Time-out after 90 seconds
        curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);                 // We want the content after the query
        curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);           // HTTP Basic Authentication Protocol (login)
        curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");   // Set the username and password

        
         $curl_errno = curl_errno($ch);
         $curl_error = curl_error($ch);
        
         echo $text = curl_exec ($ch);

EDIT:

so the URL is using:

SSLv3,TLSv1.0,TLSv1.1,TLSv1.2 Cipher: SSL_RSA_WITH_3DES_EDE_CBC_SHA(3A) SSLv3,TLSv1.0,TLSv1.1,TLSv1.2 Cipher: SSL_RSA_WITH_RC4_128_SHA(35) SSLv3,TLSv1.0,TLSv1.1,TLSv1.2 Cipher: SSL_RSA_WITH_RC4_128_MD5(34) SSLv3,TLSv1.0,TLSv1.1,TLSv1.2 Cipher: SSL_RSA_WITH_3DES_EDE_CBC_SHA(3A) SSLv3,TLSv1.0,TLSv1.1,TLSv1.2 Cipher: SSL_RSA_WITH_RC4_128_SHA(35) SSLv3,TLSv1.0,TLSv1.1,TLSv1.2 Cipher: SSL_RSA_WITH_RC4_128_MD5(34) SSLv3,TLSv1.0,TLSv1.1,TLSv1.2 Cipher: SSL_RSA_WITH_3DES_EDE_CBC_SHA(3A) SSLv3,TLSv1.0,TLSv1.1,TLSv1.2 Cipher: SSL_RSA_WITH_RC4_128_SHA(35) SSLv3,TLSv1.0,TLSv1.1,TLSv1.2 Cipher: SSL_RSA_WITH_RC4_128_MD5(34)

I have tried playing with CA, it had no effect if I added site`s cert.pem to used cacert.pem or if I completely removed cacert.pem Tried this also on wamp, with PHP v7.1.33 everything works, php v >7.2 doesn't. I have same error on OpenSSL> s_client -connect 164.120.107.30:8180 -msg and file_get_contents.

Upvotes: 1

Views: 850

Answers (0)

Related Questions