WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
57368
WebKit2: Support setting the client certificate on Windows
https://bugs.webkit.org/show_bug.cgi?id=57368
Summary
WebKit2: Support setting the client certificate on Windows
Jeff Miller
Reported
2011-03-29 11:38:23 PDT
WebKit2: Support setting the client certificate on Windows
Attachments
Patch
(8.42 KB, patch)
2011-03-29 11:44 PDT
,
Jeff Miller
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jeff Miller
Comment 1
2011-03-29 11:44:19 PDT
Created
attachment 87378
[details]
Patch
Darin Adler
Comment 2
2011-03-29 11:52:52 PDT
Comment on
attachment 87378
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=87378&action=review
I’m not sure that this is following best practices for platform-specific functions. All those empty ones that say ASSERT_NOT_REACHED seem wrong to me. Can you find another example to check the idiom? Or ask Sam or Anders?
> Source/WebKit2/Shared/API/c/win/WKCertificateInfoWin.cpp:37 > + RefPtr<WebCertificateInfo> certificateInfo = WebCertificateInfo::create(PlatformCertificateInfo(certificate)); > + return toAPI(certificateInfo.release().releaseRef());
Should use leakRef rather than releaseRef. The name releaseRef is deprecated, I just haven’t had a chance to remove it yet. I also think writing this as a 1-liner would be better.
> Source/WebKit2/WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:34 > +#if USE(CFNETWORK) > +#include <WebCore/CertificateCFWin.h> > +#endif
Conditional includes should go in a separate paragraph after the rest of the includes.
> Source/WebKit2/WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:114 > + RetainPtr<CFDataRef> certificate = WebCore::copyCertificateToData(certificateChain.first()); > + ResourceHandle::setClientCertificate(host, certificate.get());
I think this would read better as a one-liner.
Jeff Miller
Comment 3
2011-03-29 13:18:30 PDT
(In reply to
comment #2
)
> (From update of
attachment 87378
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=87378&action=review
> > I’m not sure that this is following best practices for platform-specific functions. All those empty ones that say ASSERT_NOT_REACHED seem wrong to me. Can you find another example to check the idiom? Or ask Sam or Anders?
Anders says: "if we know that they're only used on windows, we should PLATFORM(WIN) them, and add WKBundleSetClientCertificate to WKBundlePrivateWin.h" This also applies to InjectedBundle::setHostAllowsANyHTTPSCertificate(), which is a Windows-only API which I added in another recent patch. I'm going to land this patch as-is (after addressing your other comments) and move both these functions to be Windows-only in another patch.
Jeff Miller
Comment 4
2011-03-29 13:26:00 PDT
Committed
r82309
: <
http://trac.webkit.org/changeset/82309
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug