0

自己署名証明書を介して SSL で保護されている Azure でホストされている Web サービスがあります。

次のコードで接続しようとしています

CURL *curl;
CURLcode res;

curl = curl_easy_init();

curl_easy_setopt(curl, CURLOPT_URL, "https://XXXXXXXX.cloudapp.net/XXXXXX.svc/getFilms");
curl_easy_setopt(curl, CURLOPT_CAPATH, "C:\\Users\\Jordan\\Desktop\\Jordan-8.pem");
curl_easy_setopt(curl, CURLOPT_CAINFO, "C:\\Users\\Jordan\\Desktop\\Jordan-8.pem");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);

curl_easy_perform(curl);

その後、次のエラーが表示されます

* Connected to XXXXXXXXX.cloudapp.net
* successfully set certificate verify locations:
* CAfile: C:\Users\Jordan\Desktop\Jordan-8.pem
CApath: C:\Users\Jordan\Desktop\Jordan-8.pem
* SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
* Closing connection #0
* Peer certificate cannot be authenticated with known CA certificates

私が間違っていることはありますか?私はかなり長い間オンラインで調査しましたが、何も思いつきませんでした。

4

1 に答える 1

1

Usually when this happens it's because the SSL certificates used by libcurl are outdated. I recommend switching to the cert bundle here to see if you have better luck with it.

于 2012-09-17T22:24:14.377 に答える