RESOLVED FIXED 160144
Add specialization for encoding/decoding WebCore::CertificateInfos in the Network Cache
https://bugs.webkit.org/show_bug.cgi?id=160144
Summary Add specialization for encoding/decoding WebCore::CertificateInfos in the Net...
Sam Weinig
Reported 2016-07-24 10:54:24 PDT
Add specialization for encoding/decoding WebCore::CertificateInfos in the Network Cache
Attachments
Patch (7.77 KB, patch)
2016-07-24 10:56 PDT, Sam Weinig
no flags
Patch (9.80 KB, patch)
2016-07-24 16:00 PDT, Sam Weinig
no flags
Patch (9.65 KB, patch)
2016-07-24 16:23 PDT, Sam Weinig
no flags
Sam Weinig
Comment 1 2016-07-24 10:56:27 PDT
Sam Weinig
Comment 2 2016-07-24 10:57:21 PDT
Chris Dumez
Comment 3 2016-07-24 11:33:53 PDT
Comment on attachment 284447 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=284447&action=review r=me % nits. > Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.cpp:169 > + data = adoptCF(CFDataCreate(0, vector.data(), vector.size())); 0 -> nullptr > Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.cpp:200 > + if (!trustData) Looks like this could be an assertion instead? decodeCFData() would have returned value if trustData were null. > Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.cpp:225 > + RetainPtr<CFDataRef> data = adoptCF(SecCertificateCopyData((SecCertificateRef)values[i])); Could use auto > Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.cpp:236 > + RetainPtr<CFMutableArrayRef> array = adoptCF(CFArrayCreateMutable(0, 0, &kCFTypeArrayCallBacks)); could use auto. > Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.cpp:247 > + certificateChain = adoptCF(array.leakRef()); certificateChain = WTFMove(array); may be a bit nicer.
Sam Weinig
Comment 4 2016-07-24 16:00:04 PDT
Sam Weinig
Comment 5 2016-07-24 16:23:35 PDT
Sam Weinig
Comment 6 2016-07-24 17:50:46 PDT
Ryan Haddad
Comment 7 2016-07-25 10:11:37 PDT
Debug WK2 tests are exiting early after failing an assertion added with this change: ASSERT(CFGetTypeID(values[i]) != SecCertificateGetTypeID()); https://build.webkit.org/results/Apple%20El%20Capitan%20Debug%20WK2%20(Tests)/r203684%20(6840)/results.html
Sam Weinig
Comment 8 2016-07-25 11:47:13 PDT
Note You need to log in before you can comment on or make changes to this bug.