Bug 169386 - [WebCrypto] Implement SubtleCrypto::DeriveKey method
Summary: [WebCrypto] Implement SubtleCrypto::DeriveKey method
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: Jiewen Tan
URL:
Keywords: InRadar
Depends on:
Blocks: 166746
  Show dependency treegraph
 
Reported: 2017-03-08 14:30 PST by Jiewen Tan
Modified: 2017-03-09 13:28 PST (History)
6 users (show)

See Also:


Attachments
Patch (115.79 KB, patch)
2017-03-08 20:15 PST, Jiewen Tan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiewen Tan 2017-03-08 14:30:41 PST
Implement ECDH DeriveKey operation according to the spec: https://www.w3.org/TR/WebCryptoAPI/#ecdh-operations.
Comment 1 Jiewen Tan 2017-03-08 14:31:22 PST
<rdar://problem/23789585>
Comment 2 Jiewen Tan 2017-03-08 20:15:12 PST
Created attachment 303892 [details]
Patch
Comment 3 WebKit Commit Bot 2017-03-08 20:17:19 PST
Attachment 303892 [details] did not pass style-queue:


ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:227:  CryptoAlgorithmAES_GCM::getKeyLength is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:189:  CryptoAlgorithmAES_CBC::getKeyLength is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_KW.cpp:176:  CryptoAlgorithmAES_KW::getKeyLength is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/algorithms/CryptoAlgorithmAES_CFB.cpp:178:  CryptoAlgorithmAES_CFB::getKeyLength is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 4 in 44 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Brent Fulgham 2017-03-08 20:21:10 PST
Comment on attachment 303892 [details]
Patch

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

Looks good. r=me.

> Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp:-750
> -    ASSERT_NOT_REACHED();

Yay!
Comment 5 Jiewen Tan 2017-03-08 21:02:07 PST
(In reply to comment #4)
> Comment on attachment 303892 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=303892&action=review
> 
> Looks good. r=me.
> 
> > Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp:-750
> > -    ASSERT_NOT_REACHED();
> 
> Yay!

Thanks Brent for r+ my patch.
Comment 6 WebKit Commit Bot 2017-03-08 21:50:35 PST
Comment on attachment 303892 [details]
Patch

Clearing flags on attachment: 303892

Committed r213628: <http://trac.webkit.org/changeset/213628>
Comment 7 WebKit Commit Bot 2017-03-08 21:50:40 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Carlos Alberto Lopez Perez 2017-03-09 12:08:26 PST
Looks like this broke the 32-bit build of WebKitGTK+


https://build.webkit.org/builders/GTK%20Linux%2032-bit%20Release/builds/68007
https://build.webkit.org/builders/GTK%20Linux%20ARM%20Release/builds/13248
Comment 9 Jiewen Tan 2017-03-09 13:09:31 PST
(In reply to comment #8)
> Looks like this broke the 32-bit build of WebKitGTK+
> 
> 
> https://build.webkit.org/builders/GTK%20Linux%2032-bit%20Release/builds/68007
> https://build.webkit.org/builders/GTK%20Linux%20ARM%20Release/builds/13248

Oops. Sorry for it. Glad that you have fixed the problem.
Comment 10 Carlos Alberto Lopez Perez 2017-03-09 13:18:25 PST
(In reply to comment #9)
> (In reply to comment #8)
> > Looks like this broke the 32-bit build of WebKitGTK+
> > 
> > 
> > https://build.webkit.org/builders/GTK%20Linux%2032-bit%20Release/builds/68007
> > https://build.webkit.org/builders/GTK%20Linux%20ARM%20Release/builds/13248
> 
> Oops. Sorry for it. Glad that you have fixed the problem.

Have we? I still see the GTK+ 32-bit bots broken

https://build.webkit.org/builders/GTK%20Linux%2032-bit%20Release
Comment 11 Brent Fulgham 2017-03-09 13:28:50 PST
Prospective 32-bit GTK build fix landed in r213663: <http://trac.webkit.org/changeset/213663>