Summary: | [cURL] Support https protocol in cURL builds | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||||||||
Component: | WebKit Misc. | Assignee: | Brent Fulgham <bfulgham> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | ||||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows XP | ||||||||||||
Attachments: |
|
Description
Brent Fulgham
2009-08-10 23:46:12 PDT
Created attachment 34542 [details]
Activates SSL support if cURL build supports it.
Note: This might resolve Bug 19146, as the certificates were never being specified, so no SSL-supporting cURL would have been able to negotiate the HTTPS protocol. Created attachment 34588 [details]
Enable SSL support in cURL builds with SSL enabled.
Created attachment 34589 [details]
Small revision to ChangeLog to point to the right bug.
Comment on attachment 34589 [details]
Small revision to ChangeLog to point to the right bug.
Notice that I don't really know CF enough to review this properly. The patch looks straight-forward enough though, and I can see no obvious problems, so rs=me that.
Created attachment 34603 [details]
Revised to improve efficiency and thread safety.
Modified based on suggestions from ap and aroben.
Comment on attachment 34603 [details] Revised to improve efficiency and thread safety. > +static CString certificateBundlePath() "certificateBundlePath" is a little confusing. This doesn't return a path to a "certificate bundle"; it returns a path to a certificate within the WebKit bundle. I think "certificatePath" would be clearer. > +{ > +#if PLATFORM(CF) > + CFBundleRef webKitBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebKit")); > + RetainPtr<CFURLRef> certURLRef(AdoptCF, CFBundleCopyResourceURL(webKitBundle, CFSTR("cacert"), CFSTR("pem"), CFSTR("certificates"))); > + if (certURLRef) { > + char path[MAX_PATH]; > + CFURLGetFileSystemRepresentation(certURLRef.get(), false, (UInt8*)path, MAX_PATH); reinterpret_cast is preferred to a C-style cast. > + , m_certPath (certificateBundlePath()) You have an extra space after "m_certPath". > + if (!m_certPath.isNull()) > + curl_easy_setopt(d->m_handle, CURLOPT_CAINFO, m_certPath.data()); Checking isEmpty() seems a bit better than checking isNull(). > + const CString m_certPath; m_certificatePath seems a little clearer. I don't think the abbreviation adds anything here. r=me Landed in http://trac.webkit.org/changeset/47071. |