为SSL设置cURL

Once again, another question concerning cURL and SSL, as I cannot find matching answers to my problem.

I have working SSL on my webserver, with trusted cert and green signs on browsers address bar a.s.o., NOT self signed. So good, so far.

Now I want communicate with cURL and use the following function (POST data not added yet):

    function ssltest(){
        $post_data = '';
        $url = 'https://myserver/test.php';
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_MUTE, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
        //curl_setopt($ch, CURLOPT_CAINFO, 'sslstuff/cacert.pem');
        curl_setopt($ch, CURLOPT_CAINFO, 'sslstuff/false.pem');
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:  application/x-www-form-urlencoded'));
        curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        $output = curl_exec($ch); 
        curl_close($ch);
        return $output;
    }

echo ssltest();

As the cacert.pem I use this one, which I found in my browser, which is obviously identical to what I found here http://curl.haxx.se/ca/cacert.pem In the code shown above there is a false.pem to be seen. Now what ? If this file is empty, there's no response from Server, but I tested to paste the cert from another enterprise from the list on curl.haxx.se I get the same correct answer from the server as result, as when I use my correct .pem

What's the issue ? What I am missing ?

"there's no response from Server"

I think that's very unlikely. I suspect there is no HTTP response from the server, but that the SSL negotiation is failing - but you've got no error checking in your code. If $output===false, have a look at curl_error().

You might want to play around with VERIFYHOST and VERIFYPEER to pin down the exact cause of the problem.