Bug 164739

Summary: Update SubtleCrypto::decrypt to match the latest spec
Product: WebKit Reporter: Jiewen Tan <jiewen_tan>
Component: WebCore Misc.Assignee: Jiewen Tan <jiewen_tan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cdumez, commit-queue, esprehn+autocc, jiewen_tan, kondapallykalyan, rob, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 160883    
Attachments:
Description Flags
Patch
bfulgham: review+
Patch for landing none

Description Jiewen Tan 2016-11-14 15:50:56 PST
Update SubtleCrypto::decrypt to match the latest spec.
Comment 1 Radar WebKit Bug Importer 2016-11-14 16:39:49 PST
<rdar://problem/29257848>
Comment 2 Jiewen Tan 2016-11-18 16:42:48 PST
Created attachment 295220 [details]
Patch
Comment 3 WebKit Commit Bot 2016-11-18 16:44:51 PST
Attachment 295220 [details] did not pass style-queue:


ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:81:  CryptoAlgorithmRSA_OAEP::decrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:41:  CryptoAlgorithmRSA_OAEP::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:58:  decryptRSA_OAEP is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:94:  CryptoAlgorithmRSA_OAEP::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:98:  CryptoAlgorithmAES_CBC::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:80:  CryptoAlgorithmAES_CBC::decrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:71:  CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:52:  decryptRSAES_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:83:  CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:42:  CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:41:  CryptoAlgorithmAES_CBC::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 11 in 52 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Brent Fulgham 2016-11-18 16:54:58 PST
Comment on attachment 295220 [details]
Patch

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

Looks good. r=me.

> Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:136
> +    return { };}

Looks like you lost a carriage return!

> LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt:15
> +PASS AES-CBC 256-bit key decryption with altered ciphertext 

Yay!
Comment 5 Jiewen Tan 2016-11-18 17:02:10 PST
Comment on attachment 295220 [details]
Patch

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

Thanks Brent for r+ my patch.

>> Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:136
>> +    return { };}
> 
> Looks like you lost a carriage return!

Oops. Fixed.

>> LayoutTests/imported/w3c/WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt:15
>> +PASS AES-CBC 256-bit key decryption with altered ciphertext 
> 
> Yay!

:)
Comment 6 Jiewen Tan 2016-11-18 17:12:32 PST
Created attachment 295227 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2016-11-18 17:13:52 PST
Attachment 295227 [details] did not pass style-queue:


ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:81:  CryptoAlgorithmRSA_OAEP::decrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:41:  CryptoAlgorithmRSA_OAEP::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:58:  decryptRSA_OAEP is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:94:  CryptoAlgorithmRSA_OAEP::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:98:  CryptoAlgorithmAES_CBC::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:80:  CryptoAlgorithmAES_CBC::decrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:71:  CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:52:  decryptRSAES_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:83:  CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:42:  CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:41:  CryptoAlgorithmAES_CBC::platformDecrypt is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 11 in 52 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 WebKit Commit Bot 2016-11-18 20:39:07 PST
Comment on attachment 295227 [details]
Patch for landing

Clearing flags on attachment: 295227

Committed r208918: <http://trac.webkit.org/changeset/208918>