Bug 201903 - Remove alternate declaration of CCECCryptorImportKey
Summary: Remove alternate declaration of CCECCryptorImportKey
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-17 22:01 PDT by Keith Rollin
Modified: 2019-09-19 23:02 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.04 KB, patch)
2019-09-17 22:03 PDT, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2019-09-17 22:01:12 PDT
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*".
Comment 1 Radar WebKit Bug Importer 2019-09-17 22:01:28 PDT
<rdar://problem/55466589>
Comment 2 Keith Rollin 2019-09-17 22:03:12 PDT
Created attachment 379018 [details]
Patch
Comment 3 Alexey Proskuryakov 2019-09-18 09:45:20 PDT
Comment on attachment 379018 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=379018&action=review

> Source/WebCore/PAL/ChangeLog:3
> +        Remove alternate declaration of CCECCryptorImportKey

This change is a local improvement, however this whole file isn’t following our normal convention. Normally, we redeclare functions in internal builds to catch changes in signatures, which can be more drastic than here.
Comment 4 WebKit Commit Bot 2019-09-18 12:40:00 PDT
Comment on attachment 379018 [details]
Patch

Clearing flags on attachment: 379018

Committed r250049: <https://trac.webkit.org/changeset/250049>
Comment 5 WebKit Commit Bot 2019-09-18 12:40:02 PDT
All reviewed patches have been landed.  Closing bug.