PHP - curl_exec hangs

后端 未结 6 2073
死守一世寂寞
死守一世寂寞 2021-02-12 14:42

I am having a strange problem with the below php function. Unfortunately this is one of those special \"Production only\" case.

function requestPost($url, $data)         


        
6条回答
  •  执念已碎
    2021-02-12 15:17

    NSS is more strict than either OpenSSL or GnuTLS. Fedora/RHEL curl defaults to using NSS over OpenSSL, and can catch errors that don't arise using curl on OSX, Ubuntu, etc.

    Here's a list of NSS error codes http://www.mozilla.org/projects/security/pki/nss/ref/ssl/sslerr.html

    [root@mybox ~]# curl -k -v -E /etc/mycert.pem https://127.0.0.1/
    * About to connect() to 127.0.0.1 port 443 (#0)
    *   Trying 127.0.0.1... connected
    * Connected to 127.0.0.1 (127.0.0.1) port 443 (#0)
    * Initializing NSS with certpath: sql:/etc/pki/nssdb
    * warning: ignoring value of ssl.verifyhost
    * NSS error -8054
    * Closing connection #0
    * SSL connect error
    curl: (35) SSL connect error
    

提交回复
热议问题