Support RSA-PSS as specified in: https://www.w3.org/TR/WebCryptoAPI/#rsa-pss.
Currently, the underlying Crypto API we are using, i.e. CommonCrypto, doesn't support RSA-PSS. Therefore, the implementation of RSA-PSS is deferred until either CommonCrypto supports it or we transfer to another Crypto API.
<rdar://problem/31640672>
Created attachment 310916 [details] Patch
Attachment 310916 [details] did not pass style-queue: ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:40: signRSA_PSS is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:65: verifyRSA_PSS is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:86: CryptoAlgorithmRSA_PSS::platformSign is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:109: CryptoAlgorithmRSA_PSS::platformVerify is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:46: CryptoAlgorithmRSA_PSS::create is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:51: CryptoAlgorithmRSA_PSS::identifier is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:56: CryptoAlgorithmRSA_PSS::sign is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:65: CryptoAlgorithmRSA_PSS::verify is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:74: CryptoAlgorithmRSA_PSS::generateKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:94: CryptoAlgorithmRSA_PSS::importKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:171: CryptoAlgorithmRSA_PSS::exportKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 11 in 71 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 310940 [details] Patch
Attachment 310940 [details] did not pass style-queue: ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:40: signRSA_PSS is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:65: verifyRSA_PSS is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:86: CryptoAlgorithmRSA_PSS::platformSign is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:109: CryptoAlgorithmRSA_PSS::platformVerify is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:46: CryptoAlgorithmRSA_PSS::create is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:51: CryptoAlgorithmRSA_PSS::identifier is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:56: CryptoAlgorithmRSA_PSS::sign is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:65: CryptoAlgorithmRSA_PSS::verify is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:74: CryptoAlgorithmRSA_PSS::generateKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:94: CryptoAlgorithmRSA_PSS::importKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:171: CryptoAlgorithmRSA_PSS::exportKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 11 in 71 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 310951 [details] Patch
Attachment 310951 [details] did not pass style-queue: ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:40: signRSA_PSS is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:65: verifyRSA_PSS is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:86: CryptoAlgorithmRSA_PSS::platformSign is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:109: CryptoAlgorithmRSA_PSS::platformVerify is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:46: CryptoAlgorithmRSA_PSS::create is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:51: CryptoAlgorithmRSA_PSS::identifier is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:56: CryptoAlgorithmRSA_PSS::sign is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:65: CryptoAlgorithmRSA_PSS::verify is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:74: CryptoAlgorithmRSA_PSS::generateKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:94: CryptoAlgorithmRSA_PSS::importKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:171: CryptoAlgorithmRSA_PSS::exportKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 11 in 72 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 310951 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=310951&action=review r=me assuming the GTK build works properly. > LayoutTests/TestExpectations:1023 > +# WebCryptoAPI features that hasn't been enabled for current OS "features that HAVEN'T been enabled..."
Comment on attachment 310951 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=310951&action=review Thanks Brent for r+ my patch. >> LayoutTests/TestExpectations:1023 >> +# WebCryptoAPI features that hasn't been enabled for current OS > > "features that HAVEN'T been enabled..." Fixed.
Created attachment 311052 [details] Patch for landing
Created attachment 311064 [details] Patch for landing
Attachment 311064 [details] did not pass style-queue: ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:40: signRSA_PSS is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:65: verifyRSA_PSS is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:86: CryptoAlgorithmRSA_PSS::platformSign is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:109: CryptoAlgorithmRSA_PSS::platformVerify is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:46: CryptoAlgorithmRSA_PSS::create is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:51: CryptoAlgorithmRSA_PSS::identifier is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:56: CryptoAlgorithmRSA_PSS::sign is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:65: CryptoAlgorithmRSA_PSS::verify is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:74: CryptoAlgorithmRSA_PSS::generateKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:94: CryptoAlgorithmRSA_PSS::importKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:171: CryptoAlgorithmRSA_PSS::exportKey is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 11 in 72 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 311064 [details] Patch for landing Rejecting attachment 311064 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'validate-changelog', '--check-oops', '--non-interactive', 311064, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in Source/WTF/ChangeLog contains OOPS!. Full output: http://webkit-queues.webkit.org/results/3803267
Committed r217315: <http://trac.webkit.org/changeset/217315>
Comment on attachment 310951 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=310951&action=review > Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:58 > + CCCryptorStatus status = CCRSACryptorSign(key, ccRSAPSSPadding, digestData.data(), digestData.size(), digestAlgorithm, saltLength, signature.data(), &signatureSize); ccRSAPSSPadding here and line 80 isn't defined anywhere, this fails to compile.
(In reply to JF Bastien from comment #16) > Comment on attachment 310951 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=310951&action=review > > > Source/WebCore/crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:58 > > + CCCryptorStatus status = CCRSACryptorSign(key, ccRSAPSSPadding, digestData.data(), digestData.size(), digestAlgorithm, saltLength, signature.data(), &signatureSize); > > ccRSAPSSPadding here and line 80 isn't defined anywhere, this fails to > compile. I have added a flag HAVE_RSA_PSS to enable this for future OS release.