WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
136107
Add USE(APPLE_INTERNAL_SDK)-guards around SPI in ResourceHandle code
https://bugs.webkit.org/show_bug.cgi?id=136107
Summary
Add USE(APPLE_INTERNAL_SDK)-guards around SPI in ResourceHandle code
Daniel Bates
Reported
2014-08-20 10:06:45 PDT
Towards getting iOS WebKit to build using the public SDK we should guard SPI headers with USE(APPLE_INTERNAL_SDK) and add appropriate forward declarations in the following files: platform/network/ResourceHandleClient.h platform/network/ResourceHandleInternal.h platform/network/ios/ResourceHandleIOS.mm platform/network/mac/ResourceErrorMac.mm
Attachments
Patch
(8.07 KB, patch)
2014-08-20 10:12 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
Patch
(1.47 KB, patch)
2017-11-02 03:59 PDT
,
Frédéric Wang (:fredw)
no flags
Details
Formatted Diff
Diff
Patch
(7.38 KB, patch)
2017-11-02 04:18 PDT
,
Frédéric Wang (:fredw)
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2014-08-20 10:12:20 PDT
Created
attachment 236875
[details]
Patch
Daniel Bates
Comment 2
2014-08-20 13:03:56 PDT
Comment on
attachment 236875
[details]
Patch Will update patch to fix Windows build issues.
David Kilzer (:ddkilzer)
Comment 3
2014-12-17 14:05:28 PST
Is this still needed after the fix for this bug?
Bug 136487
: [iOS] Make WebCore build and link with public SDK
Blaze Burg
Comment 4
2016-02-02 11:47:25 PST
There is still this: #ifndef ResourceHandleClient_h #define ResourceHandleClient_h ... #if USE(CFNETWORK) #include <CFNetwork/CFURLCachePriv.h> #include <CFNetwork/CFURLResponsePriv.h> #endif The private includes could probably just be replaced with #include <CFNetworkSPI.h>.
Frédéric Wang (:fredw)
Comment 5
2017-11-02 03:46:43 PDT
(In reply to Brian Burg from
comment #4
)
> There is still this: > > #ifndef ResourceHandleClient_h > #define ResourceHandleClient_h > > ... > > #if USE(CFNETWORK) > #include <CFNetwork/CFURLCachePriv.h> > #include <CFNetwork/CFURLResponsePriv.h> > #endif > > > The private includes could probably just be replaced with #include > <CFNetworkSPI.h>.
It looks like USE_CFNETWORK has been removed in
r207151
. Do we still want that change?
Frédéric Wang (:fredw)
Comment 6
2017-11-02 03:59:35 PDT
Created
attachment 325704
[details]
Patch
Frédéric Wang (:fredw)
Comment 7
2017-11-02 04:00:05 PDT
(In reply to Frédéric Wang (:fredw) from
comment #6
)
> Created
attachment 325704
[details]
> Patch
Untested patch, based on previous comments.
Frédéric Wang (:fredw)
Comment 8
2017-11-02 04:18:04 PDT
Created
attachment 325705
[details]
Patch
Frédéric Wang (:fredw)
Comment 9
2017-11-02 04:19:02 PDT
(In reply to Brian Burg from
comment #4
)
> There is still this:
Actually, it seems none of the changes were actually taken. So I just uploaded an untested rebase of Daniel's patch.
Alex Christensen
Comment 10
2017-11-02 22:49:46 PDT
Comment on
attachment 325705
[details]
Patch Why are we trying to make iOS build using CFURLConnection? Right now we're using NSURLConnection on iOS WebKitLegacy and NSURLSession on WebKit, and we're moving towards using NSURLSession everywhere. We don't intend to maintain an iOS build that uses CFURLConnection.
Frédéric Wang (:fredw)
Comment 11
2017-11-03 00:09:51 PDT
(In reply to Alex Christensen from
comment #10
)
> Comment on
attachment 325705
[details]
> Patch > > Why are we trying to make iOS build using CFURLConnection? Right now we're > using NSURLConnection on iOS WebKitLegacy and NSURLSession on WebKit, and > we're moving towards using NSURLSession everywhere. We don't intend to > maintain an iOS build that uses CFURLConnection.
Then maybe this old bug should be WONTFIX :-)
Darin Adler
Comment 12
2017-11-03 07:56:11 PDT
Comment on
attachment 325705
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=325705&action=review
> Source/WebCore/platform/network/ios/ResourceHandleIOS.mm:42 > +#if USE(APPLE_INTERNAL_SDK) > #import <CFNetwork/CFSocketStreamPriv.h> > #import <Foundation/NSURLRequestPrivate.h> > +#else > +#import <Foundation/NSURLRequest.h> > +@interface NSURLRequest (Details) > ++ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host; > ++ (NSArray*)allowsSpecificHTTPSCertificateForHost:(NSString *)host; > +@end > +#endif > > -using namespace WebCore; > +extern "C" const CFStringRef _kCFStreamSSLTrustedLeafCertificates;
In theory this belongs in an SPI.h header; someone should move it there eventually.
> Source/WebCore/platform/network/mac/ResourceErrorMac.mm:43 > -#if PLATFORM(IOS) && USE(CFURLCONNECTION) > +#if PLATFORM(IOS) && USE(CFURLCONNECTION) && USE(APPLE_INTERNAL_SDK) > #import <CFNetwork/CFSocketStreamPriv.h> > #endif > > +#if USE(CFURLCONNECTION) > +extern "C" { > +const CFStringRef _kCFStreamPropertySSLClientCertificates; > +const CFStringRef _kCFStreamPropertySSLClientCertificateState; > +} > +#endif
Ditto.
Frédéric Wang (:fredw)
Comment 13
2017-11-03 08:01:51 PDT
Committed
r224395
: <
https://trac.webkit.org/changeset/224395
>
Frédéric Wang (:fredw)
Comment 14
2017-11-03 08:09:43 PDT
Comment on
attachment 325705
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=325705&action=review
>> Source/WebCore/platform/network/ios/ResourceHandleIOS.mm:42 >> +extern "C" const CFStringRef _kCFStreamSSLTrustedLeafCertificates; > > In theory this belongs in an SPI.h header; someone should move it there eventually.
Right. I see other places where it's done e.g. Source/WebCore/platform/cocoa/TelephoneNumberDetectorCocoa.cpp ; maybe this can be addressed in
bug 164684
.
Radar WebKit Bug Importer
Comment 15
2017-11-15 13:10:57 PST
<
rdar://problem/35568927
>
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