Title: [275298] trunk
Revision
275298
Author
achristen...@apple.com
Date
2021-03-31 11:37:03 -0700 (Wed, 31 Mar 2021)

Log Message

Add deprecation macros.

Source/WebCore:

* platform/network/cf/CertificateInfoCFNet.cpp:
(WebCore::certificatesMatch):
(WebCore::CertificateInfo::certificateChainFromSecTrust):
(WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate const):

Source/WebKit:

* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::encodeNSError):
* UIProcess/Authentication/mac/WebCredentialMac.mm:
(WebKit::leafCertificate):
(WebKit::chain):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
(verifyCertificateAndPublicKey):
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (275297 => 275298)


--- trunk/Source/WebCore/ChangeLog	2021-03-31 18:33:39 UTC (rev 275297)
+++ trunk/Source/WebCore/ChangeLog	2021-03-31 18:37:03 UTC (rev 275298)
@@ -1,3 +1,12 @@
+2021-03-31  Alex Christensen  <achristen...@webkit.org>
+
+        Add deprecation macros.
+
+        * platform/network/cf/CertificateInfoCFNet.cpp:
+        (WebCore::certificatesMatch):
+        (WebCore::CertificateInfo::certificateChainFromSecTrust):
+        (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate const):
+
 2021-03-31  Antoine Quint  <grao...@webkit.org>
 
         Remove CA_WHERE_ADDITIVE_TRANSFORMS_ARE_REVERSED

Modified: trunk/Source/WebCore/platform/network/cf/CertificateInfoCFNet.cpp (275297 => 275298)


--- trunk/Source/WebCore/platform/network/cf/CertificateInfoCFNet.cpp	2021-03-31 18:33:39 UTC (rev 275297)
+++ trunk/Source/WebCore/platform/network/cf/CertificateInfoCFNet.cpp	2021-03-31 18:37:03 UTC (rev 275298)
@@ -44,8 +44,11 @@
         return false;
 
     for (CFIndex i = 0; i < count1; i++) {
+        // FIXME: Adopt replacement where available.
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         auto cert1 = SecTrustGetCertificateAtIndex(trust1, i);
         auto cert2 = SecTrustGetCertificateAtIndex(trust2, i);
+        ALLOW_DEPRECATED_DECLARATIONS_END
         RELEASE_ASSERT(cert1);
         RELEASE_ASSERT(cert2);
         if (!CFEqual(cert1, cert2))
@@ -59,8 +62,11 @@
 {
     auto count = SecTrustGetCertificateCount(trust);
     auto certificateChain = adoptCF(CFArrayCreateMutable(0, count, &kCFTypeArrayCallBacks));
+    // FIXME: Adopt replacement where available.
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     for (CFIndex i = 0; i < count; i++)
         CFArrayAppendValue(certificateChain.get(), SecTrustGetCertificateAtIndex(trust, i));
+    ALLOW_DEPRECATED_DECLARATIONS_END
     return certificateChain;
 }
 #endif
@@ -95,7 +101,10 @@
     if (m_trust) {
         // Allow only the root certificate (the last in the chain) to be SHA1.
         for (CFIndex i = 0, size = SecTrustGetCertificateCount(trust()) - 1; i < size; ++i) {
+            // FIXME: Adopt replacement where available.
+            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
             auto certificate = SecTrustGetCertificateAtIndex(trust(), i);
+            ALLOW_DEPRECATED_DECLARATIONS_END
             if (SecCertificateGetSignatureHashAlgorithm(certificate) == kSecSignatureHashAlgorithmSHA1)
                 return true;
         }

Modified: trunk/Source/WebKit/ChangeLog (275297 => 275298)


--- trunk/Source/WebKit/ChangeLog	2021-03-31 18:33:39 UTC (rev 275297)
+++ trunk/Source/WebKit/ChangeLog	2021-03-31 18:37:03 UTC (rev 275298)
@@ -1,3 +1,13 @@
+2021-03-31  Alex Christensen  <achristen...@webkit.org>
+
+        Add deprecation macros.
+
+        * Shared/mac/WebCoreArgumentCodersMac.mm:
+        (IPC::encodeNSError):
+        * UIProcess/Authentication/mac/WebCredentialMac.mm:
+        (WebKit::leafCertificate):
+        (WebKit::chain):
+
 2021-03-31  Wenson Hsieh  <wenson_hs...@apple.com>
 
         WKContentView should support UIKit protocol methods for becoming focused

Modified: trunk/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm (275297 => 275298)


--- trunk/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm	2021-03-31 18:33:39 UTC (rev 275297)
+++ trunk/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm	2021-03-31 18:37:03 UTC (rev 275298)
@@ -156,8 +156,11 @@
         if (SecTrustRef peerTrust = (__bridge SecTrustRef)[userInfo objectForKey:NSURLErrorFailingURLPeerTrustErrorKey]) {
             CFIndex count = SecTrustGetCertificateCount(peerTrust);
             peerCertificateChain = [NSMutableArray arrayWithCapacity:count];
+            // FIXME: Adopt replacement where available.
+            ALLOW_DEPRECATED_DECLARATIONS_BEGIN
             for (CFIndex i = 0; i < count; ++i)
                 [peerCertificateChain addObject:(__bridge id)SecTrustGetCertificateAtIndex(peerTrust, i)];
+            ALLOW_DEPRECATED_DECLARATIONS_END
         }
     }
     ASSERT(!peerCertificateChain || [peerCertificateChain isKindOfClass:[NSArray class]]);

Modified: trunk/Source/WebKit/UIProcess/Authentication/mac/WebCredentialMac.mm (275297 => 275298)


--- trunk/Source/WebKit/UIProcess/Authentication/mac/WebCredentialMac.mm	2021-03-31 18:33:39 UTC (rev 275297)
+++ trunk/Source/WebKit/UIProcess/Authentication/mac/WebCredentialMac.mm	2021-03-31 18:37:03 UTC (rev 275298)
@@ -39,8 +39,11 @@
 static SecCertificateRef leafCertificate(const CertificateInfo& certificateInfo)
 {
 #if HAVE(SEC_TRUST_SERIALIZATION)
+    // FIXME: Adopt replacement where available.
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     if (certificateInfo.type() == CertificateInfo::Type::Trust)
         return SecTrustGetCertificateAtIndex(certificateInfo.trust(), 0);
+    ALLOW_DEPRECATED_DECLARATIONS_END
 #endif
     ASSERT(certificateInfo.type() == CertificateInfo::Type::CertificateChain);
     ASSERT(CFArrayGetCount(certificateInfo.certificateChain()));
@@ -56,8 +59,11 @@
             return nil;
 
         NSMutableArray *array = [NSMutableArray array];
+        // FIXME: Adopt replacement where available.
+        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         for (CFIndex i = 1; i < count; ++i)
             [array addObject:(id)SecTrustGetCertificateAtIndex(certificateInfo.trust(), i)];
+        ALLOW_DEPRECATED_DECLARATIONS_END
 
         return array;
     }

Modified: trunk/Tools/ChangeLog (275297 => 275298)


--- trunk/Tools/ChangeLog	2021-03-31 18:33:39 UTC (rev 275297)
+++ trunk/Tools/ChangeLog	2021-03-31 18:37:03 UTC (rev 275298)
@@ -1,3 +1,11 @@
+2021-03-31  Alex Christensen  <achristen...@webkit.org>
+
+        Add deprecation macros.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
+        (verifyCertificateAndPublicKey):
+        * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
+
 2021-03-31  Wenson Hsieh  <wenson_hs...@apple.com>
 
         WKContentView should support UIKit protocol methods for becoming focused

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm (275297 => 275298)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm	2021-03-31 18:33:39 UTC (rev 275297)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm	2021-03-31 18:37:03 UTC (rev 275298)
@@ -427,7 +427,10 @@
     });
     
     EXPECT_EQ(1, SecTrustGetCertificateCount(trust));
+    // FIXME: Adopt replacement where available.
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     auto certificate = adoptCF(SecCertificateCopyData(SecTrustGetCertificateAtIndex(trust, 0)));
+    ALLOW_DEPRECATED_DECLARATIONS_END
     compareData(certificate, {
         0x30, 0x82, 0x02, 0x58, 0x30, 0x82, 0x01, 0xc1, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x09, 0x00,
         0xfb, 0xb0, 0x4c, 0x2e, 0xab, 0x10, 0x9b, 0x0c, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm (275297 => 275298)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm	2021-03-31 18:33:39 UTC (rev 275297)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm	2021-03-31 18:37:03 UTC (rev 275298)
@@ -2126,8 +2126,11 @@
         return false;
     if (SecTrustGetCertificateCount(trust) != 1)
         return false;
+    // FIXME: Adopt replacement where available.
+    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     if (![adoptNS((NSString *)SecCertificateCopySubjectSummary(SecTrustGetCertificateAtIndex(trust, 0))) isEqualToString:@"Me"])
         return false;
+    ALLOW_DEPRECATED_DECLARATIONS_END
     return true;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to