WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
169257
[WebCrypto] Implement ECDH ImportKey/ExportKey operations
https://bugs.webkit.org/show_bug.cgi?id=169257
Summary
[WebCrypto] Implement ECDH ImportKey/ExportKey operations
Jiewen Tan
Reported
2017-03-06 20:45:11 PST
Implement ECDH ImportKey/ExportKey operations according to:
https://www.w3.org/TR/WebCryptoAPI/#ecdh-operations
.
Attachments
Patch
(153.00 KB, patch)
2017-03-07 16:13 PST
,
Jiewen Tan
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews116 for mac-elcapitan
(1.50 MB, application/zip)
2017-03-07 17:28 PST
,
Build Bot
no flags
Details
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Jiewen Tan
Comment 1
2017-03-06 20:46:00 PST
<
rdar://problem/23789585
>
Jiewen Tan
Comment 2
2017-03-07 16:13:36 PST
Created
attachment 303742
[details]
Patch
WebKit Commit Bot
Comment 3
2017-03-07 16:15:35 PST
Attachment 303742
[details]
did not pass style-queue: ERROR: Source/WebCore/crypto/CommonCryptoUtilities.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/crypto/CommonCryptoUtilities.h:92: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] Total errors found: 2 in 71 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brent Fulgham
Comment 4
2017-03-07 17:15:53 PST
Comment on
attachment 303742
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303742&action=review
r=me
> Source/WebCore/crypto/CommonCryptoUtilities.h:109 > +extern "C" CCCryptorStatus CCECCryptorGetKeyComponents(CCECCryptorRef ecKey, size_t *keySize, uint8_t *qX, size_t *qXLength, uint8_t *qY, size_t *qYLength, uint8_t *d, size_t *dLength);
Is all of this just re-declaring CoreCrypto stuff? Seems like it should live in our SPI folder if so! Note: you do not need to address this comment in this patch.
> LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker-expected.txt:26 > +FAIL Good parameters: P-256 bits (spki, buffer(91), {name: ECDH, namedCurve: P-256}, true, []) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code
Why do so many of these still fail? Is that due to the missing SPKI/PKCS8 support (based on the output I assume the answer is yes).
Build Bot
Comment 5
2017-03-07 17:28:39 PST
Comment on
attachment 303742
[details]
Patch
Attachment 303742
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/3262386
New failing tests: media/track/track-in-band-style.html
Build Bot
Comment 6
2017-03-07 17:28:41 PST
Created
attachment 303747
[details]
Archive of layout-test-results from ews116 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Jiewen Tan
Comment 7
2017-03-07 17:36:02 PST
Comment on
attachment 303742
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303742&action=review
Thanks Brent for r+ my patch.
>> Source/WebCore/crypto/CommonCryptoUtilities.h:109 >> +extern "C" CCCryptorStatus CCECCryptorGetKeyComponents(CCECCryptorRef ecKey, size_t *keySize, uint8_t *qX, size_t *qXLength, uint8_t *qY, size_t *qYLength, uint8_t *d, size_t *dLength); > > Is all of this just re-declaring CoreCrypto stuff? Seems like it should live in our SPI folder if so! Note: you do not need to address this comment in this patch.
Yes. They are just re-declaring CommonCrypto stuff.
>> LayoutTests/imported/w3c/web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker-expected.txt:26 >> +FAIL Good parameters: P-256 bits (spki, buffer(91), {name: ECDH, namedCurve: P-256}, true, []) assert_unreached: Threw an unexpected error: NotSupportedError (DOM Exception 9): The algorithm is not supported Reached unreachable code > > Why do so many of these still fail? Is that due to the missing SPKI/PKCS8 support (based on the output I assume the answer is yes).
Yes, I'm expecting these will pass once
Bug 169318
is fixed. I have already had a plan for hacking the CommonCrypto SPIs such that we could properly do the SPKI/PKCS8 import/export.
WebKit Commit Bot
Comment 8
2017-03-07 18:09:42 PST
Comment on
attachment 303742
[details]
Patch Clearing flags on attachment: 303742 Committed
r213560
: <
http://trac.webkit.org/changeset/213560
>
WebKit Commit Bot
Comment 9
2017-03-07 18:09:46 PST
All reviewed patches have been landed. Closing bug.
Javier Fernandez
Comment 10
2017-03-10 08:43:34 PST
This patch caused several tests to fail in GTK. see
bug #169469
for details.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug