Bug 195754 - Move CommonCrypto SPI declarations to an appropriate PAL/spi header
Summary: Move CommonCrypto SPI declarations to an appropriate PAL/spi header
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-14 12:01 PDT by Brent Fulgham
Modified: 2019-03-14 20:31 PDT (History)
7 users (show)

See Also:


Attachments
Patch (20.74 KB, patch)
2019-03-14 12:06 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch for landing (20.84 KB, patch)
2019-03-14 17:38 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch for landing (20.83 KB, patch)
2019-03-14 19:48 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch for landing (20.68 KB, patch)
2019-03-14 20:04 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch for landing (20.72 KB, patch)
2019-03-14 20:10 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch for landing (20.72 KB, patch)
2019-03-14 20:14 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2019-03-14 12:01:21 PDT
Tidy up the CoreCrypto implementation by moving the forward declarations of SPI functions into an appropriate PAL/spi location.
Comment 1 Brent Fulgham 2019-03-14 12:01:58 PDT
<rdar://problem/48591957>
Comment 2 Brent Fulgham 2019-03-14 12:06:39 PDT
Created attachment 364674 [details]
Patch
Comment 3 Build Bot 2019-03-14 12:10:15 PDT
Attachment 364674 [details] did not pass style-queue:


ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:28:  Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file.  [build/version_check] [5]
ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:56:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:57:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:62:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:63:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:64:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:91:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:92:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:105:  Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file.  [build/version_check] [5]
Total errors found: 9 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Brent Fulgham 2019-03-14 12:10:55 PDT
(In reply to Build Bot from comment #3)
> Attachment 364674 [details] did not pass style-queue:
> 
> 
> ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:28:  Misplaced OS
> version check. Please use a named macro in wtf/Platform.h,
> wtf/FeatureDefines.h, or an appropriate internal file. 
> [build/version_check] [5]
> ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:56:  enum members
> should use InterCaps with an initial capital letter or initial 'k' for
> C-style enums.  [readability/enum_casing] [4]
> ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:57:  enum members
> should use InterCaps with an initial capital letter or initial 'k' for
> C-style enums.  [readability/enum_casing] [4]
> ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:62:  enum members
> should use InterCaps with an initial capital letter or initial 'k' for
> C-style enums.  [readability/enum_casing] [4]
> ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:63:  enum members
> should use InterCaps with an initial capital letter or initial 'k' for
> C-style enums.  [readability/enum_casing] [4]
> ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:64:  enum members
> should use InterCaps with an initial capital letter or initial 'k' for
> C-style enums.  [readability/enum_casing] [4]
> ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:91:  enum members
> should use InterCaps with an initial capital letter or initial 'k' for
> C-style enums.  [readability/enum_casing] [4]
> ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:92:  enum members
> should use InterCaps with an initial capital letter or initial 'k' for
> C-style enums.  [readability/enum_casing] [4]
> ERROR: Source/WebCore/PAL/pal/spi/cocoa/CommonCryptoSPI.h:105:  Misplaced OS
> version check. Please use a named macro in wtf/Platform.h,
> wtf/FeatureDefines.h, or an appropriate internal file. 
> [build/version_check] [5]
> Total errors found: 9 in 6 files
> 
> 
> If any of these errors are false positives, please file a bug against
> check-webkit-style.

These style violations are because these are SPI declarations.
Comment 5 Jiewen Tan 2019-03-14 13:10:02 PDT
Comment on attachment 364674 [details]
Patch

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

Thanks Brent for making this change. Really appreciate it. r=me.

> Source/WebCore/ChangeLog:3
> +        Move CoreCrypto SPI declarations to an appropriate PAL/spi header

CommonCrypto will be more appropriate.

> Source/WebCore/ChangeLog:9
> +        Move the forward declarations of various CoreCrypto SPI to an appropriate PAL/spi header.

Ditto.

> Source/WebCore/PAL/ChangeLog:3
> +        Move CoreCrypto SPI declarations to an appropriate PAL/spi header

Ditto.

> Source/WebCore/PAL/ChangeLog:9
> +        Move the forward declarations of various CoreCrypto SPI to an appropriate PAL/spi header.

Ditto.
Comment 6 Brent Fulgham 2019-03-14 13:34:24 PDT
Comment on attachment 364674 [details]
Patch

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

>> Source/WebCore/ChangeLog:3
>> +        Move CoreCrypto SPI declarations to an appropriate PAL/spi header
> 
> CommonCrypto will be more appropriate.

Doh! Will fix (in all the places)
Comment 7 Brent Fulgham 2019-03-14 13:56:48 PDT
Committed r242963: <https://trac.webkit.org/changeset/242963>
Comment 8 Ryan Haddad 2019-03-14 17:00:11 PDT
Reverted r242963 for reason:

Breaks watchOS build.

Committed r242977: <https://trac.webkit.org/changeset/242977>
Comment 9 Ryan Haddad 2019-03-14 17:00:58 PDT
Details in radar.
Comment 10 Brent Fulgham 2019-03-14 17:38:38 PDT
Created attachment 364732 [details]
Patch for landing
Comment 11 Jiewen Tan 2019-03-14 18:18:04 PDT
Comment on attachment 364732 [details]
Patch for landing

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

> Source/WebCore/crypto/CommonCryptoUtilities.h:40
> +typedef struct _CCBigNumRef *CCBigNumRef;

Maybe this needs to be outside of namespace WebCore?
Comment 12 WebKit Commit Bot 2019-03-14 18:27:15 PDT
The commit-queue encountered the following flaky tests while processing attachment 364732 [details]:

legacy-animation-engine/compositing/layer-creation/mismatched-rotated-transform-transition-overlap.html bug 195787 (authors: dino@apple.com and graouts@apple.com)
The commit-queue is continuing to process your patch.
Comment 13 WebKit Commit Bot 2019-03-14 18:28:04 PDT
Comment on attachment 364732 [details]
Patch for landing

Clearing flags on attachment: 364732

Committed r242981: <https://trac.webkit.org/changeset/242981>
Comment 14 WebKit Commit Bot 2019-03-14 18:28:06 PDT
All reviewed patches have been landed.  Closing bug.
Comment 15 Darin Adler 2019-03-14 19:06:53 PDT
Comment on attachment 364732 [details]
Patch for landing

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

> Source/WebCore/crypto/mac/CryptoAlgorithmHKDFMac.cpp:44
> +#pragma clang diagnostic push
> +#pragma clang diagnostic ignored "-Wdeprecated-declarations"

Please use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END instead of using #pragma clang directly.
Comment 16 Brent Fulgham 2019-03-14 19:48:18 PDT
Reopening to attach new patch.
Comment 17 Brent Fulgham 2019-03-14 19:48:20 PDT
Created attachment 364760 [details]
Patch for landing
Comment 18 Brent Fulgham 2019-03-14 19:51:04 PDT
(In reply to Darin Adler from comment #15)
> Comment on attachment 364732 [details]
> Patch for landing
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=364732&action=review
> 
> > Source/WebCore/crypto/mac/CryptoAlgorithmHKDFMac.cpp:44
> > +#pragma clang diagnostic push
> > +#pragma clang diagnostic ignored "-Wdeprecated-declarations"
> 
> Please use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END instead of using #pragma
> clang directly.

Will do!
Comment 19 Brent Fulgham 2019-03-14 20:04:27 PDT
Created attachment 364762 [details]
Patch for landing
Comment 20 Brent Fulgham 2019-03-14 20:10:50 PDT
Created attachment 364763 [details]
Patch for landing
Comment 21 Brent Fulgham 2019-03-14 20:14:13 PDT
Created attachment 364764 [details]
Patch for landing
Comment 22 WebKit Commit Bot 2019-03-14 20:31:46 PDT
Comment on attachment 364764 [details]
Patch for landing

Clearing flags on attachment: 364764

Committed r242988: <https://trac.webkit.org/changeset/242988>
Comment 23 WebKit Commit Bot 2019-03-14 20:31:48 PDT
All reviewed patches have been landed.  Closing bug.