Title: [92410] trunk/Source/WebCore
- Revision
- 92410
- Author
- [email protected]
- Date
- 2011-08-04 14:12:38 -0700 (Thu, 04 Aug 2011)
Log Message
Implement CERTIFICATE_CREDENTIALS_SUPPORTED for CFNetwork
https://bugs.webkit.org/show_bug.cgi?id=65704
<rdar://problem/9877734>
Reviewed by Oliver Hunt.
Implement support for client side certificate authentication in the CFNetwork based loader.
* platform/network/cf/AuthenticationCF.cpp:
(WebCore::createCF):
(WebCore::core): Also fix leak of password string.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (92409 => 92410)
--- trunk/Source/WebCore/ChangeLog 2011-08-04 21:11:11 UTC (rev 92409)
+++ trunk/Source/WebCore/ChangeLog 2011-08-04 21:12:38 UTC (rev 92410)
@@ -1,3 +1,17 @@
+2011-08-04 Pratik Solanki <[email protected]>
+
+ Implement CERTIFICATE_CREDENTIALS_SUPPORTED for CFNetwork
+ https://bugs.webkit.org/show_bug.cgi?id=65704
+ <rdar://problem/9877734>
+
+ Reviewed by Oliver Hunt.
+
+ Implement support for client side certificate authentication in the CFNetwork based loader.
+
+ * platform/network/cf/AuthenticationCF.cpp:
+ (WebCore::createCF):
+ (WebCore::core): Also fix leak of password string.
+
2011-08-04 Chris Rogers <[email protected]>
Make sure that AudioArray is 16-byte aligned
Modified: trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp (92409 => 92410)
--- trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp 2011-08-04 21:11:11 UTC (rev 92409)
+++ trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp 2011-08-04 21:12:38 UTC (rev 92410)
@@ -114,6 +114,11 @@
ASSERT_NOT_REACHED();
}
+#if CERTIFICATE_CREDENTIALS_SUPPORTED
+ if (coreCredential.type() == CredentialTypeClientCertificate)
+ return CFURLCredentialCreateWithIdentityAndCertificateArray(kCFAllocatorDefault, coreCredential.identity(), coreCredential.certificates(), persistence);
+#endif
+
CFStringRef user = coreCredential.user().createCFString();
CFStringRef password = coreCredential.password().createCFString();
CFURLCredentialRef result = CFURLCredentialCreate(0, user, password, 0, persistence);
@@ -214,8 +219,15 @@
default:
ASSERT_NOT_REACHED();
}
-
- return Credential(CFURLCredentialGetUsername(cfCredential), CFURLCredentialCopyPassword(cfCredential), persistence);
+
+#if CERTIFICATE_CREDENTIALS_SUPPORTED
+ SecIdentityRef identity = CFURLCredentialGetCertificateIdentity(cfCredential);
+ if (identity)
+ return Credential(identity, CFURLCredentialGetCertificateArray(cfCredential), persistence);
+#endif
+
+ RetainPtr<CFStringRef> password(AdoptCF, CFURLCredentialCopyPassword(cfCredential));
+ return Credential(CFURLCredentialGetUsername(cfCredential), password.get(), persistence);
}
ProtectionSpace core(CFURLProtectionSpaceRef cfSpace)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes