Implement ECDH ImportKey/ExportKey operations according to: https://www.w3.org/TR/WebCryptoAPI/#ecdh-operations.
<rdar://problem/23789585>
Created attachment 303742 [details] Patch
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.
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).
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
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
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.
Comment on attachment 303742 [details] Patch Clearing flags on attachment: 303742 Committed r213560: <http://trac.webkit.org/changeset/213560>
All reviewed patches have been landed. Closing bug.
This patch caused several tests to fail in GTK. see bug #169469 for details.