PHP curl error: “Unknown SSL protocol error in connection to…”

后端 未结 3 958
太阳男子
太阳男子 2021-01-13 01:19

I having extreme difficulty with PHP curl. I am attempting to open a site: https://www.novaprostaffing.com/np/index.jsp through PHP curl, but it keeps yielding the following

相关标签:
3条回答
  • 2021-01-13 01:58

    Try setting the cURL option CURLOPT_SSLVERSION. I had the same problem a while ago, this did the trick for me :)

    curl_setopt($ch, CURLOPT_SSLVERSION, 3); // 1, 2 or 3
    
    0 讨论(0)
  • 2021-01-13 02:04

    Did you try some other https url and see if that worked ? Here are 3 common causes

    1. Destination Site Does Not Like the Protocol
    2. The Destination Site Does Not Like the Cipher
    3. The SSL Private Key Has Expired
    0 讨论(0)
  • 2021-01-13 02:05

    The server speaks only TLS 1.0 and trying to connect with SSL 2.0 or SSL 3.0 will cause the error you see. This means setting the version to 3 is exactly the wrong thing with this server. Apart from that the certificate chain is incomplete. The server only provides the leaf certificate, not the intermediate certificates until the trusted root. This will cause verification to fail.

    0 讨论(0)
提交回复
热议问题