Rename WKCertificateInfoGetPeerCertificates() to WKCertificateInfoGetCertificateChain()
authormthole@apple.com <mthole@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Oct 2010 18:32:46 +0000 (18:32 +0000)
committermthole@apple.com <mthole@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Oct 2010 18:32:46 +0000 (18:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=47495

Reviewed by Darin Adler.

WebKit2:

* Shared/API/c/mac/WKCertificateInfoMac.h:
Renamed WKCertificateInfoGetPeerCertificates() to WKCertificateInfoGetCertificateChain()
* Shared/API/c/mac/WKCertificateInfoMac.mm:
(WKCertificateInfoGetCertificateChain): Updated for name change.
* Shared/mac/PlatformCertificateInfo.h:
(WebKit::PlatformCertificateInfo::certificateChain): Renamed from peerCertificates()
* Shared/mac/PlatformCertificateInfo.mm:
(WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Updated for name change.
(WebKit::PlatformCertificateInfo::encode): Ditto.
(WebKit::PlatformCertificateInfo::decode): Ditto.
(WebKit::PlatformCertificateInfo::dump): Ditto.

WebKitLibraries:

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLeopard.a:
* libWebKitSystemInterfaceSnowLeopard.a:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@69511 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit2/ChangeLog
WebKit2/Shared/API/c/mac/WKCertificateInfoMac.h
WebKit2/Shared/API/c/mac/WKCertificateInfoMac.mm
WebKit2/Shared/mac/PlatformCertificateInfo.h
WebKit2/Shared/mac/PlatformCertificateInfo.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLeopard.a
WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a

index 6f963e1..90e737d 100644 (file)
@@ -1,3 +1,22 @@
+2010-10-11  Mike Thole  <mthole@apple.com>
+
+        Reviewed by Darin Adler.
+
+        Rename WKCertificateInfoGetPeerCertificates() to WKCertificateInfoGetCertificateChain()
+        https://bugs.webkit.org/show_bug.cgi?id=47495
+
+        * Shared/API/c/mac/WKCertificateInfoMac.h:
+        Renamed WKCertificateInfoGetPeerCertificates() to WKCertificateInfoGetCertificateChain()
+        * Shared/API/c/mac/WKCertificateInfoMac.mm:
+        (WKCertificateInfoGetCertificateChain): Updated for name change.
+        * Shared/mac/PlatformCertificateInfo.h:
+        (WebKit::PlatformCertificateInfo::certificateChain): Renamed from peerCertificates()
+        * Shared/mac/PlatformCertificateInfo.mm:
+        (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Updated for name change.
+        (WebKit::PlatformCertificateInfo::encode): Ditto.
+        (WebKit::PlatformCertificateInfo::decode): Ditto.
+        (WebKit::PlatformCertificateInfo::dump): Ditto.
+
 2010-10-11  Balazs Kelemen  <kbalazs@webkit.org>
 
         Reviewed by Kenneth Rohde Christiansen.
index 90e639c..7d44478 100644 (file)
@@ -33,7 +33,7 @@
 extern "C" {
 #endif
 
-WK_EXPORT CFArrayRef WKCertificateInfoGetPeerCertificates(WKCertificateInfoRef certificateInfo);
+WK_EXPORT CFArrayRef WKCertificateInfoGetCertificateChain(WKCertificateInfoRef certificateInfo);
 
 #ifdef __cplusplus
 }
index 760dbbd..2ffc1f5 100644 (file)
@@ -30,7 +30,7 @@
 
 using namespace WebKit;
 
-CFArrayRef WKCertificateInfoGetPeerCertificates(WKCertificateInfoRef certificateInfoRef)
+CFArrayRef WKCertificateInfoGetCertificateChain(WKCertificateInfoRef certificateInfoRef)
 {
-    return toImpl(certificateInfoRef)->platformCertificateInfo().peerCertificates();
+    return toImpl(certificateInfoRef)->platformCertificateInfo().certificateChain();
 }
index 5a3ad5c..be7eb36 100644 (file)
@@ -41,7 +41,7 @@ public:
     PlatformCertificateInfo();
     explicit PlatformCertificateInfo(const WebCore::ResourceResponse&);
 
-    CFArrayRef peerCertificates() const { return m_peerCertificates.get(); }
+    CFArrayRef certificateChain() const { return m_certificateChain.get(); }
 
     void encode(CoreIPC::ArgumentEncoder* encoder) const;
     static bool decode(CoreIPC::ArgumentDecoder* decoder, PlatformCertificateInfo& t);
@@ -51,7 +51,7 @@ public:
 #endif
 
 private:
-    RetainPtr<CFArrayRef> m_peerCertificates;
+    RetainPtr<CFArrayRef> m_certificateChain;
 };
 
 } // namespace WebKit
index c234d76..0f3fee7 100644 (file)
@@ -39,23 +39,23 @@ PlatformCertificateInfo::PlatformCertificateInfo()
 }
 
 PlatformCertificateInfo::PlatformCertificateInfo(const ResourceResponse& response)
-    : m_peerCertificates(AdoptCF, WKCopyNSURLResponsePeerCertificates(response.nsURLResponse()))
+    : m_certificateChain(AdoptCF, WKCopyNSURLResponseCertificateChain(response.nsURLResponse()))
 {
 }
 
 void PlatformCertificateInfo::encode(CoreIPC::ArgumentEncoder* encoder) const
 {
     // Special case no certificates, 
-    if (!m_peerCertificates) {
+    if (!m_certificateChain) {
         encoder->encodeUInt64(std::numeric_limits<uint64_t>::max());
         return;
     }
 
-    uint64_t length = CFArrayGetCount(m_peerCertificates.get());
+    uint64_t length = CFArrayGetCount(m_certificateChain.get());
     encoder->encodeUInt64(length);
 
     for (size_t i = 0; i < length; ++i) {
-        RetainPtr<CFDataRef> data(AdoptCF, SecCertificateCopyData((SecCertificateRef)CFArrayGetValueAtIndex(m_peerCertificates.get(), i)));
+        RetainPtr<CFDataRef> data(AdoptCF, SecCertificateCopyData((SecCertificateRef)CFArrayGetValueAtIndex(m_certificateChain.get(), i)));
         encoder->encodeBytes(CFDataGetBytePtr(data.get()), CFDataGetLength(data.get()));
     }
 }
@@ -83,19 +83,19 @@ bool PlatformCertificateInfo::decode(CoreIPC::ArgumentDecoder* decoder, Platform
         CFArrayAppendValue(array.get(), certificate.get());
     }
 
-    c.m_peerCertificates = array;
+    c.m_certificateChain = array;
     return true;
 }
 
 #ifndef NDEBUG
 void PlatformCertificateInfo::dump() const
 {
-    unsigned entries = m_peerCertificates ? CFArrayGetCount(m_peerCertificates.get()) : 0;
+    unsigned entries = m_certificateChain ? CFArrayGetCount(m_certificateChain.get()) : 0;
 
     NSLog(@"PlatformCertificateInfo\n");
     NSLog(@"  Entries: %d\n", entries);
     for (unsigned i = 0; i < entries; ++i) {
-        RetainPtr<CFStringRef> summary(AdoptCF, SecCertificateCopySubjectSummary((SecCertificateRef)CFArrayGetValueAtIndex(m_peerCertificates.get(), i)));
+        RetainPtr<CFStringRef> summary(AdoptCF, SecCertificateCopySubjectSummary((SecCertificateRef)CFArrayGetValueAtIndex(m_certificateChain.get(), i)));
         NSLog(@"  %@", (NSString *)summary.get());
     }
 }
index 54a7ec3..c35a6a4 100644 (file)
@@ -1,3 +1,14 @@
+2010-10-11  Mike Thole  <mthole@apple.com>
+
+        Reviewed by Darin Adler.
+
+        Rename WKCertificateInfoGetPeerCertificates() to WKCertificateInfoGetCertificateChain()
+        https://bugs.webkit.org/show_bug.cgi?id=47495
+
+        * WebKitSystemInterface.h: 
+        * libWebKitSystemInterfaceLeopard.a:
+        * libWebKitSystemInterfaceSnowLeopard.a:
+
 2010-10-03  Brent Fulgham  <bfulgham@webkit.org>
 
         Unreviewed build fix.
index 8cb0770..b67906d 100644 (file)
@@ -34,7 +34,7 @@ NSTimeInterval WKGetNSURLResponseFreshnessLifetime(NSURLResponse *response);
 NSString *WKCopyNSURLResponseStatusLine(NSURLResponse *response);
 
 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
-CFArrayRef WKCopyNSURLResponsePeerCertificates(NSURLResponse *response);
+CFArrayRef WKCopyNSURLResponseCertificateChain(NSURLResponse *response);
 #endif
 
 CFStringEncoding WKGetWebDefaultCFStringEncoding(void);
index b3a7ebc..87e9b2d 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a differ
index aefd269..7ac0fcb 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a differ