digitalmars.D.learn - Starting a HTTPS session with D
- Kadir Erdem Demir (13/13) Feb 12 2015 Hi
- Vladimir Panteleev (13/24) Feb 12 2015 No, you can keep using std.net.curl.
- Kadir Erdem Demir (3/4) Feb 12 2015 It works as I wanted, thanks a lot .
- sigod (4/6) Aug 18 2015 Did this changed? I use 2.068.0 and still have problems with SSL.
Hi We have a network traffic logger module at office. We need to a tool which creates simple traffic with different protocols and test our product's output to see if we parse the headers correctly or not. And of course I proposed writing this tool with D!!! When it comes to create a HTTP session it is very easy auto content = get("dlang.org"); But I couldn't find any examples about https. Do I have to use a C library like libcurl for it. Or is there a native way do solve my problem. Regards Erdem
Feb 12 2015
On Thursday, 12 February 2015 at 12:11:27 UTC, Kadir Erdem Demir wrote:Hi We have a network traffic logger module at office. We need to a tool which creates simple traffic with different protocols and test our product's output to see if we parse the headers correctly or not. And of course I proposed writing this tool with D!!! When it comes to create a HTTP session it is very easy auto content = get("dlang.org"); But I couldn't find any examples about https. Do I have to use a C library like libcurl for it. Or is there a native way do solve my problem.No, you can keep using std.net.curl. You just need to tell curl how to verify server certificates. On Windows, if you are using the curl library included with DMD 2.066.1, curl will use the Windows certificate store. Otherwise, you need to provide a trusted CA bundle: auto http = HTTP(); http.handle.set(CurlOption.cainfo, "path/to/ca-bundle.crt"); Or, to completely disable verification: http.handle.set(CurlOption.ssl_verifypeer, false); Then: get("https://dlang.org", http);
Feb 12 2015
get("https://dlang.org", http);It works as I wanted, thanks a lot . Regards Erdem
Feb 12 2015
On Thursday, 12 February 2015 at 12:34:21 UTC, Vladimir Panteleev wrote:On Windows, if you are using the curl library included with DMD 2.066.1, curl will use the Windows certificate store.Did this changed? I use 2.068.0 and still have problems with SSL. Sorry for necroposting.
Aug 18 2015