[Issue 9737] New: std.net.curl and SSL - documentation missing

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 16 10:35:41 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9737

           Summary: std.net.curl and SSL - documentation missing
           Product: D
           Version: D2
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: octavian.cacina at outlook.com


--- Comment #0 from Tavi Cacina <octavian.cacina at outlook.com> 2013-03-16 10:35:40 PDT ---
I wanted to use std.net.curl to make a simple request over SSL, for ex.
get("https://google.com"). It failed with the message "Peer certificate cannot
be authenticated with given CA certificates". In documentation I could not find
anything, so it was a tedious search for something that has actually an easy
resolution. Since this is a quite common usage scenario, it should be
documented. Also note that the HTTP.caInfo does not have any doc entry. 

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");

//http.handle.set(CurlOption.ssl_verifypeer, 0); // do not verify ssl
certifiactes, use with care!

auto resp = get("https://google.com", http);
-----

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list