Title: [250049] trunk/Source/WebCore/PAL
Revision
250049
Author
[email protected]
Date
2019-09-18 12:39:53 -0700 (Wed, 18 Sep 2019)

Log Message

Remove alternate declaration of CCECCryptorImportKey
https://bugs.webkit.org/show_bug.cgi?id=201903
<rdar://problem/55466589>

Reviewed by Chris Dumez.

In macOS 10.15 and iOS 13.0 SDKs, the keyPackage parameter of
CCECCryptorImportKey() was changed from "void*" to "const void*". This
change was accounted for in Bug 195754 by making the same change to
the parallel declarations in CommonCryptoSPI.h. But since this header
also needed to be used in macOS 10.14 contexts, the old declaration
was also kept.

But since this function is a "C" function, the types of parameters are
not included in the function signature, and it doesn't really matter
what parameter types are, so long as the right values are sent to the
called function. This means that we don't need two versions of the
function, one with a "const" parameter and one without. We only really
need one. In this case, it makes sense to keep the more-restrictive
one -- the with a "const void*" parameter. Therefore, remove the one
taking just "void*".

* pal/spi/cocoa/CommonCryptoSPI.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (250048 => 250049)


--- trunk/Source/WebCore/PAL/ChangeLog	2019-09-18 19:13:33 UTC (rev 250048)
+++ trunk/Source/WebCore/PAL/ChangeLog	2019-09-18 19:39:53 UTC (rev 250049)
@@ -1,3 +1,29 @@
+2019-09-18  Keith Rollin  <[email protected]>
+
+        Remove alternate declaration of CCECCryptorImportKey
+        https://bugs.webkit.org/show_bug.cgi?id=201903
+        <rdar://problem/55466589>
+
+        Reviewed by Chris Dumez.
+
+        In macOS 10.15 and iOS 13.0 SDKs, the keyPackage parameter of
+        CCECCryptorImportKey() was changed from "void*" to "const void*". This
+        change was accounted for in Bug 195754 by making the same change to
+        the parallel declarations in CommonCryptoSPI.h. But since this header
+        also needed to be used in macOS 10.14 contexts, the old declaration
+        was also kept.
+
+        But since this function is a "C" function, the types of parameters are
+        not included in the function signature, and it doesn't really matter
+        what parameter types are, so long as the right values are sent to the
+        called function. This means that we don't need two versions of the
+        function, one with a "const" parameter and one without. We only really
+        need one. In this case, it makes sense to keep the more-restrictive
+        one -- the with a "const void*" parameter. Therefore, remove the one
+        taking just "void*".
+
+        * pal/spi/cocoa/CommonCryptoSPI.h:
+
 2019-09-18  Andy Estes  <[email protected]>
 
         [Apple Pay] Tell websites why a session was cancelled

Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h (250048 => 250049)


--- trunk/Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h	2019-09-18 19:13:33 UTC (rev 250048)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h	2019-09-18 19:39:53 UTC (rev 250049)
@@ -93,11 +93,7 @@
 typedef struct _CCECCryptor *CCECCryptorRef;
 extern "C" CCCryptorStatus CCECCryptorGeneratePair(size_t keysize, CCECCryptorRef *publicKey, CCECCryptorRef *privateKey);
 extern "C" void CCECCryptorRelease(CCECCryptorRef key);
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
 extern "C" CCCryptorStatus CCECCryptorImportKey(CCECKeyExternalFormat format, const void *keyPackage, size_t keyPackageLen, CCECKeyType keyType, CCECCryptorRef *key);
-#else
-extern "C" CCCryptorStatus CCECCryptorImportKey(CCECKeyExternalFormat format, void *keyPackage, size_t keyPackageLen, CCECKeyType keyType, CCECCryptorRef *key);
-#endif
 extern "C" CCCryptorStatus CCECCryptorExportKey(CCECKeyExternalFormat format, void *keyPackage, size_t *keyPackageLen, CCECKeyType keyType, CCECCryptorRef key);
 extern "C" int CCECGetKeySize(CCECCryptorRef key);
 extern "C" CCCryptorStatus CCECCryptorCreateFromData(size_t keySize, uint8_t *qX, size_t qXLength, uint8_t *qY, size_t qYLength, CCECCryptorRef *ref);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to