v2.5.2
Giriş yap

cURL Hatası (35) - Yardım Lütfen

cemcanpolat
1,395 defa görüntülendi

Merhaba,
Aldığım hata hakkında bilgisi olan biri beni yönlendirebilir mi lütfen?

Çıktılar:
Curl errno: 35
Curl error: error:0A000152:SSL routines::unsafe legacy renegotiation disabled

Biraz araştırma yaptım, curlopt_ssl_verifyhost ve curlopt_ssl_verifypeer değerlerini false olarak ayarladım olmadı.
curlopt_cainfo => "cacert.pem" denedim olmadı. (bu konuda pek bilgim yok), sitenin perm dosyasını indirdim onu gösterdim değer olarak olmadı.

Daha önce bağlanılıyordu ama sanırım değişiklikler yapmışlar, hatadan anladığım kadarıyla ssl ile alakalı sizce localhostuma openssl ile kendinden imzalı ssl sertifakası kursam düzelirmi, daha önce tecrübe eden yada bilgisi olan paylaşırsa sevinirim.
Döküman, konu başlığı vs. de paylaşabilirsiniz. Şimdiden Teşekkür ederim.

Kod:

$headers = [
  "accept: */*",
  "accept-language: tr,en-US;q=0.9,en;q=0.8",
  "cache-control: no-cache",
  "content-type: application/x-www-form-urlencoded;charset=UTF-8",
  "pragma: no-cache",
  "sec-fetch-mode: cors",
  "sec-fetch-site: same-origin",
  "connection: keep-alive"
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://...");
curl_setopt($ch, CURLOPT_REFERER, "https://...");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); 
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
  // data
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response  = json_decode(curl_exec($ch));
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error     = curl_errno($ch) . ': ' . curl_error($ch);

curl_close($ch);
cemcanpolat
678 gün önce

Maalesef sonuç değişmedi hocam. Verbose => true kullaninca aşağıdaki çıktıyı alıyorum ayrıca.

*   Trying 212.133.164.81:443...
* Connected to earsivportal.efatura.gov.tr (212.133.164.81) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* error:0A000152:SSL routines::unsafe legacy renegotiation disabled
* Closing connection 0