Thread overview | |||||
---|---|---|---|---|---|
|
November 11, 2013 curl | ||||
---|---|---|---|---|
| ||||
Attachments:
| auto response = std.net.curl.get("http://website.com/api/blah"); I'm getting this: First-chance exception: std.net.curl.CurlException Peer certificate cannot be authenticated with given CA certificates on handle 8C5090 at std\net\curl.d(3504) Even on non-SSL connections. Am I being redirected? And why does curl crash when it encounters HTTPS anyway? Surely it should be ideal if it 'just worked'? |
November 11, 2013 Re: curl | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manu | On Monday, 11 November 2013 at 09:53:38 UTC, Manu wrote: > First-chance exception: std.net.curl.CurlException Peer certificate cannot > be authenticated with given CA certificates on handle 8C5090 at > std\net\curl.d(3504) > > And why does curl crash when it encounters HTTPS anyway? https://d.puremagic.com/issues/show_bug.cgi?id=9737 SSL usage example: ----- auto http = HTTP(); // Set the CA certificate bundle file to use for SSL peer verification // To dowload this file (or generate it yourself) see http://curl.haxx.se/docs/caextract.html // For more information about SSL peer verification see http://curl.haxx.se/docs/sslcerts.html http.caInfo("cacert.pem"); auto resp = get("https://google.com", http); |
November 11, 2013 Re: curl | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tavi Cacina Attachments:
| Okay, I have something working.
Pretty annoying process though.
This could really do with some solid documentation + examples by someone
who knows what they're talking about.
I'd like to think get(url) should be really easy, and shouldn't waste hours
of someone's time to understand and call.
On 11 November 2013 21:06, Tavi Cacina <octavian.cacina@outlook.com> wrote:
> On Monday, 11 November 2013 at 09:53:38 UTC, Manu wrote:
>
>> First-chance exception: std.net.curl.CurlException Peer certificate cannot be authenticated with given CA certificates on handle 8C5090 at std\net\curl.d(3504)
>>
>> And why does curl crash when it encounters HTTPS anyway?
>>
>
> https://d.puremagic.com/issues/show_bug.cgi?id=9737
>
> SSL usage example:
> -----
> auto http = HTTP();
>
> // Set the CA certificate bundle file to use for SSL peer verification
> // To dowload this file (or generate it yourself) see
> http://curl.haxx.se/docs/caextract.html
> // For more information about SSL peer verification see
> http://curl.haxx.se/docs/sslcerts.html
> http.caInfo("cacert.pem");
>
> auto resp = get("https://google.com", http);
>
|
Copyright © 1999-2021 by the D Language Foundation